[zeromq-dev] JeroMQ crashes application
Ivan Pechorin
ivan.pechorin at gmail.com
Wed Aug 14 01:26:45 CEST 2013
> There is a method in the class where 1) the context is retrieved, 2) a
socket created, 3) message published and 4) socket closed.
Socket close command is processed asynchronously by reaper thread, and it
seems like you don't give it enough time to release resources.
Creating/destroying a socket for each message is not a right way to use
ZeroMQ/JeroMQ.
2013/8/14 Michael Keselman <michael.keselman at gmail.com>
> I use pub/sub topology with one subscriber and one publisher (for now).
> Publisher is a java class where context is a static class variable. It is
> instantiated in the class constructor. There is a method in the class where
> 1) the context is retrieved, 2) a socket created, 3) message published and
> 4) socket closed.
>
> After ~90,000 calls of the aforementioned method, the app crashes with the
> following exception
>
> Exception in thread "Transaction1461542403" *zmq.ZError$IOException*: *
> java.io.IOException*: Unable to establish loopback connection
>
> Tue Aug 13 13:45:13 PDT 2013 at zmq.Signaler.make_fdpair(*
> Signaler.java:87*)
>
> Tue Aug 13 13:45:13 PDT 2013 at zmq.Signaler.<init>(*Signaler.java:48*
> )
>
> Tue Aug 13 13:45:13 PDT 2013 at zmq.Mailbox.<init>(*Mailbox.java:55*)
>
> Tue Aug 13 13:45:13 PDT 2013 at zmq.SocketBase.<init>(*
> SocketBase.java:92*)
>
> Tue Aug 13 13:45:13 PDT 2013 at zmq.XPub.<init>(*XPub.java:89*)
>
> Tue Aug 13 13:45:13 PDT 2013 at zmq.Pub.<init>(*Pub.java:35*)
>
> Tue Aug 13 13:45:13 PDT 2013 at zmq.SocketBase.create(*
> SocketBase.java:119*)
>
> Tue Aug 13 13:45:13 PDT 2013 at zmq.Ctx.create_socket(*Ctx.java:304*)
>
> Tue Aug 13 13:45:13 PDT 2013 at org.jeromq.ZMQ$Socket.<init>(*
> ZMQ.java:238*)
>
> Tue Aug 13 13:45:13 PDT 2013 at org.jeromq.ZMQ$Context.socket(*
> ZMQ.java:193*)
>
> .....
>
> .....
>
> .....
>
>
> It looks like a memory leak. Any suggestions how to work around or changes
> the implementation?
>
>
> Thx
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130814/79415d3b/attachment.htm>
More information about the zeromq-dev
mailing list