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
SSL write() gets broken pipe signal SIGPIPE #401
Comments
|
Out of the box OpenSSL doesn't provide a good way to do this that works everywhere. If you're on a BSD-based platform then its possible to do a The workaround on Linux is as you suggest, ignoring the signal using something like A longer-term solution is to write an OpenSSL BIO that correctly handles this. |
Add an OpenSSL BIO that ignores SIGPIPE by passing MSG_NOSIGNAL to the send() and recv() calls on platforms that support it. Fixes #401
Add an OpenSSL BIO that ignores SIGPIPE by passing MSG_NOSIGNAL to the send() and recv() calls on platforms that support it. Fixes #401
Add an OpenSSL BIO that ignores SIGPIPE by passing MSG_NOSIGNAL to the send() and recv() calls on platforms that support it. Fixes #401
Add an OpenSSL BIO that ignores SIGPIPE by passing MSG_NOSIGNAL to the send() and recv() calls on platforms that support it. Fixes #401
@kuroburki I've added support to rabbitmq-c for ignoring |
I am using latest version of SAC and rabbitmq-c code for my C++ client on Linux. The broker and clients are configured in SSL and broker is configured in a 2 node cluster. While testing for failover, I noticed my C++ client would terminate if I issued rabbitmqctl stop_app on the master node. The call stack shows the process received SIGPIPE while performing write() within the openssl layer. I looked up the code and can find the non-SSL part ignores this signal at a call level using MSG_NOSIGNAL on send(). Is this not handled similarly for the SSL connection? I have currently ignored the signal at my process level. Further reading suggests it can be ignored at a socket level using setsockopt. Let me know if this was considered for the SSL feature support. I would like to know if this is something which can be handled in the library or at the application level.
EDIT: SO_NOSIGPIPE is a BSD implementation and not supported on Linux. Does this mean I am limited to ignoring signal at process level for now? I have checked internally and this is feasible.
The text was updated successfully, but these errors were encountered: