Skip to content

Prevent deadlock during Plexus container creation - #2217

Open
TyceHerrman wants to merge 1 commit into
eclipse-m2e:mainfrom
TyceHerrman:agent/prevent-plexus-container-creation-deadlock
Open

Prevent deadlock during Plexus container creation#2217
TyceHerrman wants to merge 1 commit into
eclipse-m2e:mainfrom
TyceHerrman:agent/prevent-plexus-container-creation-deadlock

Conversation

@TyceHerrman

Copy link
Copy Markdown

What changed

  • coordinate rooted and non-rooted Plexus container creation with per-key single-flight futures
  • create and dispose containers outside the manager lock so unrelated roots can progress independently
  • make failed creation retryable and make deactivation safely release in-flight callers
  • add concurrency, retry, cleanup, and deactivation coverage
  • force the org.eclipse.m2e.core qualifier update because the bundle version was already bumped this release cycle

Why

Container construction can enter Maven settings code while Maven settings processing can acquire a Plexus container. Holding the container cache monitor during construction creates a lock-order inversion and can deadlock Eclipse startup.

The new coordination keeps at most one creator for each Maven root without holding the manager lock across Maven/Plexus calls.

Fixes #1749.
Fixes #2008.

Verification

  • focused PlexusContainerManagerTest: 5 tests, 0 failures, 0 errors
  • unfiltered org.eclipse.m2e.core.tests: 29 tests, 0 failures, 0 errors, 1 skipped
  • full unfiltered mvn clean verify reached all 46 modules; production bundles and repository passed, but Cocoa UI test processes abort on macOS 27 beta in SwiftNativeNSArray.swift:78 with Array index out of range
  • git diff --check upstream/main...HEAD

The local CBI macOS signing attempts also return the expected nonfatal 403 outside Eclipse infrastructure.

@TyceHerrman
TyceHerrman force-pushed the agent/prevent-plexus-container-creation-deadlock branch from 52f00c5 to 823c223 Compare August 5, 2026 01:04
@TyceHerrman
TyceHerrman marked this pull request as ready for review August 5, 2026 01:32
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Test Results

  348 files  + 3    348 suites  +3   1h 11m 2s ⏱️ + 5m 1s
  732 tests + 5    715 ✅ + 6  16 💤 ±0  1 ❌ ±0 
2 196 runs  +15  2 146 ✅ +15  48 💤 ±0  2 ❌ +1 

For more details on these failures, see this check.

Results for commit d27ece6. ± Comparison against base commit f82726e.

♻️ This comment has been updated with latest results.

@TyceHerrman
TyceHerrman force-pushed the agent/prevent-plexus-container-creation-deadlock branch from d27ece6 to 8122b39 Compare August 24, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deadlock during eclipse startup Deadlock during startup

1 participant