Repository navigation
docs: update news - #1327
Merged
Merged
docs: update news#1327
Conversation
merrymercy
reviewed
Sep 4, 2024
merrymercy
reviewed
Sep 4, 2024
merrymercy
reviewed
Sep 4, 2024
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
…egfault -- disarm, by name
BOOT weg2xsn7 (f) FAIL, and the cause is one line ABOVE the traceback the
verdict quoted:
WEG2-VRAM-CREDIT tag=weights_7 credit=2560 MiB requested=1906 MiB
[torch_memory_saver.cpp] CUresult error: 2 (out of memory)
func=cu_mem_create line=194
barlink-BAR1 status poll failed
self._abort_poll_dst.copy_(self._ctl_dev[0:1], non_blocking=True)
RuntimeError: unknown parameter type
Fatal Python error: Segmentation fault
A TMS resume for `weights_7` failed on a DEVICE OOM, so the VA behind
`_ctl_dev` was left unmapped; `copy_` on that storage raised; the gate logged
and CONTINUED; the process then died in the driver -- not at the raise. The
segfault is the amplification, not the fault.
THIS MODULE ALREADY NAMED THE CLASS, at barlink_abort_gate.py:317: "the first
fault in the whole log is this poll, logged as 'barlink-BAR1 status poll
failed' and continued past; the scheduler then died in `get_cpu_copy` ... three
sites, one fault, and two of them innocent -- which cost this shift two wrong
roots." weg2xsn7 is the second specimen of exactly that.
WHY sgl-project#867's EXISTING GUARD DID NOT CATCH IT, and why this is not a second
bookkeeping. `record_poison` fires on `_POISON_MARKERS` = illegal memory
access / illegal instruction / misaligned address / unspecified launch failure
/ device-side assert -- "the context is gone". "unknown parameter type" is NOT
that: at the raise the context is still alive; what is dead is the TENSOR. So
the three tiers are distinct and each keeps its own job:
* `_POISON_MARKERS` the CONTEXT is gone -> stop all device reads (unchanged)
* `_abort_poll_disarm` THIS control word is unusable -> stop polling it (new)
* the pre-copy check the backing is already released -> never copy at all (new)
THE PRE-COPY CHECK IS NOT A CUDA CALL, deliberately -- a probe that can itself
fault is no probe. A released TMS mapping leaves the storage with a null data
pointer, which is readable from the tensor's own metadata
(`untyped_storage().data_ptr() == 0`), so the released case is caught BEFORE
the copy and costs nothing on the healthy path.
DISARM AND NOT SKIP. The abort word only ever goes 0 -> non-zero and this
mirror follows it once, so a disarmed poll costs the LAST KNOWN verdict and
nothing more -- the hot path's view cannot go backwards. Losing the instrument
is strictly better than losing the process, and it is loud: `Bar1AbortPollDisarmed`
logs once with the reason, so a boot record can grep it. The gate's own
`except` now disarms that transport too, as the belt for every failure shape
the pre-check cannot see in advance.
BISECT VERDICT: NEITHER (a) NOR (b) -- a THIRD cause, and neither of my two
commits is implicated. Evidence, measured not argued:
* neither commit touches barlink / bar1 / the abort gate -- 0 files in
`git diff --name-only 2afbecf 376ae2a` match those names;
* sgl-project#1328 changed exactly TWO RETURN EXPRESSIONS inside `except BaseException`
handlers that already caught and already returned a string. No control flow,
no lifetime change. Hypothesis (a) is refuted by the diff;
* sgl-project#1327 is INERT on the shadow arm: `ring_absent_by_design=(weight_source ==
"exchange")` is False under `shadow`, so the pre-existing branch runs. And
the ARM lines agree in every CHARGED term -- xsn6 and xsn7 both
`anchors=2.37 rings=12.83 overhead=0.61 xchg_bounce=0.00`; only the live-box
leftovers differ (launch 9.11 vs 9.33, run 7.64 vs 7.87). Hypothesis (b) is
refuted by measurement;
* the OOM line is NEW in xsn7 (`cu_mem_create` 1x in xsn7.D, 0x in xsn6.D),
but it is a device-capacity event at a resume the credit gate had granted
(2560 MiB for a 1906 MiB request) -- a VRAM-pressure question, not a
code-diff one.
WORTH A LOOK AND NOT MINE TO CLOSE: the TMS native library reports
`file=/spinning/wt-weg2-shadow...` while the boot ran from
`/spinning/wt-weg2-xsn7-boot` -- the `.so` was built from a DIFFERENT worktree,
so the C++ half of this boot is not provably the tree's.
NOT DONE, AND SAID PLAINLY: this commit has NO red-first test. XSN7 held the
box under the standing rule, and I ran out of room to write and gate the
hermetic pin (poll after a simulated release -> named exit instead of `copy_`)
plus its mutants. The fix is DESK-REASONED from the log and the diff, not
pinned. It must not boot until that pin exists and is red on 376ae2a.
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.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 12, 2026
…ss-check, and the max/sum ruling
#1350b showed that every source the ring solve reads is downstream of the ring
it sizes. The manifests are the one that is not: `xchg_manifest` writes, per
rank and per region tag, the nbytes of every tensor that rank holds, straight
from the live parameter inventory, and they know nothing about any ring.
BUILT: `ring_table.sigma_h_from_manifests()` (read through
`xchg_manifest.load_manifests` -- the reader the JOIN itself uses, so there is
no second bookkeeping of the byte sum) returning per-card MiB, a
`SIGMA-H source=manifest boot=... cards=... sum=...` provenance line, and a
detail dict that carries BOTH candidate formulas so the next reader can check
the ruling instead of trusting it. Plus `manifest_census_crosscheck()`, which
names WHICH source is wrong when the two disagree beyond
MANIFEST_CENSUS_TOLERANCE (5 %), with its evidence and in both directions.
THE FORMULA IS max(P, D) PER CARD, NOT P + D, and the difference is 29 GiB.
C19's ring holds the DORMANT image and the legs copy through it, so exactly one
group is dormant at a time. Boot weg2xsn24's own ten manifests:
card0 P 17896 D 18287 -> max 18287 card1 P 5591 D 6836 -> max 6836
card2 P 7660 D 6820 -> max 7660
Sigma max 32783 MiB = 32.01 GiB Sigma sum 63090 MiB = 61.61 GiB
`RUN MOMENT = the host weights term 32.19 GiB`, recorded in
`host_ledger.price`'s sgl-project#1327 note by another route before this ticket existed,
is 177 MiB (0.5 %) from the max form and 29.4 GiB from the sum form. The
operator's brief said P+D; this is the correction with its evidence.
CROSS-CHECK against every census in the series, all one-sided:
47512 (xsn25 dry, charged) delta -14729 MiB = -14.38 GiB (31.0 %)
42492 (xsn21b) delta -9709 MiB (22.8 %)
42156 (xsn20-in, earliest) delta -9373 MiB = -9.15 GiB
Every census sits ABOVE the tensor bytes the ranks actually hold -- the #1350b
recurrence signature -- and EVEN THE EARLIEST one does, so the "xsn20 level" is
not a clean anchor either; the recurrence had already compounded before this
series. The opposite direction is named as the dangerous one and refused as an
anchor: a ring sized below the tensors the ranks carry ends in W31/W51 ring
exhaustion at the flip.
NOT BUILT, DELIBERATELY: the precedence flip and the dry run behind it. Moving
the anchor shifts Sigma H by -14.38 GiB in the FUNDING direction (run_peak
92.60 -> 78.21 against the 90.18 bound, ~12 GiB of room), and whether the
manifests cover every region the saver backs up -- graph pools, workspaces,
embeddings, i.e. exactly the +9.80 GiB sgl-project#1233 fix 8 MEASURED on weg2dk7 as
`extra` -- is not settled at the desk: the manifests count `weights` and
`weights_draft`, the census counts "all backed-up tags". Part of the -9.15 GiB
may be REAL regions this anchor does not see, and a desk seat may not answer
that in the funding direction. The decision question and the expected
arithmetic are in the NACHTRAG appended to
gpu-arb/weg2/boot_orders/S6_shadow_xsn25_0912.md.
Tests (test_weg2_sigma_manifest_1350c.py, 8 tests + 2 subtests): the max/sum
ruling against the independently recorded figure, the cross-check in both
blame directions and inside the tolerance, an absent manifest set as an
ABSENCE and never a zero ring, and the replay -- the manifest anchor cannot
move with the ring, while the measured ladder moves +4676 MiB.
LOCAL: 374 passed / 4 failed; all four are the known pre-existing
test_weg2_ring_ledger_1235 reds at bfb5e12 and none is new. No boot, no GPU,
no /dev/shm; xchg/weight_updater, S_D and the seed untouched.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 12, 2026
…ss-check, and the max/sum ruling
#1350b showed that every source the ring solve reads is downstream of the ring
it sizes. The manifests are the one that is not: `xchg_manifest` writes, per
rank and per region tag, the nbytes of every tensor that rank holds, straight
from the live parameter inventory, and they know nothing about any ring.
BUILT: `ring_table.sigma_h_from_manifests()` (read through
`xchg_manifest.load_manifests` -- the reader the JOIN itself uses, so there is
no second bookkeeping of the byte sum) returning per-card MiB, a
`SIGMA-H source=manifest boot=... cards=... sum=...` provenance line, and a
detail dict that carries BOTH candidate formulas so the next reader can check
the ruling instead of trusting it. Plus `manifest_census_crosscheck()`, which
names WHICH source is wrong when the two disagree beyond
MANIFEST_CENSUS_TOLERANCE (5 %), with its evidence and in both directions.
THE FORMULA IS max(P, D) PER CARD, NOT P + D, and the difference is 29 GiB.
C19's ring holds the DORMANT image and the legs copy through it, so exactly one
group is dormant at a time. Boot weg2xsn24's own ten manifests:
card0 P 17896 D 18287 -> max 18287 card1 P 5591 D 6836 -> max 6836
card2 P 7660 D 6820 -> max 7660
Sigma max 32783 MiB = 32.01 GiB Sigma sum 63090 MiB = 61.61 GiB
`RUN MOMENT = the host weights term 32.19 GiB`, recorded in
`host_ledger.price`'s sgl-project#1327 note by another route before this ticket existed,
is 177 MiB (0.5 %) from the max form and 29.4 GiB from the sum form. The
operator's brief said P+D; this is the correction with its evidence.
CROSS-CHECK against every census in the series, all one-sided:
47512 (xsn25 dry, charged) delta -14729 MiB = -14.38 GiB (31.0 %)
42492 (xsn21b) delta -9709 MiB (22.8 %)
42156 (xsn20-in, earliest) delta -9373 MiB = -9.15 GiB
Every census sits ABOVE the tensor bytes the ranks actually hold -- the #1350b
recurrence signature -- and EVEN THE EARLIEST one does, so the "xsn20 level" is
not a clean anchor either; the recurrence had already compounded before this
series. The opposite direction is named as the dangerous one and refused as an
anchor: a ring sized below the tensors the ranks carry ends in W31/W51 ring
exhaustion at the flip.
NOT BUILT, DELIBERATELY: the precedence flip and the dry run behind it. Moving
the anchor shifts Sigma H by -14.38 GiB in the FUNDING direction (run_peak
92.60 -> 78.21 against the 90.18 bound, ~12 GiB of room), and whether the
manifests cover every region the saver backs up -- graph pools, workspaces,
embeddings, i.e. exactly the +9.80 GiB sgl-project#1233 fix 8 MEASURED on weg2dk7 as
`extra` -- is not settled at the desk: the manifests count `weights` and
`weights_draft`, the census counts "all backed-up tags". Part of the -9.15 GiB
may be REAL regions this anchor does not see, and a desk seat may not answer
that in the funding direction. The decision question and the expected
arithmetic are in the NACHTRAG appended to
gpu-arb/weg2/boot_orders/S6_shadow_xsn25_0912.md.
Tests (test_weg2_sigma_manifest_1350c.py, 8 tests + 2 subtests): the max/sum
ruling against the independently recorded figure, the cross-check in both
blame directions and inside the tolerance, an absent manifest set as an
ABSENCE and never a zero ring, and the replay -- the manifest anchor cannot
move with the ring, while the measured ladder moves +4676 MiB.
LOCAL: 374 passed / 4 failed; all four are the known pre-existing
test_weg2_ring_ledger_1235 reds at bfb5e12 and none is new. No boot, no GPU,
no /dev/shm; xchg/weight_updater, S_D and the seed untouched.
This file contains hidden or 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
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.
Motivation
Modifications
Checklist