[zeromq-dev] Assertion failed on invalid arguments

Ori Barak oribarak at microsoft.com
Tue Jun 2 14:53:05 CEST 2015


Thanks for the fast replay Pieter,

If this is an error coming from the setsockopt call then it might be related to our reconnect mechanism that creates a new socket every 3 seconds and try to set the options on it.

Our reconnect cycle looks pretty much like this:

socket.disconnect
socket.close

socket = new socket()

socket. Setsockopt(SNDBUF)
socket. Setsockopt(SNDHWM)
socket. Setsockopt(LINGER)

socket.connect(endpoint)

As I mentioned this cycle repeats every 3 seconds and we see process crashes every couple of minutes.

Is this design valid or can this set of repeating operation might cause crashes?

Thanks,
Ori

-----Original Message-----
From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Pieter Hintjens
Sent: Tuesday, June 2, 2015 11:15 AM
To: ZeroMQ development list
Subject: Re: [zeromq-dev] Assertion failed on invalid arguments

Looks like an error in the Windows code, getting WSAEINVAL on that setsockopt call.

We'd have to find out what the actual cause it; perhaps you can patch your code to print the arguments sent to the setsockopt call, when such an error happens.

Simply ignoring the error is also possible yet that would probably lead to inconsistent behavior and lost messages. It's better to be sure of what's going on here.

-Pieter

On Tue, Jun 2, 2015 at 9:45 AM, Ori Barak <oribarak at microsoft.com> wrote:
> Hi,
>
>
>
> We have two production services which uses ZMQ push pull sockets to 
> communicate.
>
> We used ZMQ 3.2.3 and clrzmq running on windows server 2012 for a 
> while and as the traffic increased and perhaps the hosting environment 
> has changed (OS version changes and networking topology) we started 
> noticing that the sending process is crashing from time to time (Every 
> couple of minutes)
>
>
>
> I upgraded ZMQ to the latest stable version (4.1.0.15) and switched to 
> use
> clrzmq4 but I’m still seeing the same crashes as before.
>
>
>
> The properties we set on the push sockets are: BufferSize: Int.max,
> HighWatermark: 10000000, Linger: 1 sec
>
> Also since the sender is connected to a load balancer we manually 
> reconnecting the sockets every 3 seconds to get a health receiver machine.
>
>
>
> The process crashes silently and the error message printed is: 
> Assertion
> failed: Invalid argument (..\..\..\..\src\tcp.cpp:48)
>
> When looking at the event viewer I see this error:
>
>
>
> Faulting module name: KERNELBASE.dll, version: 6.2.9200.16864, time stamp:
> 0x531d34d8
>
> Exception code: 0x40000015
>
> Fault offset: 0x0000000000047b8c
>
> Faulting process id: 0xa88
>
> Faulting application start time: 0x01d09cf8127ac087
>
> Faulting module path: C:\Windows\system32\KERNELBASE.dll
>
> Report Id: ab433e69-08ec-11e5-93f6-008cfa0438b3
>
> Faulting package full name:
>
> Faulting package-relative application ID:
>
>
>
> I saw that there are some known issue on ‘Assertion failed: Invalid 
> arguments’ at  https://zeromq.jira.com/browse/LIBZMQ-207 and
> https://zeromq.jira.com/browse/LIBZMQ-526
>
> But they are both seem to be closed as fixed.
>
>
>
> Any idea how I can further investigate the problem?
>
>
>
> Thanks,
>
> Ori
>
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
_______________________________________________
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