-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
ZeroTier one may be leaking sockets #597
Comments
It really should not use that many sockets. What does |
Let me check. Reinstalling it now, may have to wait a day or two to see what happens. |
After running for a few hours, lsof seems to show a bunch of these stacking up:
Full output (from the VPS):
From a different machine (laptop):
And from a 3rd machine (home server), which does not appear to be leaking sockets:
Everything is running 1.2.4, as reported by my.zerotier.com. |
It would be good to see in what state the sockets are. Perhaps they are not cleaned up by the OS. E.g. netstat -aA inet |
Today it's up to file descriptor 337. Still hasn't hit the limit yet, but it's getting there. The 'leaked' sockets do not appear in netstat -aA inet (there are far less than 300 entries in that list, anyway) |
It looks as if it's building up UDP sockets, but the "can't identify protocol" descriptions make me wonder. In any case I think we'll take a look at the possibility of UDP sockets not being closed. |
…losenatpmp() after failure to init
I suspect it might have to do with our usage of libnatpmp. I've committed a patch to make sure the socket that libnatpmp opens upon initialization is closed in the event of failure. Try pulling latest |
Closing since I think this is fixed in |
I recently installed ZeroTier One on a VPS that's running under OpenVZ. Shortly after, the server started ending up in an unusable state - fastcgi and sshd complaining about not being able to open sockets:
and
I ended up leaving a mosh session open with a root shell running (I tried without a root shell running, but PAM was failing and preventing console logins, sudo, and su) and I finally traced the issue back to a limit issue. Apparently the instance has a limit 'numothersock' of 500, with all 500 used. Upon killing zerotier-one, the number dropped to 70. I presume that zerotier-one doesn't need 430 sockets open at once with a network with less than 10 nodes, so my conclusion is that zerotier-one may be leaking sockets.
The text was updated successfully, but these errors were encountered: