Skip to content

Start test workers with eager peer connections - #857

Merged
jpsamaroo merged 2 commits into
masterfrom
jps/eager-test-worker-peers
Dec 2, 2026
Merged

jpsamaroo merged 2 commits into
masterfrom
jps/eager-test-worker-peers

Conversation

@jpsamaroo

Copy link
Copy Markdown
Member

Julia 1.11 stdlib Distributed can throw ConcurrencyViolationError("lock must be held") when a worker's first lazy peer RPC originates on another thread. This surfaced in #635's expanded ROCm tests. Start test workers with supported lazy=false through one shared helper, and use it for every active test worker addition so lazy and eager modes cannot mix.

The existing Context fixture now checks its first peer RPC on another thread before loading Dagger on the new workers, and removes those workers in finally. Existing project selection, explicit thread counts, numerical assertions, and Context/scope/removal assertions are retained. Production and benchmark transport defaults are unchanged; the cold lazy path remains an upstream stdlib issue.

Validation:

  • Native Julia 1.11.9 reproduces the old lazy-launch error; eager public first-peer controls pass with stdlib Distributed and DistributedNext 1.3.2.
  • Registered Processors and Scopes pass 33 and 121 assertions with each transport; the exact Scheduler remove-all fixture passes two assertions with Next. Its exit-0 run retains a post-END worker closed-stream diagnostic, so this is not a clean whole-process or hosted-CI claim.
  • Native Julia 1.13.4 bare -t2 first-peer controls pass with both transports, including a second default-single-thread addition with Next. These reuse the frozen 1.11 manifest and retain imported-binding warnings.

Written by an AI agent on jpsamaroo's review feedback.

Julia 1.11 stdlib Distributed can wait on a thread-affine lazy peer
condition when the first worker-to-worker RPC comes from another thread.
Use the supported lazy=false setting through one test worker helper.
Every active test addition must match that setting because both transports
reject mixing lazy and eager workers in one cluster. Production and
benchmark defaults stay unchanged.

Reuse the existing four-worker Context fixture for a first-peer RPC from
thread 2 before loading Dagger on those workers, and always remove them on
failure. Native Julia 1.11.9 reproduces the old lazy launcher's exact
lock-must-be-held error; eager stdlib and DistributedNext 1.3.2 each pass
all five public first-peer checks without Dagger or a GPU loaded.

Written by an AI agent on jpsamaroo's review feedback.
@jpsamaroo
jpsamaroo merged commit be80d97 into master Dec 2, 2026
54 of 59 checks passed
@jpsamaroo
jpsamaroo deleted the jps/eager-test-worker-peers branch December 2, 2026 03:10
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.

1 participant