[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 
<http://gnu.org/licenses/gpl.html>
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:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from 
/home/slau/src/foss/zeromq3-x/tests/.libs/lt-test_shutdown_stress...done.

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 
`/home/slau/src/foss/zeromq3-x/tests/.libs/lt-test_shutdown_stress'.
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 
io_thread.cpp:82
#12 0x00002b27272c7fde in zmq::epoll_t::loop (this=0x23f4380) at 
epoll.cpp:161
#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 
pthread_create.c:304
#16 0x00002b272781c59d in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#17 0x0000000000000000 in ?? ()
(gdb)

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

Also, note that this is the same segfault that Arkady Rost reported back 
in July:
http://lists.zeromq.org/pipermail/zeromq-dev/2012-July/017911.html

However, only the segfault in test_monitor, was fixed:
http://lists.zeromq.org/pipermail/zeromq-dev/2012-August/017985.html

HTH,

-S.



More information about the zeromq-dev mailing list