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
iOS abuses EBADF to report that a socket can no longer be used because its resources have been reclaimed while the app was in the background. Apple documents this behaviour here:
ZeroMQ asserts on the errno value EBADF in multiple locations, interpreting it as an impossible value indicating an internal error, so iOS apps with open sockets will intermittently crash after waking from background.
Environment
libzmq version (commit hash if unreleased): 4.2.3
OS: iOS 11.2.6
Minimal test code / Steps to reproduce the issue
Repeatedly sleep and wake an iOS device while running an app with an open ZeroMQ socket.
What's the actual result? (include assertion message & call stack if applicable)
Issue description
ZeroMQ intermittently calls abort() on iOS.
iOS abuses EBADF to report that a socket can no longer be used because its resources have been reclaimed while the app was in the background. Apple documents this behaviour here:
https://developer.apple.com/library/content/technotes/tn2277/_index.html#//apple_ref/doc/uid/DTS40010841-CH1-SUBSECTION3
ZeroMQ asserts on the errno value EBADF in multiple locations, interpreting it as an impossible value indicating an internal error, so iOS apps with open sockets will intermittently crash after waking from background.
Environment
Minimal test code / Steps to reproduce the issue
Repeatedly sleep and wake an iOS device while running an app with an open ZeroMQ socket.
What's the actual result? (include assertion message & call stack if applicable)
"Bad file descriptor (src/tcp_connecter.cpp:403)"
(aborts)
What's the expected result?
On iOS only, treat EBADF like any other "networking problem", and recover by closing and attempting to reconnect.
The text was updated successfully, but these errors were encountered: