GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — Bug: fix IPC named lock client-side robustness for Windows by gnodet · Pull Request #1910 · apache/maven-resolver Conversation
Contributor
SummaryFixes Windows CI flakiness in Root cause: When the loser thread's
Changes
Test plan
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsWhen lock acquisition times out in IpcNamedLock, the cleanup call to client.unlock() could either hang forever (Long.MAX_VALUE timeout) or throw RuntimeException. On Windows, where IPC socket behavior can differ, this causes test threads to either block indefinitely or crash without signaling their CountDownLatch, making the test appear to hang. Four changes: 1. IpcNamedLock: wrap cleanup unlock in try-catch (tryUnlock) so that a failure during timeout handling returns false instead of crashing the calling thread. This is the primary fix for the exclusiveAccess test hang on Windows. 2. IpcClient.unlock/stopServer: replace Long.MAX_VALUE timeouts with bounded values (10s/30s) so operations fail fast when the server is unresponsive. 3. IpcClient.receive: complete the future exceptionally on empty responses instead of throwing, which would kill the receiver thread and break all subsequent operations on the shared client. 4. IpcClient.close: properly call close() on EOF to clean up pending futures, and reset the initialized flag to prevent stale state.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. The send() method read the `output` field multiple times without holding the same lock as close(Throwable), which nulls it under synchronized(this). Between ensureInitialized() returning and reaching synchronized(output), the receiver thread could close the connection and null out the field, causing a NullPointerException at output.flush(). Fix by capturing the output field in a local variable immediately after ensureInitialized(), checking for null, and using the local throughout the synchronized block.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
cstamas
approved these changes
Uh oh!
There was an error while loading. Please reload this page.
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers
Copilot code review
Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Uh oh!
There was an error while loading. Please reload this page. AssigneesLabels
bug
ProjectsDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. | ||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |