[zeromq-dev] Threads & socket_monitor

Eric Robert eric at datacratic.com
Thu Feb 21 23:05:13 CET 2013


Sorry for that.

I was under the impression that it reproduced my test case so I didn't
noticed I missed something so basic.

Here is a (better) test reproducing the issue I has originally.
http://paste.ubuntu.com/1702016/

You need to run it multiple time as this look very much like a race
condition.
When it hangs, this is the stack:

#0  0x00007fb053a6a303 in __GI___poll (fds=<optimized out>, nfds=<optimized
out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fb054281d52 in zmq::signaler_t::wait (this=<optimized out>,
timeout_=<optimized out>) at signaler.cpp:145
#2  0x00007fb054277afa in zmq::mailbox_t::recv (this=0x21760a8,
cmd_=0x7fff103bfc00, timeout_=<optimized out>) at mailbox.cpp:69
#3  0x00007fb05426fefb in zmq::ctx_t::terminate (this=0x2176010) at
ctx.cpp:112
#4  0x0000000000400dae in main () at test_monitor.cpp:67

Thanks again!


Éric

On Thu, Feb 21, 2013 at 10:28 AM, Pieter Hintjens <ph at imatix.com> wrote:

> You're not connecting the REQ socket:
>
>     rc = zmq_connect (req, "tcp://127.0.0.1:5560");
>
> -Pieter
>
> On Wed, Feb 20, 2013 at 6:45 PM, Eric Robert <eric at datacratic.com> wrote:
> > There you go :)
> > http://paste.ubuntu.com/1691357/
> >
> >
> > Éric
> >
> >
> > On Wed, Feb 20, 2013 at 12:33 PM, Pieter Hintjens <ph at imatix.com> wrote:
> >>
> >> Eric.
> >>
> >> Could you make a minimal test case perhaps, stripping out every line
> >> that isn't actually needed to reproduce the case? Thanks.
> >>
> >> -Pieter
> >>
> >> On Wed, Feb 20, 2013 at 6:16 PM, Eric Robert <eric at datacratic.com>
> wrote:
> >> > Hi,
> >> >
> >> > My first posting on zeromq :)
> >> >
> >> > I am trying to debug a situation where the socket and its monitor are
> >> > created and used on the same thread. It seems to stay stuck when I
> send
> >> > something on the monitored socket. Is that expected?
> >> >
> >> > I reproduced the situation (see req3 and sm3) inside the test_monitor
> >> > here:
> >> > http://paste.ubuntu.com/1691261/
> >> >
> >> >
> >> > Thanks!
> >> >
> >> >
> >> > Éric
> >> >
> >> > _______________________________________________
> >> > zeromq-dev mailing list
> >> > zeromq-dev at lists.zeromq.org
> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >> >
> >> _______________________________________________
> >> zeromq-dev mailing list
> >> zeromq-dev at lists.zeromq.org
> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> >
> >
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> _______________________________________________
> 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/20130221/54736b5f/attachment.html>


More information about the zeromq-dev mailing list