Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 3.2.2
    • Fix Version/s: None
    • Component/s: core
    • Environment:

      Linux x86_64 Mint

      Description

      Since I am using zyre library on the top of zeromq-3.2.2 STABLE I have been experiencing those painful issues with my software.
      It just breaks an assertion at startup, at random but often enough (1 out of 3 attempts)
      I have some knowledge about ZMQ, C++, etc; but maybe this bug will require some 'finesse'.

      Here are my valgrind backtraces (one for each different crash, I reload the program every time):

      [victor@Q]<~/work/projects/pubsub/shuppan/src/.libs> valgrind --leak-check=full --leak-resolution=high -v --num-callers=40 --track-origins=yes ./shuppan_sender

      Assertion failed: ok (mailbox.cpp:79)
      ==10497==
      ==10497== Process terminating with default action of signal 6 (SIGABRT)
      ==10497== at 0x5283425: raise (raise.c:64)
      ==10497== by 0x5286B8A: abort (abort.c:91)
      ==10497== by 0x58370D8: zmq::zmq_abort(char const*) (err.cpp:76)
      ==10497== by 0x583A8D9: zmq::mailbox_t::recv(zmq::command_t*, int) (mailbox.cpp:79)
      ==10497== by 0x5845A41: zmq::socket_base_t::process_commands(int, bool) (socket_base.cpp:820)
      ==10497== by 0x5845AEB: zmq::socket_base_t::send(zmq::msg_t*, int) (socket_base.cpp:613)
      ==10497== by 0x5855869: s_sendmsg(zmq::socket_base_t*, zmq_msg_t*, int) (zmq.cpp:337)
      ==10497== by 0x50464BB: zstr_sendm (zstr.c:115)
      ==10497== by 0x5611A66: zre_interface_shout (zre_interface.c:140)
      ==10497== by 0x4E338B6: shuppan_shout (shuppan.c:138)
      ==10497== by 0x4009B0: main (shuppan_sender.c:62)

      Assertion failed: ok (mailbox.cpp:79)
      ==7549==
      ==7549== Process terminating with default action of signal 6 (SIGABRT)
      ==7549== at 0x5283425: raise (raise.c:64)
      ==7549== by 0x5286B8A: abort (abort.c:91)
      ==7549== by 0x58370D8: zmq::zmq_abort(char const*) (err.cpp:76)
      ==7549== by 0x583A8D9: zmq::mailbox_t::recv(zmq::command_t*, int) (mailbox.cpp:79)
      ==7549== by 0x5845A41: zmq::socket_base_t::process_commands(int, bool) (socket_base.cpp:820)
      ==7549== by 0x5845CC2: zmq::socket_base_t::getsockopt(int, void*, unsigned long*) (socket_base.cpp:290)
      ==7549== by 0x5855F95: zmq_poll (zmq.cpp:708)
      ==7549== by 0x4E33BA5: interface_task (shuppan.c:181)
      ==7549== by 0x5046AE2: s_thread_shim (zthread.c:92)
      ==7549== by 0x5A6FE99: start_thread (pthread_create.c:308)
      ==7549== by 0x5340CBC: clone (clone.S:112)

      Assertion failed: ok (mailbox.cpp:79)
      -7685- REDIR: 0x52d7b40 (strncpy) redirected to 0x4a25610 (_vgnU_ifunc_wrapper)
      -7685- REDIR: 0x52e4190 (__strncpy_sse2_unaligned) redirected to 0x4c2c180 (strncpy)
      -7685- REDIR: 0x52d62f0 (_GI_strncmp) redirected to 0x4c2c480 (_GI_strncmp)
      -7685- REDIR: 0x52d9cd0 (_GI_stpcpy) redirected to 0x4c2de10 (_GI_stpcpy)
      ==7685==
      ==7685== Process terminating with default action of signal 6 (SIGABRT)
      ==7685== at 0x5283425: raise (raise.c:64)
      ==7685== by 0x5286B8A: abort (abort.c:91)
      ==7685== by 0x58370D8: zmq::zmq_abort(char const*) (err.cpp:76)
      ==7685== by 0x583A8D9: zmq::mailbox_t::recv(zmq::command_t*, int) (mailbox.cpp:79)
      ==7685== by 0x5845A41: zmq::socket_base_t::process_commands(int, bool) (socket_base.cpp:820)
      ==7685== by 0x5845AEB: zmq::socket_base_t::send(zmq::msg_t*, int) (socket_base.cpp:613)
      ==7685== by 0x5855869: s_sendmsg(zmq::socket_base_t*, zmq_msg_t*, int) (zmq.cpp:337)
      ==7685== by 0x50464BB: zstr_sendm (zstr.c:115)
      ==7685== by 0x5611925: zre_interface_join (zre_interface.c:100)
      ==7685== by 0x4E33767: shuppan_join (shuppan.c:113)
      ==7685== by 0x40096D: main (shuppan_sender.c:57)

      Assertion failed: ok (mailbox.cpp:79)
      ==7422== Invalid write of size 4
      ==7422== at 0x52959F2: vfprintf (vfprintf.c:246)
      ==7422== by 0x529B1A3: buffered_vfprintf (vfprintf.c:2313)
      ==7422== by 0x5295BDD: vfprintf (vfprintf.c:1316)
      ==7422== by 0x53560CA: __fprintf_chk (fprintf_chk.c:37)
      ==7422== by 0x5844BF5: zmq::signaler_t::recv() (stdio2.h:99)
      ==7422== by 0x583A7B7: zmq::mailbox_t::recv(zmq::command_t*, int) (mailbox.cpp:65)
      ==7422== by 0x5845A41: zmq::socket_base_t::process_commands(int, bool) (socket_base.cpp:820)
      ==7422== by 0x5845AEB: zmq::socket_base_t::send(zmq::msg_t*, int) (socket_base.cpp:613)
      ==7422== by 0x5855869: s_sendmsg(zmq::socket_base_t*, zmq_msg_t*, int) (zmq.cpp:337)
      ==7422== by 0x503C626: zframe_send (zframe.c:191)
      ==7422== by 0x5041336: zmsg_send (zmsg.c:134)
      ==7422== by 0x5611A7D: zre_interface_shout (zre_interface.c:141)
      ==7422== by 0x4E338B6: shuppan_shout (shuppan.c:138)
      ==7422== by 0x4009B0: main (shuppan_sender.c:62)
      ==7422== Address 0x7feffd248 is on thread 1's stack
      ==7422==

      Assertion failed: ok (mailbox.cpp:79)
      ==14181==
      ==14181== Process terminating with default action of signal 6 (SIGABRT)
      ==14181== at 0x5283425: raise (raise.c:64)
      ==14181== by 0x5286B8A: abort (abort.c:91)
      ==14181== by 0x58370D8: zmq::zmq_abort(char const*) (err.cpp:76)
      ==14181== by 0x583A8D9: zmq::mailbox_t::recv(zmq::command_t*, int) (mailbox.cpp:79)
      ==14181== by 0x5845A41: zmq::socket_base_t::process_commands(int, bool) (socket_base.cpp:820)
      ==14181== by 0x5845CC2: zmq::socket_base_t::getsockopt(int, void*, unsigned long*) (socket_base.cpp:290)
      ==14181== by 0x5855F95: zmq_poll (zmq.cpp:708)
      ==14181== by 0x4E33BA5: interface_task (shuppan.c:181)
      ==14181== by 0x5046AE2: s_thread_shim (zthread.c:92)
      ==14181== by 0x5A6FE99: start_thread (pthread_create.c:308)
      ==14181== by 0x5340CBC: clone (clone.S:112)

      As you can see, the origin of the crash changes almost each time, but always ends up with the same false assertion.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            starcheng starcheng added a comment -

            When I used the same socket in multi-threads to send data with highest frequency, the same assertion I caught with.
            I'll appreciate that anybody helps me to solve it.
            Thanks a lot!

            Show
            starcheng starcheng added a comment - When I used the same socket in multi-threads to send data with highest frequency, the same assertion I caught with. I'll appreciate that anybody helps me to solve it. Thanks a lot!

              People

              • Assignee:
                Unassigned
                Reporter:
                vperron Victor Perron
              • Votes:
                5 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: