Handle leak on zmq_connect for inproc addr

Description

Changing the test code of by adding a zmq_connect, the attached code leaks 2 windows file handles per second.

Environment

Windows Platform

Activity

Show:
KIU Shueng Chuan
May 10, 2013, 9:27 PM

If I move the server_sock creation and bind inside the loop, I don't observe any more leak.

This bug may not be limited to win32 as it seems to me that the leak occurs at a higher level than within signaler.cpp.

KIU Shueng Chuan
May 13, 2013, 2:00 AM

I have tested it on Linux and can confirm that a file descriptor leak occurs there too, observed by running the following command periodically:

ls /proc/$(pidof a.out)/fd | wc -w

The leak only occurs for inproc transport.
I tried adding some printfs to the library to see what was happening. A pipe_term is sent but somehow the receiving end does not get the message.
Proper cleanup does occur if the server socket also gets closed.

Dinis Rosario
May 13, 2013, 11:14 AM
Edited

Found that if I send and receive some data, the leak doesn't occur.

Dinis Rosario
December 17, 2013, 2:47 PM

This issue still occurs at 4.0.3. It is now tracked at github: https://github.com/zeromq/libzmq/issues/792

Incomplete

Assignee

Unassigned

Reporter

Dinis Rosario

Labels

Components

Affects versions

Priority

Major