fix: prevent indefinite blocking in IPC handshake (#405)#641
Open
Aditya-Pan-pro wants to merge 1 commit intourunc-dev:mainfrom
Open
fix: prevent indefinite blocking in IPC handshake (#405)#641Aditya-Pan-pro wants to merge 1 commit intourunc-dev:mainfrom
Aditya-Pan-pro wants to merge 1 commit intourunc-dev:mainfrom
Conversation
Signed-off-by: ADITYA PAN <adityapan.abcd@gmail.com>
✅ Deploy Preview for urunc canceled.
|
Contributor
|
The #405 issue has not been verified. Please do not open PRs for issues that have not been verified. |
Author
|
Sorry for submitting the code before the issue was officially approved. I will hold off on this PR for now. Please let me know if there are any logs or reproduction steps I can provide in issue #405 to help get it verified! |
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.
Description
This PR implements enforced timeouts and atomic I/O operations for the IPC handshake.
AwaitMessage) and a 5s backoff/retry loop for the client (SendIPCMessage) to prevent the runtime from hanging indefinitely.io.ReadFullto ensure complete message delivery and prevent partial-read bugs.net.Errortimeouts to provide clear logging during failures.Related issues
How was this tested?
Manual testing was performed on Linux Mint 22.2 using custom Go test scripts and
netcat:AwaitMessagetriggers a timeout after 10s when no connection is received.SendIPCMessageretries for 5s and fails when the socket is unavailable.netcat, confirmingio.ReadFullworks as intended.Note
I do not have the full e2e environment set up locally, so I am relying on the CI for the final integration check.
LLM usage
Assisted by Gemini 3 Flash for logic refinement, structuring the testing methodology, and drafting the technical documentation/PR description. All code was manually verified and tested locally.
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).