[zeromq-dev] zeromq3-x test failing

Sebastian Lauwers sebastian.lauwers at gmail.com
Wed Aug 22 10:50:13 CEST 2012

On 22/08/12 02:55, Mike Chesnut wrote:
> I'm trying to build from the latest git head of zeromq3-x.  When it
> gets to running 'make check', 1 of the 18 tests (test_shutdown_stress)
> fails with a segfault.

Indeed, I've noticed this behaviour as well, but assumed it was my 
compiler doing crazy things. I'm running a development version of clang.

The reason I thought so is because the issue is only reproducible when 
running with optimisations activated (-O1 or above, no -O flag or -O0 
works fine). This is the output of GDB with optimisations activated (-O1 
for no particular reason):

$ gdb tests/.libs/lt-test_shutdown_stress tests/core
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from 

warning: core file may not match specified executable file.
[New LWP 3315]
[New LWP 3334]
[New LWP 3316]
[New LWP 3318]
[New LWP 3317]
[New LWP 3313]
[New LWP 3312]
[New LWP 3319]
[New LWP 3293]
[New LWP 3331]
[New LWP 3314]
[New LWP 3332]
[New LWP 3328]
[New LWP 3327]
[New LWP 3333]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Core was generated by 
Program terminated with signal 11, Segmentation fault.
#0  0x00002b2727ad53b8 in main_arena () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00002b2727ad53b8 in main_arena () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00002b27272c2db2 in zmq::ctx_t::monitor_event 
(this=0x2b2727ad5218, socket_=0x23f8260, event_=256, args_=<optimized 
out>) at ctx.cpp:405
#2  0x00002b27272d6544 in zmq::socket_base_t::monitor_event 
(this=0x23f8260, event_=256, args=0x2b2728c89fd8) at socket_base.cpp:1006
#3  0x00002b27272d47b6 in zmq::session_base_t::monitor_event 
(this=<optimized out>, event_=<optimized out>) at session_base.cpp:272
#4  0x00002b27272dc3df in zmq::tcp_connecter_t::close 
(this=0x2b272c001ef0) at tcp_connecter.cpp:291
#5  0x00002b27272dc776 in zmq::tcp_connecter_t::~tcp_connecter_t 
(this=0x2b272c001ef0, __in_chrg=<optimized out>) at tcp_connecter.cpp:77
#6  0x00002b27272dc815 in zmq::tcp_connecter_t::~tcp_connecter_t 
(this=0x2b272c001ef0, __in_chrg=<optimized out>) at tcp_connecter.cpp:78
#7  0x00002b27272cf38f in zmq::own_t::process_destroy (this=<optimized 
out>) at own.cpp:204
#8  0x00002b27272cf9b1 in zmq::own_t::check_term_acks 
(this=0x2b272c001ef0) at own.cpp:198
#9  0x00002b27272cfb1d in zmq::own_t::process_term (this=0x2b272c001ef0, 
linger_=0) at own.cpp:162
#10 0x00002b27272cdde7 in zmq::object_t::process_command 
(this=0x2b272c001ef0, cmd_=<optimized out>) at object.cpp:112
#11 0x00002b27272c8cc9 in zmq::io_thread_t::in_event (this=0x23f4110) at 
#12 0x00002b27272c7fde in zmq::epoll_t::loop (this=0x23f4380) at 
#13 0x00002b27272c8031 in zmq::epoll_t::worker_routine (arg_=<optimized 
out>) at epoll.cpp:174
#14 0x00002b27272dd361 in thread_routine (arg_=0x23f43f0) at thread.cpp:83
#15 0x00002b2727522efc in start_thread (arg=0x2b2728c8b700) at 
#16 0x00002b272781c59d in clone () at 
#17 0x0000000000000000 in ?? ()

FYI, this is built from zeromq3-x, commit 7879cc9.

Also, note that this is the same segfault that Arkady Rost reported back 
in July:

However, only the segfault in test_monitor, was fixed:



More information about the zeromq-dev mailing list