NetworkBlockDevice / nbd

Network Block Device
GNU General Public License v2.0
450 stars 116 forks source link

HUP-signal can lead to g_thread_pool_set_max_threads(tpool, 0 ...) #96

Closed juhaerk closed 5 years ago

juhaerk commented 5 years ago

HUP-signal can lead to use of an uninitialized value of max_threads, setting it to a possible value of 0, leading to nbd-clients hanging right after the negotation process.

Problem seen in 3.15.2 and 3.18. The current master appears to have the same problem (by code inspection).

juhaerk commented 5 years ago

Fix is in pull request... https://github.com/NetworkBlockDevice/nbd/pull/97 Very lightly tested yet, but proceeding to testing...

yoe commented 5 years ago

fix was merged, so closing.

kumasam4 commented 3 years ago

Hi, I have NBD Server 3.20 installed on RHEL7 Operating system and configured. While adding new exports under NBD server config, i need to reload new configuration for the exports. While sending SIGHUP signal via OS process to the root PID, it makes NBD-SERVER process dead. Later, i tried with a few more test attempts with the same SIGHUP signal after NBD-SERVER service restart & re-adding exports under config. Sometimes, it works for a few iterations but later it fails. Currently, i have only 5 exported devices in nbd server config, planned to scale up with multiple exports as per needs.

Please assist or advise any feedback..