Re: [Nbd] nbd-client hangs on negotiation - possible NBD bug
- To: "Wouter Verhelst" <wouter@...3...>
- Cc: email@example.com
- Subject: Re: [Nbd] nbd-client hangs on negotiation - possible NBD bug
- From: "Mike Snitzer" <snitzer@...17...>
- Date: Fri, 4 Aug 2006 15:49:47 -0400
- Message-id: <170fa0d20608041249q4d464ed8t6104df2c95f23395@...18...>
- In-reply-to: <20060804183512.GE3770@...39...>
- References: <20060730231145.GF20140@...39...> <20060731225712.17085.qmail@...95...> <20060801085812.GA11911@...85...> <170fa0d20608041115y2b0e0adbr3a0fc048522dd572@...18...> <20060804183512.GE3770@...39...>
On 8/4/06, Wouter Verhelst <wouter@...3...> wrote:
On Fri, Aug 04, 2006 at 02:15:14PM -0400, Mike Snitzer wrote:
> On 8/1/06, Wouter Verhelst <wouter@...3...> wrote:
> >On Mon, Jul 31, 2006 at 03:57:12PM -0700, Eric Tessler wrote:
> >> We now know that the server side is blocking on the accept() call to
> >> the socket - even though the client is connecting to the server, the
> >> accept() call on the server side hangs.
> >I see.
> >One thing I've been meaning to do is to convert the current situation
> >(where the server blocks in accept() until a client connects) to some
> >select() based thing. I didn't do this yet since there's nothing else
> >the main server needs to do but to wait for clients to connect and fork
> >off servers to handle them, but I don't know whether it's actually a
> >good idea to keep it this way.
> After looking at the problem a bit closer, I don't think its a good
> idea for the server to use a blocking socket with accept() as the
> mechanism to wait for a client connection.
> As such I wrote the attached patch that enables the nbd-server to use
> a non-blocking accept() that is guarded by a select() like was
> Eric, any chance you could try nbd-2.8.5 with this patch in your
Eric mailed me in private that the needed fix is really what is done in
the 2.7 branch in r105, which made it in only after I released the 2.7.3
that Eric is using. For some reason that hadn't made it in 2.8 or trunk
yet, so I've just commited a fix for that to both the 2.8 branch and
Awesome, thanks for the heads up.
> Wouter, what are your thoughts?
Your patch looks okay, and this is something I wanted to do for some
time now, so I'll incorporate it some time soon. I have no time anymore
now, however, have to catch my train. Kick me if I forget (which is not
totally unlikely, knowing me).
I'll probably release 2.8.6 after that happens.
Sounds good, I'll ping you sometime next week.