[zeromq-dev] zeromq 3.2 tests fails

Sebastian Lauwers sebastian.lauwers at gmail.com
Mon Jul 30 08:44:33 CEST 2012


On 29 July 2012 12:10, Arkady Rost <arkrost at gmail.com> wrote:
> Hi!

Hi Arkady,

> I've just installed zeromq 3.2 from sources but 2 tests fails. They are
> test_monitor and test_shutdown_stress.

Could you confirm which repository/branch you are using? From the
gist, I'd say it's the zeromq 3.x repository
(https://github.com/zeromq/zeromq3-x.git). Also, could you indicate at
what position your HEAD is?

I've not been able to reproduce the segfault problem using the latest
HEAD (d3518eafe4b58c0d7606ef0d9035df3ec52c22d4), however, the
test_monitor does indeed fail.

git bisect shows that the regression might be introduced by commit
38a0710b89b7bfe81f7250c5e9a96e024cfabe62 (Fixed issue #399
socket_monitor test, fromXMbIPEK <welcome.jet at gmail.com>). However, I
don't think this commit is the actual origin.

>From what I can tell, the issue[1] comes from the call to
monitor_event() in zmq::stream_engine_t::error ()
(stream_engine.cpp:277), which is the following line:
    session->monitor_event (ZMQ_EVENT_DISCONNECTED, endpoint.c_str(), s);

The problem is that endpoint is an empty string (checked with dbg).
Normally, this `endpoint' variable is set by the call to get_address()
on line 119 of stream_engine.cpp, but just for the sake of testing, I
added a variable to grab the return value, and asserted it:
    int rc = session->get_address (endpoint);
	assert(rc == 0);

When I did this, and ran the unit tests again, half of them failed (9
out of 18). I double checked the "normal" return value of
get_address() (and hence, tcp_address_t::to_string()) in case it
wasn't supposed to be 0, and as far as my coffee, nicotine and sleep
deprived brain can tell: Something's not quite right (c).

I'm not familiar enough with ZMQ to understand what's going on, so
I'll leave the rest to someone more experienced.

My 2c,

-S.

[1]: That is, if there is indeed an issue, and not simply a borked test.



More information about the zeromq-dev mailing list