Assertion failed: No buffer space available (tcp_socket.cpp:91) - only on Windows XP x86

Description

I get this issue on WinXP x86 SP3. Testing on Win7 x64 has never produced this problem so far.

Sorry, I'm using C# and a custom-hacked clrzmq2 binding to do my work so posting an example would be useless here, but the problem is very simple in nature.

The issue occurs on a PUB socket with a SNDHWM = 128 and a SndBuf = 1048576 * 128 * 4 (or some other ridiculously large-enough buffer size to accommodate the hwm limit). I send messages of approximately 1MB in size. I've also seen the same error on the SUB socket with a high RCVHWM, like 128. If I back down the HWM values to like 4 the error does not occur. Basically I'm just trying to send as much data as possible which will eventually be written to disk, hence the high HWMs. I want to queue all the received messages up in memory and flush to a much slower disk writer PUSH socket with its PULL on a separate thread with its own HWM.

The error is a WSAENOBUFS code returned from WinSock2's ::send() which is unhandled by the tcp_socket.cpp code near line 91.

Should I temporarily add this error code to the known error cases and have the function return -1 instead of asserting out? Will zmq recover and continue to function properly if I do this? I'm not too familiar with the zmq code base here but I'm willing to try it.

Environment

None

Status

Assignee

Unassigned

Reporter

JamesDunne

Labels

None

Priority