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

Attachments

3

Activity

Show:

Dinis Rosario December 17, 2013 at 2:47 PM

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

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

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

KIU Shueng Chuan May 13, 2013 at 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.

KIU Shueng Chuan May 10, 2013 at 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.

Incomplete

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

Created May 10, 2013 at 4:18 PM
Updated December 17, 2013 at 2:47 PM
Resolved December 17, 2013 at 2:47 PM