You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, the I/O thread started by ZeroMQ block all signals. This ensure that the signal that the process receive are processes by another thread, which is what we want. However, signals are commonly used to suspend threads from within the application. For instance, the Boehm garbage collector for C and C++ does so using the SIGPWR and SIGXCPU signals on linux. On SIGUSR1 and SIGUSR2 in the case of the D garbage collector.
The code responsible for blockign all signals can be found here:
libzmq version (commit hash if unreleased): 4.3.5 (I do believe any recent version of ZeroMQ would have the same behavior).
OS: Linux (Debian testing)
Minimal test code / Steps to reproduce the issue
Send a signal to the worker's thread using pthread_kill .
What's the actual result? (include assertion message & call stack if applicable)
Nothing happens. In the context of the GC mentioned above, it means the programs hangs forever waiting for the thread to stop using Boehm, or the thread still running when it should have stopped for the D garbage collector.
Actual effect in practice will depend on what the signal are used for internally and via which specific protocol.
What's the expected result?
The default behavior can remain unchanged, but a ZeroMQ user should be able to specify a set of signal that needs to be exluded from the blanket signal block the I/O thread is doing on startup.
The text was updated successfully, but these errors were encountered:
Issue description
By default, the I/O thread started by ZeroMQ block all signals. This ensure that the signal that the process receive are processes by another thread, which is what we want. However, signals are commonly used to suspend threads from within the application. For instance, the Boehm garbage collector for C and C++ does so using the SIGPWR and SIGXCPU signals on linux. On SIGUSR1 and SIGUSR2 in the case of the D garbage collector.
The code responsible for blockign all signals can be found here:
libzmq/src/thread.cpp
Lines 218 to 224 in 90b4f41
Environment
Minimal test code / Steps to reproduce the issue
pthread_kill
.What's the actual result? (include assertion message & call stack if applicable)
Nothing happens. In the context of the GC mentioned above, it means the programs hangs forever waiting for the thread to stop using Boehm, or the thread still running when it should have stopped for the D garbage collector.
Actual effect in practice will depend on what the signal are used for internally and via which specific protocol.
What's the expected result?
The default behavior can remain unchanged, but a ZeroMQ user should be able to specify a set of signal that needs to be exluded from the blanket signal block the I/O thread is doing on startup.
The text was updated successfully, but these errors were encountered: