erlzmq
erlzmq copied to clipboard
Hard crash scenario with req socket in gen_server
I'm trying to use a zmq socket within a gen_server. When the gen_server process crashes (including normal gen process exits), the VM crashes. Crash behavior when running from an escript is inconsistent but includes:
- Program hangs without exiting
- Various assertion errors (see below)
- segfault
Some of the assertion errors:
{"init terminating in do_boot",timeout}
Bad file descriptor
rc != -1 (epoll.cpp:68)
Aborted
and:
{"init terminating in do_boot",stop}
Bad file descriptor
nbytes != -1 (mailbox.cpp:189)
Aborted
Please refer to these two files when trying to reproduce:
- https://github.com/gar1t/erlzmq/blob/master/src/zmq_reqclient2.erl
- https://github.com/gar1t/erlzmq/blob/master/test/reqclient2.es
I see this behavior on the current zeromq/erlzmq master.
Can you run this in gdb and get a backtrace? You'd have to modify erl script to call gdb.