-
Notifications
You must be signed in to change notification settings - Fork 29
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
remove the risk of file descriptor reuse from arping #17
Open
JacobTanenbaum
wants to merge
1
commit into
j-keck:master
Choose a base branch
from
JacobTanenbaum:threading
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JacobTanenbaum
force-pushed
the
threading
branch
from
February 1, 2024 17:10
586e13f
to
b972757
Compare
JacobTanenbaum
added a commit
to JacobTanenbaum/ovn-kubernetes
that referenced
this pull request
Feb 1, 2024
here is the PR for the upstream version j-keck/arping#17 ' using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read from it and cause the goroutine to deadlock. Additionally removing the timeout from the select case because that will/cannot work as intended. In linux close() does not cause system calls using the socket to return. This contributes to the file descriptor reuse issue mentioned above and with the defered sock.deinitialize() can lead to double closing the socket. ' Signed-off-by: Jacob Tanenbaum <[email protected]>
JacobTanenbaum
added a commit
to JacobTanenbaum/ovn-kubernetes
that referenced
this pull request
Feb 1, 2024
here is the PR for the upstream version j-keck/arping#17 ' using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read from it and cause the goroutine to deadlock. Additionally removing the timeout from the select case because that will/cannot work as intended. In linux close() does not cause system calls using the socket to return. This contributes to the file descriptor reuse issue mentioned above and with the defered sock.deinitialize() can lead to double closing the socket. ' Signed-off-by: Jacob Tanenbaum <[email protected]>
JacobTanenbaum
force-pushed
the
threading
branch
2 times, most recently
from
February 2, 2024 19:52
4e0d3e8
to
71d47a2
Compare
JacobTanenbaum
added a commit
to JacobTanenbaum/ovn-kubernetes
that referenced
this pull request
Feb 2, 2024
here is the PR for the upstream version j-keck/arping#17 ' using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read from it and cause the goroutine to deadlock. removing the sock.deinitialize() from the timeout select case as it will be taken care of by the goroutine upon its return' Signed-off-by: Jacob Tanenbaum <[email protected]>
using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read from it and cause the goroutine to deadlock. removing the sock.deinitialize() from the timeout select case as it will be taken care of by the goroutine upon its return Signed-off-by: Jacob Tanenbaum <[email protected]>
JacobTanenbaum
force-pushed
the
threading
branch
from
February 9, 2024 15:24
71d47a2
to
3987db8
Compare
JacobTanenbaum
added a commit
to JacobTanenbaum/ovn-kubernetes
that referenced
this pull request
Feb 9, 2024
here is the PR for the upstream version j-keck/arping#17 ' using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read from it and cause the goroutine to deadlock. removing the sock.deinitialize() from the timeout select case as it will be taken care of by the goroutine upon its return' Signed-off-by: Jacob Tanenbaum <[email protected]>
JacobTanenbaum
added a commit
to JacobTanenbaum/ovn-kubernetes
that referenced
this pull request
Feb 9, 2024
here is the PR for the upstream version j-keck/arping#17 ' using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read from it and cause the goroutine to deadlock. removing the sock.deinitialize() from the timeout select case as it will be taken care of by the goroutine upon its return' Signed-off-by: Jacob Tanenbaum <[email protected]>
jcaamano
pushed a commit
to ovn-kubernetes/ovn-kubernetes
that referenced
this pull request
Feb 9, 2024
here is the PR for the upstream version j-keck/arping#17 ' using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read from it and cause the goroutine to deadlock. removing the sock.deinitialize() from the timeout select case as it will be taken care of by the goroutine upon its return' Signed-off-by: Jacob Tanenbaum <[email protected]>
Fix included in accepted release 4.16.0-0.nightly-2024-02-17-013806 |
JacobTanenbaum
added a commit
to JacobTanenbaum/ovn-kubernetes-1
that referenced
this pull request
Apr 1, 2024
here is the PR for the upstream version j-keck/arping#17 ' using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read from it and cause the goroutine to deadlock. removing the sock.deinitialize() from the timeout select case as it will be taken care of by the goroutine upon its return' Signed-off-by: Jacob Tanenbaum <[email protected]>
JacobTanenbaum
added a commit
to JacobTanenbaum/ovn-kubernetes-1
that referenced
this pull request
May 15, 2024
here is the PR for the upstream version j-keck/arping#17 ' using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read from it and cause the goroutine to deadlock. removing the sock.deinitialize() from the timeout select case as it will be taken care of by the goroutine upon its return' Signed-off-by: Jacob Tanenbaum <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read from it and cause the goroutine to deadlock.
removing the sock.deinitialize() from the timeout select case as it will be taken care of by the goroutine upon its return