-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Safir_control must not be multithreaded due to fork() issue #306
Comments
Fixed, by making it single-threaded. |
…gle threading may cause high latency, maybe. This is basically a test. more to follow in later commits.
This discussion appears very relevant: |
We have seen a few crashes where safir_control and/or dose_main crash with a message about "epoll reregistration" on Linux. It seems that on POSIX OS:es it is very difficult to be thread safe and do fork()/exec() calls, which is what safir_control currently does.
The asio documentation mentions the threading issue: http://www.boost.org/doc/libs/1_61_0/doc/html/boost_asio/reference/io_service/notify_fork.html
Also there are a few relevant stack overflow discussions:
https://stackoverflow.com/questions/21529540/how-do-i-handle-fork-correctly-with-boostasio-in-a-multithreaded-program
https://stackoverflow.com/questions/9362258/how-to-make-boost-asio-fork-safe
Simplest resolution is to make safir_control single-threaded.
The text was updated successfully, but these errors were encountered: