Re: [Nbd] found bug in nbd-server.c, handle_info()
- To: Greg Menke <gregory.d.menke@...2917...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] found bug in nbd-server.c, handle_info()
- From: Wouter Verhelst <w@...112...>
- Date: Thu, 11 May 2017 10:49:50 +0200
- Message-id: <20170511084950.6kxxejjbihpz7jpq@...3...>
- In-reply-to: <59135323.90201@...2917...>
- References: <59135323.90201@...2917...>
Hi Greg,
On Wed, May 10, 2017 at 01:51:31PM -0400, Greg Menke wrote:
> Hi all- new nbd user, thanks for all your work.
>
> On the gitlab trunk, I discovered nbd_server.c, handle_info() function
> does not perform "return true" as its last line, so no defined return
> value back into negotiate(). If the return value register is 0, the
> server stays in the protocol negotiation phase after the client says
> NBT_OPT_GO, which leads to a "Negotiation failed/5a: magic mismatch"
> error on the 1st transaction.
Yup, indeed. Good catch :-)
(note though that handle_info is new functionality, which hasn't
actually been released yet; if you're trying this for a production
environment, I suggest you use 3.15.2 instead)
> Because of the undefined return value this error may appear or not
> depending on random circumstances, gcc rev, cpu architecture, etc.. I
> discovered it on Linux 3.11.10-100.fc18.x86_64
... or it might be aggressively optimized out completely, in some cases
(clang is especially nice at that).
I suspect this might be why my test suite had been hanging recently
(which is one of the main reasons why I hadn't released this yet).
Hopefully this will fix it :)
Thanks,
--
< ron> I mean, the main *practical* problem with C++, is there's like a dozen
people in the world who think they really understand all of its rules,
and pretty much all of them are just lying to themselves too.
-- #debian-devel, OFTC, 2016-02-12
Reply to: