-
Notifications
You must be signed in to change notification settings - Fork 20.1k
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
p2p/discover: UDP listener port not released when macOS firewall is enabled #18443
Comments
Fixes AugurProject/augur#261 I was also able to cause geth to quit without properly cleaning up the UDP listener socket used for p2p discovery. For this I opened a new issue ethereum/go-ethereum#18443.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Im having the same issue. System
I built with
Ran geth with
typed exit to close geth
waited a few seconds to restart the node and got
Process doesn't appear anywhere. I can force it to start by either changing the --port flag or restarting my machine. |
First reporter:
Second reporter:
Might be something with OSX? |
I could not reproduce the error with either of the situations documented on this issue. My system info:
|
This happens when the macOS firewall is enabled. We cannot fix this issue, but we could work around it by using a random, OS-assigned port by default. |
I have worked around this this way which is admittedly nuts. Remove the ethernet cable, wait for sockets to drain. |
System information
Expected behaviour
Discovery UDP listener should close socket on shutdown/interrupt in all cases.
Actual behaviour
In certain code paths, the discovery UDP listener is not closed on shutdown/interrupt, preventing geth from restarting until the port is manually released or system restarted.
I hit one of these code paths but don't have a specific repro.
Invocation that produced dangling UDP listener (light node):
Listener initialization which became dangling:
Interrupt which failed to close UDP listener:
Fatal when attempting to restart geth:
Util showing port not released:
Confirm pid
45852
doesn't exist (ie. port is unreleased after process killed; not unkilled/zombie process)The text was updated successfully, but these errors were encountered: