[zeromq-dev] PATCH: zmq::signaler_t should not assert on EINTR
Martin Lucina
mato at kotelna.sk
Thu Aug 5 23:43:38 CEST 2010
sustrik at 250bpm.com said:
> Mato,
>
> The fix looks OK IMO.
Ok, committed.
>
> > Now there is one thing left which is that when my application handles
> > SIGINT and attempts to correctly close all sockets and do a zmq_term(), I
> > occasionally get the following assertion during the close():
> >
> > Assertion failed: !more || pipes [current] != pipe_ (lb.cpp:48)
> >
> > I'm assuming that this happens becase the socket that is being closed had
> > been left by the application in a bogus state where it started sending a
> > multipart message but did not finish it. Martin, is this correct?
>
> Yes. That seems to be the case. It should be handled decently, but I'm
> now in process of rewriting thread migration & shutdown code. I have
> 10,000 lines of codes in my short-term memory and can't look at anything
> else the whole cache gets garbled :(
Fair enough, I'm just noting the problem because it'll have to be solved
just as much in your new version; the underlying case (closing a socket
which is in the middle of sending a multipart message) is perfectly
legitimate and the partly sent message should just be thrown out.
-mato
More information about the zeromq-dev
mailing list