[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] nbd-client hangs on negotiation - possible NBD bug



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.

I concur.

> 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
> suggested.
>
> Eric, any chance you could try nbd-2.8.5 with this patch in your
> environment?

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
trunk, too.

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.

Mike



Reply to: