remove the risk of file descriptor reuse from arping#17
Open
JacobTanenbaum wants to merge 1 commit intoj-keck:masterfrom
Open
remove the risk of file descriptor reuse from arping#17JacobTanenbaum wants to merge 1 commit intoj-keck:masterfrom
JacobTanenbaum wants to merge 1 commit intoj-keck:masterfrom
Conversation
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 <jtanenba@redhat.com>
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 <jtanenba@redhat.com>
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 <jtanenba@redhat.com>
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 <jtanenba@redhat.com>
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 <jtanenba@redhat.com>
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 <jtanenba@redhat.com>
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 <jtanenba@redhat.com>
|
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 <jtanenba@redhat.com>
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 <jtanenba@redhat.com>
This file contains hidden or 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
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