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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nbd-general mailing list
Nbd-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nbd-general
  • [Nbd... Greg Menke
    • ... Wouter Verhelst
      • ... Menke, Gregory D. (GSFC-582.0)[Arctic Slope Technical Services, Inc.]
        • ... Wouter Verhelst
          • ... Alex Bligh
            • ... Menke, Gregory D. (GSFC-582.0)[Arctic Slope Technical Services, Inc.]
              • ... Wouter Verhelst
                • ... Menke, Gregory D. (GSFC-582.0)[Arctic Slope Technical Services, Inc.]

Reply via email to