-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
BUG: IPC socket drops messages, ignores LINGER #4660
Comments
This sounds like a bug that should be reported to libzmq, since it's not related to pyzmq. I guess ipc messages can drop when sockets close, apparently ignoring LINGER. You don't need to specify LINGER, either, since even with the default of waiting forever, messages are dropped. I don't know at what stage that's happening, but since adding sleep before sender.close results in delivered messages, it does sound like LINGER is just not implemented correctly for ipc senders. Setting SNDHWM to 1 also further accentuates the issue. |
What pyzmq version?
25.1.0
What libzmq version?
4.3.3
Python version (and how it was installed)
3.11.5
OS
Ubuntu 22.04
What happened?
Setting linger option for the sender doesn't block when the socket/context are closed. It exits immediately, but receiver doesn't end up reading all messages, so something is amiss.
It only seems to manifest if I set HWM, which I'm guessing is because without the limit libzmq is able to buffer everything in the client almost immediately.
Code to reproduce bug
Traceback, if applicable
More info
In this case I'm using a pair socket, so easy enough to have the server/client communicate when each are done instead of relying on linger.
The text was updated successfully, but these errors were encountered: