Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZeroMQ 4.3.3 Unix Sockets Fill Temp Folder, Prevent Login (Windows) #4086

Closed
agoeckner opened this issue Nov 17, 2020 · 3 comments
Closed

ZeroMQ 4.3.3 Unix Sockets Fill Temp Folder, Prevent Login (Windows) #4086

agoeckner opened this issue Nov 17, 2020 · 3 comments

Comments

@agoeckner
Copy link

Issue description

The temp directory, %LOCALAPPDATA%\Temp, is rapidly filled with folders containing a single "socket" file. These files are not deleted even after the ZeroMQ context is closed, causing the temp folder to fill. We believe that these are IPC sockets used for ZMQ internal communication.

Running for a long period of time (>30 minutes or so) produces so many files in the temp folder that after logging out or restarting the computer, the user will no longer be able to log in until the Temp folder has been cleared. (Windows hangs at the "Welcome" screen.) This issue knocked out 5+ development machines before it was discovered.

@sigiesec may be able to shed more light on this issue, since he appears to have worked the initial Unix sockets support for Windows.

Environment

  • libzmq version (commit hash if unreleased): 4.3.3
  • OS: Windows 10 (various builds but confirmed on v1909)

Minimal test code / Steps to reproduce the issue

  1. Create a ZMQ context in thread A, with a UDP DISH socket receiving in thread B and a UDP RADIO socket transmitting in thread C.
  2. Monitor %LOCALAPPDATA%\Temp folder usage for appearance of hexadecimal-named folders containing a "socket" file.
  3. Stop program before computer is nuked.
@agoeckner agoeckner changed the title ZeroMQ 4.3.3 IPC Sockets Fill Temp Folder, Prevent Login ZeroMQ 4.3.3 Unix Sockets Fill Temp Folder, Prevent Login Nov 17, 2020
@agoeckner agoeckner changed the title ZeroMQ 4.3.3 Unix Sockets Fill Temp Folder, Prevent Login ZeroMQ 4.3.3 Unix Sockets Fill Temp Folder, Prevent Login (Windows) Nov 17, 2020
@bluca
Copy link
Member

bluca commented Nov 17, 2020

Are you saying Windows doesn't clean the temp folders automatically? That's kinda the point of /tmp...

@agoeckner
Copy link
Author

Apparently not, or at least not quickly enough. However, this is definitely a ZMQ issue. It was creating hundreds to thousands of "socket" files per second.

@zedalaye
Copy link

zedalaye commented Jan 4, 2021

Same issue for me. Temp files are not automatically deleted on Windows.

zedalaye pushed a commit to zedalaye/libzmq that referenced this issue Jan 4, 2021
Avoid filling Temp directory with temporary files.
zedalaye pushed a commit to zedalaye/libzmq that referenced this issue Jan 4, 2021
Avoid filling Temp directory with temporary files.
@bluca bluca closed this as completed in dcb6a24 Jan 4, 2021
bluca added a commit that referenced this issue Jan 4, 2021
Cleanup socket FD after pair is established. Fix #4086
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants