nbd icon indicating copy to clipboard operation
nbd copied to clipboard

NBD server unreliable when in debug mode (-d)

Open GSI opened this issue 2 years ago • 1 comments

In runit all services are started in foreground mode, so nbd-server is started as nbd-server -d.

Generally, network booting a client works fine unless the client machine is force-reset/shutoff at least once. Any subsequent boot attempt will stop and hang at this line with the cursor blinking:

Negotiation: _

The issue is 100% reproducible and occurs exclusively when nbd-server is run with -d.

NBD version is 3.24 with the package built as per https://github.com/void-linux/void-packages/blob/master/srcpkgs/nbd/template.

GSI avatar Apr 20 '22 16:04 GSI

nbd-server will fork on two occasions: once to detach from the foreground, and once to separate the serving process for a client from the master process.

The -d parameter will disable both cases. You clearly expect it to only disable the first, which is not a use case that the -d parameter was meant for.

A patch for adding the behavior you seek is welcome.

yoe avatar May 13 '22 09:05 yoe