[zeromq-dev] Problems with the Java Binding

Attila-Mihaly Balazs x_at_y_or_z at yahoo.com
Fri May 20 15:27:52 CEST 2011

Hello everyone,

I'm playing around with ZMQ + Java and I've run into a couple of 
problems. The test program which I use is attached [1]. What I try to do:
- start a published and a subscriber on a IPC transport (ipc://zeromq_test)
- publish a message on this transport and ensure that I receive it back
- stop the transport

However I've run into several problems (which I suspect are caused by 
me, since I'm a ZMQ noob):
- some times I get the message: "Assertion failed: nbytes == sizeof 
(command_t) (mailbox.cpp:245)" [4] - I found a discussion related to 
this from last year [3], however it's not clear to me what the problem 
is or how I should resolve it. Is this a bug or am I making a mistake?
- some times the termination thread hangs. I've attached a gdb stack 
trace [2] with the termination thread. From it, if I read correctly, it 
hangs in mailbox.cpp:204, which is in recv (which has the blocking 
parameter set to true). Again, am I incorrectly terminating or is there 
a bug?

Additional information:
- Ubuntu 11.04 32 bit system
- zeromq 2.1.7 stable downloaded from the site and built from source
- jzmq checked out from GIT and built from source

Thank you for your time

Best regards,
Attila Balazs

[1] TestJZMQ.java, attached
[2] gdb.txt, attached
[4] https://github.com/zeromq/libzmq/blob/master/src/mailbox.cpp#L245
[5] https://github.com/zeromq/libzmq/blob/master/src/mailbox.cpp#L204
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestJZMQ.java
Type: text/x-java
Size: 3380 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110520/01ce378c/attachment.java>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gdb.txt
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110520/01ce378c/attachment.txt>

More information about the zeromq-dev mailing list