thesamet / rpcz

RPC implementation for Protocol Buffers over ZeroMQ
http://code.google.com/p/rpcz/
Apache License 2.0
111 stars 42 forks source link

Intermittent crash in rpcz::sync_event::signal() #12

Open phamelin opened 8 years ago

phamelin commented 8 years ago

Hello,

I have an intermittent crash in rpcz::sync_event::signal(). Unfortunately, I'm not able right now to provide a way to reproduce the problem since it happens very rarely. Here is the backtrace:

what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xa8fffb40 (LWP 22450)]
0xb7fdd424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fdd424 in __kernel_vsyscall ()
#1  0xb6655607 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#2  0xb6658a33 in __GI_abort () at abort.c:89
#3  0xb6885405 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#4  0xb6883063 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#5  0xb688309f in std::terminate() () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#6  0xb6883306 in __cxa_throw () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#7  0xb69ff97b in void boost::throw_exception<boost::lock_error>(boost::lock_error const&) () from /usr/lib/librpcz.so
#8  0xb6a08f62 in rpcz::sync_event::signal() () from /usr/lib/librpcz.so
#9  0xb6a06d79 in rpcz::rpc_channel_impl::handle_client_response(rpcz::rpc_response_context, rpcz::connection_manager::status, rpcz::message_iterator&) ()
   from /usr/lib/librpcz.so
#10 0xb6a0739f in boost::detail::function::void_function_obj_invoker2<boost::_bi::bind_t<void, boost::_mfi::mf3<void, rpcz::rpc_channel_impl, rpcz::rpc_response_context, rpcz::connection_manager::status, rpcz::message_iterator&>, boost::_bi::list4<boost::_bi::value<rpcz::rpc_channel_impl*>, boost::_bi::value<rpcz::rpc_response_context>, boost::arg<1>, boost::arg<2> > >, void, rpcz::connection_manager::status, rpcz::message_iterator&>::invoke(boost::detail::function::function_buffer&, rpcz::connection_manager::status, rpcz::message_iterator&) () from /usr/lib/librpcz.so
#11 0xb69fb718 in rpcz::worker_thread(rpcz::connection_manager*, zmq::context_t*, std::string) () from /usr/lib/librpcz.so
#12 0xb69fcd4b in boost::detail::thread_data<boost::_bi::bind_t<void, void (*)(rpcz::connection_manager*, zmq::context_t*, std::string), boost::_bi::list3<boost::_bi::value<rpcz::connection_manager*>, boost::_bi::value<zmq::context_t*>, boost::_bi::value<std::string> > > >::run() () from /usr/lib/librpcz.so
#13 0xb4084681 in ?? () from /usr/lib/i386-linux-gnu/libboost_thread.so.1.54.0
#14 0xb740ef70 in start_thread (arg=0xa8fffb40) at pthread_create.c:312
#15 0xb6712bee in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

It reminds me this issue:

https://code.google.com/p/rpcz/issues/detail?id=10

but it has been solved a long time ago.