jzmq icon indicating copy to clipboard operation
jzmq copied to clipboard

ZMQ: Assertion Failed with JZMQ (msg.cpp:220)

Open billyhct opened this issue 11 years ago • 3 comments

My Java server runs pretty well for a while with JZMQ. And suddenly it got Assertion failed: check () (msg.cpp:220)

I am using latest JZMQ and ZMQ 4.0.4 It also happened in ZMQ 3.2.2 as well.

It cannot be caught in JAVA. And the java process is down itself. It seems like Cpp issue in JNI

May I know if any one know what happens in this exception?

billyhct avatar Aug 16 '14 07:08 billyhct

This is where the assert is happening:

https://github.com/zeromq/zeromq4-x/blob/v4.0.4/src/msg.cpp#L220

It would seem that you are getting a malformed zmq_msg_t somehow.

https://github.com/zeromq/zeromq4-x/blob/v4.0.4/src/msg.cpp#L36 https://github.com/zeromq/zeromq4-x/blob/v4.0.4/src/msg.hpp#L106

Can you provide a minimal test case that recreates this issue?

trevorbernard avatar Aug 16 '14 14:08 trevorbernard

It is very difficult to replicate the issue

server/client are using pub/sub mode. I only use the same few messages in binary format for a day and it suddenly happens for this malformed zmq_msg_t, is it possible due to the sender side got GC or something else and send a corrupted message to server?

can server just ignore the malformed msg instead of dump the jvm down?

thanks

billyhct avatar Aug 16 '14 17:08 billyhct

I got the same error you can reproduce it with the example in https://github.com/celluloid/dcell running on ruby 2.2.3p173 with zeromq: stable 4.1.3. Maybe that can help.

raskhadafi avatar Sep 05 '15 09:09 raskhadafi