[zeromq-dev] Mac OS X: test_shutdown_stress sometimes fails
Dhammika Pathirana
dhammika at gmail.com
Sun Nov 7 18:37:41 CET 2010
On Wed, Nov 3, 2010 at 1:12 PM, Christian Gudrian <christian at gudrian.org> wrote:
>
> Am 03.11.2010 um 16:04 schrieb Dhammika Pathirana:
>
>> ok, can you post mac crash log?
>
> Attached is a crash log for the "Invalid argument error". Thanks for having a look.
>
> Christian
>
This is in zmq master branch right?
I think we have a nasty race condition here, and I don't think it's
mac specific.
Thread 5:
0 libSystem.B.dylib 0x00007fff83e8adba sendto + 10
1 libzmq.0.dylib 0x0000000100020dd7
zmq::signaler_t::send(zmq::command_t const&) + 41 (signaler.cpp:290)
2 libzmq.0.dylib 0x0000000100003fed
zmq::ctx_t::send_command(unsigned int, zmq::command_t const&) + 53
(ctx.cpp:222)
3 libzmq.0.dylib 0x0000000100011571
zmq::object_t::send_command(zmq::command_t&) + 47 (object.cpp:408)
4 libzmq.0.dylib 0x0000000100011612
zmq::object_t::send_term_req(zmq::own_t*, zmq::own_t*) + 56
(object.cpp:313)
5 libzmq.0.dylib 0x00000001000137c9
zmq::own_t::terminate() + 93 (own.cpp:153)
6 libzmq.0.dylib 0x000000010003059b
zmq::zmq_init_t::finalise_initialisation() + 173 (zmq_init.cpp:150)
7 libzmq.0.dylib 0x0000000100030cbe
zmq::zmq_init_t::read(zmq_msg_t*) + 216 (zmq_init.cpp:71)
8 libzmq.0.dylib 0x0000000100009984
zmq::encoder_t::message_ready() + 74 (encoder.cpp:61)
9 libzmq.0.dylib 0x000000010002ff55
zmq::encoder_base_t<zmq::encoder_t>::get_data(unsigned char**,
unsigned long*, int*) + 245 (encoder.hpp:79)
10 libzmq.0.dylib 0x000000010002efea
zmq::zmq_engine_t::out_event() + 86 (zmq_engine.cpp:157)
11 libzmq.0.dylib 0x000000010000d51c
zmq::kqueue_t::loop() + 566 (kqueue.cpp:172)
12 libzmq.0.dylib 0x000000010000d611
zmq::kqueue_t::worker_routine(void*) + 21 (kqueue.cpp:189)
13 libzmq.0.dylib 0x00000001000284bc
zmq::thread_t::thread_routine(void*) + 228 (thread.cpp:80)
14 libSystem.B.dylib 0x00007fff83e80456 _pthread_start + 331
15 libSystem.B.dylib 0x00007fff83e80309 thread_start + 13
zmq_init_t::finalise_initialization() sends attach command to the session.
But session::process_attach() can delete this engine, while it's still
in use in io_thread out_event() callback.
Both session setup and tear down are quite complicated, not sure
what's the best way to fix this.
Dhammika
More information about the zeromq-dev
mailing list