zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.45k stars 2.34k forks source link

Assertion failed: pfd.revents & POLLIN (/zmq/build/libzmq-src/src/signaler.cpp:265) #4644

Closed OSHINRAJ closed 6 months ago

OSHINRAJ commented 6 months ago

Issue description

Assertion failed: pfd.revents & POLLIN (/zmq/build/libzmq-src/src/signaler.cpp:265)

Environment

Minimal test code / Steps to reproduce the issue

This seems to be an occasional bug, when zmq_close () API is called while zmq_send() is in blocking stage.

What's the actual result? (include assertion message & call stack if applicable)

An assertion is occured in libzmq in src/signaler.cpp:265.

What's the expected result?

The zmq_send() should fail with a proper error code instead of the assertion.

bluca commented 6 months ago

This seems to be an occasional bug, when zmq_close () API is called while zmq_send() is in blocking stage.

How is it possible that you call zmq_close while zmq_send is blocked?

OSHINRAJ commented 6 months ago

The zmq_send is called in a separate thread. The zmq_close is invoked from another thread for the same socket.

bluca commented 6 months ago

As the documentation says, sockets cannot be used from multiple threads

OSHINRAJ commented 6 months ago

Then, what is the use of inproc transport?

bluca commented 6 months ago

sender on one side, receiver on the other, check the zguide