nbd-server hangs after fork
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nbd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lunar |
Fix Released
|
High
|
Graham Inggs | ||
Mantic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Glib 2.76.0 reworked the implementation of GThreadPool, which nbd uses, in ways that it now no longer works if the treadpool is initialized before a fork() call, but used afterwards (which nbd used to do). A result of this bug in nbd is that, when run against glib 2.76.0 or above, it will accept() a connection from a client but then just sit there and never reply to any message from the client.
[Test plan]
The build contains a test which calls nbd-tester-client against the newly-built nbd-server. If the bug is still present, the test suite will fail. If the bug is not present, the test suite will complete successfully.
[What could go wrong]
The changes could affect the way things are sent to the client, but the build-time test suite should catch incompatible differences.
At any rate, the current package is completely unusable, so the only way to go is up.
[Original bug description]
After updating to lunar, my nbd-server stopped working (it accepts connections, but the forked nbd-server just hangs and no traffic goes in or out)
I tried building latest nbd (3.25) myself and the problem seems to be solved.
Its changelog says
- nbd-server now works as expected when compiled against glib >= 2.76.
So I suppose an updated version is needed.
Thanks!
description: | updated |
Changed in nbd (Ubuntu Mantic): | |
status: | Triaged → Fix Committed |
description: | updated |
Changed in nbd (Ubuntu Lunar): | |
assignee: | nobody → Graham Inggs (ginggs) |
status: | Triaged → In Progress |
description: | updated |
tags: | added: ftbfs |
Yes, that's exactly correct, and the issue will be fixed with the upload of nbd 3.25 to Debian, which will happen in a few months (after Debian releases). However, that won't fix Lunar.
In order to fix this, cherry-picking commits 3cb679f4a97e1a5 4a7285ee1f22e28 88c9d3b900 and a10d07b43fe5169 cd295604632faf6 a08c52f75b from git HEAD should suffice.