Issue description
An assertion failure occurs in the following line:
|
zmq_assert (!(pollset [i].revents & POLLNVAL)); |
The fd member of the offending entry in pollset in that case has the value -1 / retired_fd.
Apparently, this was already the case when poll was called, which caused poll to set the revents of the entry to POLLNVAL.
I found that it is possible to call add_fd with a fd_ parameter of retired_fd/-1, which is not checked, so I assume this has happened somehow, but I do not know via which call chain this happened.
Environment
- libzmq version (commit hash if unreleased): 4.2.3 built with ZMQ_USE_POLL
- OS: Windows
Minimal test code / Steps to reproduce the issue
Unfortunately, I have not been able to reproduce this issue. It occurs if some networking issues happen, such as firewall configurations between peers change, or the local network settings are reconfigured. I don't know yet what exactly triggers the issue, but it has occurred several times on different machines.
What's the actual result? (include assertion message & call stack if applicable)
Assertion failure: !(pollset [i].revents & POLLNVAL) within a zmq::poll_t::worker_routine thread.
What's the expected result?
No assertion failure, operation continues.
Issue description
An assertion failure occurs in the following line:
libzmq/src/poll.cpp
Line 157 in 3226b8e
The fd member of the offending entry in pollset in that case has the value -1 / retired_fd.
Apparently, this was already the case when poll was called, which caused poll to set the revents of the entry to POLLNVAL.
I found that it is possible to call add_fd with a fd_ parameter of retired_fd/-1, which is not checked, so I assume this has happened somehow, but I do not know via which call chain this happened.
Environment
Minimal test code / Steps to reproduce the issue
Unfortunately, I have not been able to reproduce this issue. It occurs if some networking issues happen, such as firewall configurations between peers change, or the local network settings are reconfigured. I don't know yet what exactly triggers the issue, but it has occurred several times on different machines.
What's the actual result? (include assertion message & call stack if applicable)
Assertion failure: !(pollset [i].revents & POLLNVAL) within a zmq::poll_t::worker_routine thread.
What's the expected result?
No assertion failure, operation continues.