Skip to content

Fix the CPU startup test barrier race - #60

Merged
Elevatormusic merged 1 commit into
deepseek-v41-tp2from
codex/fix-startup-test-barrier
Nov 7, 2026
Merged

Elevatormusic merged 1 commit into
deepseek-v41-tp2from
codex/fix-startup-test-barrier

Conversation

@Elevatormusic

Copy link
Copy Markdown
Owner

Problem and change

The CPU startup test can fail after the engine correctly refuses different rank settings. Its first expected ValueError handler aborts the fake collective barrier while the peer is still leaving it. The peer then gets BrokenBarrierError instead of its own refusal.

Record when each fake all_gather returns. Keep the barrier intact only for the expected mixed-setting ValueError after that return. Unexpected errors still abort it. This preserves both refusal checks and prevents test cleanup from masking the peer's result.

Only tests/test_dsv41_reduced_cpu.py changes. All 22 existing assertion statements and the 3-second barrier and 5-second join bounds remain unchanged.

Type

  • type: fix: a bug fix
  • type: feature: new code
  • type: docs: docs only
  • type: results: run results
  • type: research: a study
  • type: spec: a plan

Receipt

Head 21b7d2ccf62e1287a0b37690d55506fa61597d02, base 8115854afb8cf82cc523664e6078023f1c52197c.

  • A controlled delayed-peer schedule on exact base reproduces ValueError plus BrokenBarrierError in both rank orders. The original assertions fail. After the fix, both orders produce two ValueErrors, no warm call, and passing original assertions.
  • Unexpected errors before and after gather still call abort and end both peers. A pre-gather ValueError with the expected message also aborts, which checks the completion guard.
  • PyTorch 2.9.1 CPU focused scope: 18 passed, zero skipped. Fatal Python lint passed. Independent source and receipt review found no remaining issue in this repair. Default-only full-history secret scan found zero entries.
  • Full CPU plan with approved private local HTTP fixtures: 3770 passed, 747 skipped, 138 unchanged existing exclusions, 37 passing subtests.
  • The extra IP-socket-denied full run stays raw exit 1: 2890 passed, 783 failed, 97 errors, with the same skips, exclusions and subtests. Its 880 socket-denial traces match those failure/error cases. The separate full private-fixture replay above passes. No assertion or exclusion was weakened.
  • Exact source and complete private Git metadata were mounted read-only in isolated, secret-free containers. Inputs, logs, source bytes and cleanup were verified.

No engine, serving, arithmetic or checkpoint code changes. GPU, NCCL and real-model checks were not run; this is a CPU test-fixture repair. No model or image was deployed.

@Elevatormusic Elevatormusic added the type: fix a correction after review findings or a bug fix label Nov 7, 2026
@Elevatormusic
Elevatormusic marked this pull request as ready for review November 7, 2026 00:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T00:49:14.166928Z 21b7d2c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Elevatormusic

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 21b7d2ccf6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Elevatormusic
Elevatormusic merged commit bcbbcbb into deepseek-v41-tp2 Nov 7, 2026
7 checks passed
@Elevatormusic
Elevatormusic deleted the codex/fix-startup-test-barrier branch November 7, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix a correction after review findings or a bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant