[zeromq-dev] zgossip_test_method crash on exit in Windows

Osiris Pedroso opedroso at gmail.com
Tue Mar 15 14:05:45 CET 2016


I am running the zgossip_test_method which can be found at the end of this
page: http://api.zeromq.org/czmq3-0:zgossip

The test runs without any problems then asserts on exit.

The code where it fails in terminate():
        //  First attempt to terminate the context.
        if (!restarted) {
            //  First send stop command to sockets so that any blocking
calls
            //  can be interrupted. If there are no sockets we can ask
reaper
            //  thread to stop.
            for (sockets_t::size_type i = 0; i != sockets.size (); i++)
*line 177 ==>     sockets [i]->stop ();*
            if (sockets.empty ())
                reaper->stop ();
        }
ends up calling send() to send the stop command:
#elif defined ZMQ_HAVE_WINDOWS
    unsigned char dummy = 0;
    int nbytes = ::send (w, (char *) &dummy, sizeof (dummy), 0);
*Line 187 ==>    wsa_assert (nbytes != SOCKET_ERROR);*
    zmq_assert (nbytes == sizeof (dummy));


And the stack:
  KernelBase.dll!_RaiseException at 16 () Unknown
> libzmq.dll!zmq::zmq_abort(const char * errmsg_) Line 81 C++
  libzmq.dll!zmq::signaler_t::send() Line 187 C++
  libzmq.dll!zmq::mailbox_t::send(const zmq::command_t & cmd_) Line 67 C++
  libzmq.dll!zmq::ctx_t::send_command(unsigned int tid_, const
zmq::command_t & command_) Line 419 C++
  libzmq.dll!zmq::object_t::send_stop() Line 202 C++
  libzmq.dll!zmq::socket_base_t::stop() Line 239 C++
  libzmq.dll!zmq::ctx_t::terminate() Line 177 C++
  libzmq.dll!zmq_ctx_term(void * ctx_) Line 173 C++
  libzmq.dll!zmq_term(void * ctx_) Line 237 C++
  libczmq.dll!zsys_shutdown() Line 253 C++
  libczmq.dll!_CRT_INIT(void * hDllHandle, unsigned long dwReason, void *
lpreserved) Line 416 C
  libczmq.dll!__DllMainCRTStartup(void * hDllHandle, unsigned long
dwReason, void * lpreserved) Line 522 C
  libczmq.dll!_DllMainCRTStartup(void * hDllHandle, unsigned long dwReason,
void * lpreserved) Line 472 C
  ntdll.dll!_LdrpCallInitRoutine at 16 () Unknown
  ntdll.dll!_LdrShutdownProcess at 0 () Unknown
  ntdll.dll!_RtlExitUserProcess at 4 () Unknown
  kernel32.dll!_ExitProcessStub at 4 () Unknown
  msvcr120d.dll!___crtExitProcess () Unknown
  msvcr120d.dll!__unlockexit () Unknown
  msvcr120d.dll!_exit () Unknown
  gossip.exe!__tmainCRTStartup() Line 662 C

Any insights appreciated.

Thanks,
Osiris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160315/85646cc5/attachment.htm>


More information about the zeromq-dev mailing list