segfault when zmq_poll() with closed socket
potatogim opened this issue · 1 comments
potatogim commented
Hi.
I have meet a segfault with my program.
this situation like below.
- call
zmq_poll()
with a monitor socket gained byzmq_monitor_socket()
and then some callback is triggered. - this callback checks connection and then if it is disconnected, close this socket.
- after that, call
zmq_poll()
with same pollitems. - Bang!
I have rebuilt ZMQ::LibZMQ3 with ZMQ_TRACE
, and this is output from that.
[perlzmq (29306)] START mg_free (Message)
[perlzmq (29306)] + zmq message 2e41f50
[perlzmq (29306)] END mg_free (Message)
[perlzmq (29306)] START zmq_poll
[perlzmq (29306)] + processing element 0
[perlzmq (29306)] + mg 0: 48468640
[perlzmq (29306)] + mg->mg_ptr 0: 0
Segmentation fault (core dumped)
Actually... it may be my fault, too.
but I think that we can handle this situation more gracefully :)
potatogim commented
Sorry, I did confused repository :)
I will close and reopen with p5-ZMQ repository.