Skip to content

chore: bump v0.2.14.post2 - #1250

Merged
zhyncs merged 2 commits into
mainfrom
rel
Aug 28, 2024
Merged

zhyncs merged 2 commits into
mainfrom
rel

Conversation

@zhyncs

@zhyncs zhyncs commented Aug 28, 2024

Copy link
Copy Markdown
Contributor

Motivation

Modifications

Checklist

  • Format your code according to the Contributor Guide.
  • Add unit tests as outlined in the Contributor Guide.
  • Update documentation as needed, including docstrings or example tutorials.

@zhyncs
zhyncs enabled auto-merge (squash) August 28, 2024 15:55
@zhyncs
zhyncs disabled auto-merge August 28, 2024 16:04
@zhyncs

zhyncs commented Aug 28, 2024

Copy link
Copy Markdown
Contributor Author

hold on

@zhyncs
zhyncs enabled auto-merge (squash) August 28, 2024 18:30
@zhyncs
zhyncs merged commit 13ac95b into main Aug 28, 2024
@zhyncs
zhyncs deleted the rel branch August 28, 2024 18:46
timethink pushed a commit to timethink/sglang that referenced this pull request Mar 9, 2025
efschu pushed a commit to efschu/htsglang that referenced this pull request Sep 10, 2026
…never re-asked the card (W85)

BOOT weg2xsn7's flip killer, attributed from the D log with numbers:

    20:05:47 TP0  WEG2-VRAM-CREDIT card=GPU-31d7ef41-… tag=weights_7
                  waited=0 ms credit=2560 MiB requested=1906 MiB
                  (the peer's releases funded this tag)
    20:05:48      cu_mem_create -> CUresult 2 (out of memory)

Group D **rank 0**, card `GPU-31d7ef41-f574-4d0e-21ad-e773fd938f6d`;
`weights_7` is 1906 MiB on that rank (`WEG2-FLIP-TAG … bytes=1906 MiB`).

THE DEFECT IS SHARPER THAN "no NVML read". `wait_for` DOES take a
`free_bytes_now`, and it uses it ONLY as an early exit at the top ("the card
already holds the bytes"). Once the wait loop is entered -- i.e. exactly when
the card WAS short -- the grant is decided purely on `credit_bytes`, a number
in a shared file written by the peer's release bookkeeping, with no second look
at the device. So the counter said 2560 MiB were released and the card could
not allocate 1906. The credit line carried NEITHER free figure, which is why
"allocatable < credited" had to be reconstructed from a `cu_mem_create` line
one row below it.

THE FIX: before returning a peer-funded grant, RE-READ the card and refuse by
name when `free - corridor_floor < requested`.
* ONE READER, never a second NVML loop: `free_reader` is injected by the
  caller and is the same `registry.nvml` v2 free column (sgl-project#1250) the early-exit
  term uses, so the two readings cannot drift.
* THE FLOOR COMES FROM THE CORRIDOR AUTHORITY --
  `managers.corridor_guard.corridor_floor_mib`, the same function
  `weg2/corridor_budget` calls to build its per-card map. My first cut read a
  module CONSTANT `INSTALLED_CORRIDOR_FLOORS_MIB` that does not exist; the
  getattr would have returned None and the floor term would have shipped
  INERT -- present-but-unwired, the failure class this campaign has now paid
  for three times. Caught by grepping for the name instead of trusting it.
* THE PEER TERM SURVIVES as the first condition. It is simply no longer the
  only one, which is the whole correction.
* `None` (unreadable, or no reader) keeps the pre-sgl-project#1331 behaviour exactly: a
  blind reading may not manufacture a refusal any more than it may license a
  grant.
* The line now prints `free_mib=` / `allocatable_est=` / `corridor_floor_mib=`,
  `n/a` and never 0 for an unreadable column, so the NEXT boot attributes
  instead of inferring.

W-CODE: **W85 Weg2VramCreditAllocatableShort**, and the census was RUN. The
assigned Weg2 codes around it are W80-W84 (the xchg band) and W86-W89 (the
serve line); W85 is the one free number between them. The two `W85` hits
elsewhere in the tree are `W855-…` specimen DIRECTORY names -- the
bare-code-as-grep-pattern trap, third instance this campaign, so anchor with
`grep -F 'W85 '`. It SUBCLASSES `Weg2VramCreditRefused` (W35) so every caller
that already handles a refused credit handles this unchanged, while the code
names which of the two facts failed: W35 = "the peer will never fund this",
W85 = "the peer's counter says funded and the device disagrees".

ALSO IN THIS COMMIT, sgl-project#1330's pin made FALSIFIABLE. The latch case was VACUOUS:
removing the early return still left one log line, because
`_abort_poll_active = False` makes every later poll return at the first guard,
so the disarm is never re-entered. Measured -- that mutant passed. The case now
RE-ARMS the poll between rounds (a succeeded resume, a transport rebound at a
cutover) which is the only way to exercise the latch apart from the disarm.
Three mutants, all red, baseline green after each: probe removed (3 failed),
latch removed (1 failed), disarm no longer turns the poll off (1 failed).

LOCAL, HERMETIC, box verified free first (nvidia-smi 1 MiB x3, no compute apps,
launch_server 0) and every run under `CUDA_VISIBLE_DEVICES=""`:
24/24 across sgl-project#1327 + sgl-project#1328 + sgl-project#1329 + sgl-project#1330. ruff clean on all five files.
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.

2 participants