-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix deadlock in ForkJoinPoolHierarchicalTestExecutorService
#3981
Merged
marcphilipp
merged 23 commits into
junit-team:main
from
leonard84:leo/fix-for-join-pool-thread-deadlock
Sep 17, 2024
Merged
Fix deadlock in ForkJoinPoolHierarchicalTestExecutorService
#3981
marcphilipp
merged 23 commits into
junit-team:main
from
leonard84:leo/fix-for-join-pool-thread-deadlock
Sep 17, 2024
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
Co-authored-by: Marc Philipp <[email protected]>
leonard84
force-pushed
the
leo/fix-for-join-pool-thread-deadlock
branch
from
September 11, 2024 15:48
6da042f
to
b2922c5
Compare
The service now checks if the `ExclusiveTask` that should run is executed on a thread that is already executing another task. If this is scenario is detected, it checks if the lock is compatible to the enclosing locks. 1. If compatible, it is executed and marked done 2. If incompatible, it is added to a list of deferred tasks and left unfinished. The deferred tasks will be re-forked afterward. fixes junit-team#3945 Co-authored-by: Marc Philipp <[email protected]>
leonard84
force-pushed
the
leo/fix-for-join-pool-thread-deadlock
branch
from
September 11, 2024 16:05
b2922c5
to
d6428b8
Compare
sbrannen
changed the title
Fix deadlock in ForkJoinPoolHierarchicalTestExecutorService
Fix deadlock in Sep 13, 2024
ForkJoinPoolHierarchicalTestExecutorService
leonard84
commented
Sep 13, 2024
...latform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/LockManager.java
Outdated
Show resolved
Hide resolved
...latform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/LockManager.java
Show resolved
Hide resolved
...atform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ResourceLock.java
Outdated
Show resolved
Hide resolved
marcphilipp
approved these changes
Sep 16, 2024
leonard84
commented
Sep 16, 2024
.../junit/platform/engine/support/hierarchical/ForkJoinPoolHierarchicalTestExecutorService.java
Outdated
Show resolved
Hide resolved
.../junit/platform/engine/support/hierarchical/ForkJoinPoolHierarchicalTestExecutorService.java
Show resolved
Hide resolved
...atform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTestTask.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Leonard Brünings <[email protected]>
marcphilipp
added a commit
that referenced
this pull request
Sep 17, 2024
The service now checks if the `ExclusiveTask` that should run is executed on a thread that is already executing another task. If this is scenario is detected, it checks if the lock is compatible to the enclosing locks. 1. If compatible, it is executed and marked done 2. If incompatible, it is added to a list of deferred tasks and left unfinished. The deferred tasks will be re-forked afterwards. Fixes #3945. --------- Co-authored-by: Marc Philipp <[email protected]>
marcphilipp
pushed a commit
that referenced
this pull request
Sep 23, 2024
The service now checks if the `ExclusiveTask` that should run is executed on a thread that is already executing another task. If this is scenario is detected, it checks if the lock is compatible to the enclosing locks. 1. If compatible, it is executed and marked done 2. If incompatible, it is added to a list of deferred tasks and left unfinished. The deferred tasks will be re-forked afterwards. Fixes #3945. --------- Co-authored-by: Marc Philipp <[email protected]> (cherry picked from commit 88f8859)
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.
Overview
fixes #3945
This PR actually fixes the problem that was attempted in #3936.
That PR is still valid on its own, although it didn't fix the actual problem.
The release notes still apply for this as well.
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotations