qorelanguage / qore

Qore Programming Language
GNU General Public License v2.0
60 stars 10 forks source link

module-zmq: crash in internal ZMQ function #3232

Open davidnich opened 5 years ago

davidnich commented 5 years ago

with libzmq 4.2.3:

Crashed Thread:        183  qore/1845

Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0:
--> 
    __TEXT                 000000010f512000-000000010f6a1000 [ 1596K] r-x/rwx SM=COW  /Users/USER/*

Application Specific Information:
abort() called

Thread 183 Crashed:: qore/1845
0   libsystem_kernel.dylib              0x00007fff5f8fb23e __pthread_kill + 10
1   libsystem_pthread.dylib             0x00007fff5f9b1c1c pthread_kill + 285
2   libsystem_c.dylib                   0x00007fff5f8641c9 abort + 127
3   libjvm.dylib                        0x0000000119cd3101 os::abort(bool) + 25
4   libjvm.dylib                        0x0000000119dfb4a2 VMError::report_and_die() + 2304
5   libjvm.dylib                        0x0000000119cd4d46 JVM_handle_bsd_signal + 1131
6   libjvm.dylib                        0x0000000119cd0f8b signalHandler(int, __siginfo*, void*) + 47
7   libsystem_platform.dylib            0x00007fff5f9a6b3d _sigtramp + 29
8   ???                                 0x0000000011a556d0 0 + 296048336
9   libzmq.5.dylib                      0x00000001129d736d zmq::socket_base_t::attach_pipe(zmq::pipe_t*, bool) + 141 (socket_base.cpp:346)
10  libzmq.5.dylib                      0x00000001129bdb89 zmq::object_t::process_command(zmq::command_t&) + 169
11  libzmq.5.dylib                      0x00000001129a3a2b zmq::ctx_t::connect_inproc_sockets(zmq::socket_base_t*, zmq::options_t&, zmq::ctx_t::pending_connection_t const&, zmq::ctx_t::side) + 507 (ctx.cpp:596)
12  libzmq.5.dylib                      0x00000001129a3d4c zmq::ctx_t::connect_pending(char const*, zmq::socket_base_t*) + 444 (string:1255)
13  libzmq.5.dylib                      0x00000001129d82e2 zmq::socket_base_t::bind(char const*) + 1058 (socket_base.cpp:539)
14  libzmq.5.dylib                      0x00000001129a13dc zmq::ctx_t::terminate() + 316 (ctx.cpp:144)
15  libzmq.5.dylib                      0x00000001129f4483 zmq_ctx_term + 51 (zmq.cpp:175)
16  zmq-api-0.22.qmod                   0x0000000112971279 QoreZContext::~QoreZContext() + 41
17  libqore.6.dylib                     0x000000010f86b9bd QoreObject::defaultSystemDestructor(unsigned int, ExceptionSink*) + 141 (QoreObject.cpp:1507)
18  libqore.6.dylib                     0x000000010f86b876 qore_class_private::execDestructor(QoreObject*, ExceptionSink*) const + 342 (QoreClass.cpp:3411)
19  libqore.6.dylib                     0x000000010f86b718 QoreClass::execDestructor(QoreObject*, ExceptionSink*) const + 40 (QoreClass.cpp:3387)
20  libqore.6.dylib                     0x000000010f9d109c qore_object_private::doDeleteIntern(ExceptionSink*) + 332 (QoreObjectIntern.h:398)
21  libqore.6.dylib                     0x000000010f9d0dbf qore_object_private::customDeref(bool, ExceptionSink*) + 2943
22  libqore.6.dylib                     0x000000010f9d35f5 QoreObject::customDeref(ExceptionSink*) + 37 (QoreObject.cpp:1273)
23  libqore.6.dylib                     0x000000010f77dceb AbstractQoreNode::deref(ExceptionSink*) + 1115 (AbstractQoreNode.cpp:150)
24  libqore.6.dylib                     0x000000010f784a53 QoreValue::discard(ExceptionSink*) + 67 (QoreValue.cpp:406)
25  libqore.6.dylib                     0x000000010f79ff61 qore_hash_private::derefImpl(ExceptionSink*, bool) + 1009 (QoreHashNodeIntern.h:441)
26  libqore.6.dylib                     0x000000010f7a03ac qore_hash_private::clear(ExceptionSink*, bool) + 44 (QoreHashNodeIntern.h:466)
27  libqore.6.dylib                     0x000000010f7a0378 QoreHashNode::clear(ExceptionSink*, bool) + 120 (QoreHashNode.cpp:524)
28  libqore.6.dylib                     0x000000010fc027fe qore_object_private::cleanup(ExceptionSink*, QoreHashNode*, std::__1::map<char*, QoreHashNode*, lthash, std::__1::allocator<std::__1::pair<char* const, QoreHashNode*> > >*) + 206 (QoreObjectIntern.h:432)
29  libqore.6.dylib                     0x000000010f9d11c1 qore_object_private::doDeleteIntern(ExceptionSink*) + 625 (QoreObjectIntern.h:419)
30  libqore.6.dylib                     0x000000010f9d0dbf qore_object_private::customDeref(bool, ExceptionSink*) + 2943
31  libqore.6.dylib                     0x000000010f9d35f5 QoreObject::customDeref(ExceptionSink*) + 37 (QoreObject.cpp:1273)
32  libqore.6.dylib                     0x000000010f77dceb AbstractQoreNode::deref(ExceptionSink*) + 1115 (AbstractQoreNode.cpp:150)
33  libqore.6.dylib                     0x000000010f784a53 QoreValue::discard(ExceptionSink*) + 67 (QoreValue.cpp:406)
34  libqore.6.dylib                     0x000000010f79ff61 qore_hash_private::derefImpl(ExceptionSink*, bool) + 1009 (QoreHashNodeIntern.h:441)
davidnich commented 5 years ago

another crash:

Crashed Thread:        9  qore/90

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called

Thread 9 Crashed:: qore/90
0   libsystem_kernel.dylib              0x00007fff6f88d23e __pthread_kill + 10
1   libsystem_pthread.dylib             0x00007fff6f943c1c pthread_kill + 285
2   libsystem_c.dylib                   0x00007fff6f7f61c9 abort + 127
3   libzmq.5.dylib                      0x000000010e0bab99 zmq::zmq_abort(char const*) + 9
4   libzmq.5.dylib                      0x000000010e0e1850 zmq::signaler_t::signaler_t() + 32 (signaler.cpp:129)
5   libzmq.5.dylib                      0x000000010e0bfddb zmq::mailbox_t::mailbox_t() + 155 (mailbox.cpp:34)
6   libzmq.5.dylib                      0x000000010e0e2659 zmq::socket_base_t::socket_base_t(zmq::ctx_t*, unsigned int, int, bool) + 569
7   libzmq.5.dylib                      0x000000010e0b74c5 zmq::dealer_t::dealer_t(zmq::ctx_t*, unsigned int, int) + 21 (dealer.cpp:39)
8   libzmq.5.dylib                      0x000000010e0e2088 zmq::socket_base_t::create(int, zmq::ctx_t*, unsigned int, int) + 360 (socket_base.cpp:128)
9   libzmq.5.dylib                      0x000000010e0ad8bf zmq::ctx_t::create_socket(int) + 159 (ctx.cpp:386)
10  libzmq.5.dylib                      0x000000010e100699 zmq_socket + 41
11  zmq-api-0.22.qmod                   0x000000010e08490a QoreZSock::QoreZSock(QoreZContext&, int, ExceptionSink*) + 74
12  zmq-api-0.22.qmod                   0x000000010e085bff QoreZSockConnect::QoreZSockConnect(QoreZContext&, int, QoreString const*, char const*, ExceptionSink*) + 31
13  zmq-api-0.22.qmod                   0x000000010e08679e ZSocketDealer_constructor_C8ZContextNsVs(QoreObject*, QoreListNode const*, unsigned long long, ExceptionSink*) + 254
davidnich commented 5 years ago

could be related to Darwin only or to a specific version of libzmq or to the case when network interfaces disappear while ZMQ sockets are in use

davidnich commented 5 years ago

these crashes were reproduced on Linux - evaluating an upgrade to libzmq 4.3.1 which has a lot of bugfixes

davidnich commented 5 years ago

removed epheremal zmq sockets from cluster implementation - will assign a concrete release if the problem happens again