[zeromq-dev] Signaler.cpp hangs on windows intermittently

Pau pau at teleopsia.com
Tue Mar 19 20:45:25 CET 2013


I had this problem some weeks ago. This was my problem:

I do not know all possible reasons to generate a fatal wsa_assert(..)
but there is at least one:

I have seen that in XP it is possible that line 301  rc = connect (*w_,
(sockaddr *) &addr, sizeof (addr)); returns an error when a socket tries
to connect to 5905 and this has happened many times.
Windows uses port numbers starting near 1400 and XP has a limit at 5000.
In W7 this does not look as a problem because maximum is 65000
It sounds as if the number was big enough but apart from the fact that
ZMQ uses a big number of connections (at least in my tests) I have
experienced that Windows jumps port numbers by 7, so 5000 happens
sometimes with catastrophic consequences.

Perhaps there are other reasons (actually this problem does not happen 
like that in W7) anyway whatever crashes between

HANDLE sync = CreateEvent (NULL, FALSE, TRUE, TEXT
SetEvent (sync);

will leave the event signaled and any other application in the system 
will hang. Closing all apps in a system fixes it.

KIU Shueng Chuan submitted a patch that sets the event when crash 
avoiding other applications to ge hanged:


That worked for me...

If you search for "zmq-signaler-port-sync" in previous mails in this 
list you will see the complete thread.



El 19/03/2013 17:18, Felipe Farinon escribió:
> Hi,
> The code
> HANDLE sync = CreateEvent (&sa, FALSE, TRUE, TEXT
> ("Global\\zmq-signaler-port-sync"));
> in signaler.cpp:262 hangs intermittently when starting zeromq context
> through zmq_init in my application. I'm not able to reproduce this bug
> with a minimal test case. I'm running my application in a Windows 7 with
> zeromq compiled with VS2010.
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list