Repository navigation
Release v0.3.1.post2 - #1470
Merged
Merged
Release v0.3.1.post2#1470
Conversation
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 17, 2026
…oin the write-throughs BEFORE the tree reset; mamba eviction spares un-backed states The hand-back regression since the bs1 order (xsn202): the flush's publish sweep was skipped whenever the waiting queue held anything (held store-told intakes count) and, when it ran, nothing waited for the write-throughs it issued before tree_cache.reset() dropped them. With group P at --max-running-requests 1 the backlog at the sleep flush is ~1 node and the race is invisible; at 2 it is 40-72 nodes (weg2xsn225/226/ 227: PUBLISH-SWEEP unbacked=72 in_flight_after=56 right before 'Cache flushed'), so P slept with the store missing every node past the first and group D -- whose sgl-project#1455 hold prefetch now reads DURING the flip -- re-entered 4095 of 97870 tokens ('STORE READ INCOMPLETE shortfall=93775', W31/W35, 0 of 6 served). xsn194 (p-bs 2, before sgl-project#1455) read after the drain and served 9/9 with the same backlog. flush_cache: sweep whenever nothing runs, loop until no node is un-backed, join the write-throughs, then reset; 'sgl-project#1470 FLUSH-PUBLISH issued= unbacked_left= waited_ms=' names it. mamba drive_eviction skips un-backed nodes (their backup is queued) instead of freeing the value (xsn227 sgl-project#1469: 88 EVICT backuped=False). Tests: 1470 (1) + 1386 (22) + 1456 (5) + 1068 (48) -> 70 passed.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 17, 2026
…0 on weg2xsn228 alloc_req_slots: 'mamba_available=0 mamba_schedulable=0' with 22 evictable states all un-backed (the backlog holds every slot), so the skip made an admission unservable. Losing a mid-request anchor is survivable (group D re-enters up to the deepest anchor and the final node always keeps its state; xsn194 served 9/9 with 33 EMPTY backups); an unservable admission is not. The flush-side join (sgl-project#1470, scheduler.flush_cache) protects the hand-back: xsn228 logged 'sgl-project#1470 FLUSH-PUBLISH issued=1 unbacked_left=0' and EMPTY=0 before the crash. Tests: 1467/924/1470 -> 15 passed.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 17, 2026
…stays parked after the wake until its re-read completes weg2xsn229 (P --max-running-requests 2, sgl-project#1470 flush join): the read issued at the hold ended short (4095 of 98210; D reads DURING the flip since sgl-project#1455, before P's write-through and storage backup land), the sgl-project#1456 refetch was issued, and the wake queued the request anyway -- the X gate refused it (W31 uncached 94117 > X 4096), P prefilled the same prompt again, and the second read was complete (served 98210). The short prompt weg2-6-2 looped the same way (W53), and D wedged behind it. _weg2_release_dormant_hold now queues only requests whose read is complete; the others are parked in weg2_post_wake_settle with their sgl-project#1461 claim kept, re-read every 2 s by _weg2_refetch_one (the sgl-project#1456 body, factored out) from _weg2_post_wake_settle_tick at every scheduling pass, and queued when complete or after WEG2_POST_WAKE_SETTLE_S=20 s. Tests: 1471 (3) + 1456 + 1445 + 1466 + 1470 -> 22 passed.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 17, 2026
…up (replaces sgl-project#1480) weg2xsn245 (6x100k, running-req 2): sgl-project#1480 backed up EVERY evicted interior node (124 x 128 MiB KV) into P's 1 GB staging arena; the flip flush (sgl-project#1470 sweep) then blocked in the arena's claim_slots for six minutes -> IDLE-WEDGE. Reverted (e55448c). What the hand-back actually needs is ONE anchor: the N-1 node the END-ANCHOR SPLIT (sgl-project#1233) creates, which becomes an interior node the moment the final 1-token chunk is inserted below it. The mamba pool's interior branch evicted it un-backed under the second concurrent prompt (xsn243: 28 unbacked evicts/min); the final node's own anchor sits one unit past the tail a reader asks for (token_ids[:-1]), so the read had no anchor in range (#1035c CAPPED by=mamba) -> 20 s settle -> W31 -> second prefill. The END-ANCHOR witness now marks that node; the mamba eviction skips it while un-backed (bounded by the finished prompts awaiting the flip, never the whole backlog -- the #1470b hazard); the flush publishes it and lifts the hold. Tests: test_weg2_end_anchor_hold_1481 (4) + 1469/1470/1467/924/1479/1471 -> 35 passed.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 23, 2026
…nachziehen) 264 Commits der 27B-Fliplinie fehlten dem NF-Zweig (git cherry), darunter die Kernfixes Credit-Floor-Objekt (44f5e6e), IPC-Staging gegen den VRAM-Credit (51040dd), W108-Lane-Abdeckung (b70dc62), Arena-Uhrzeiger (ce59ad3), D im P->D-Flip (4336934/a27841d0fd), Lane-Freigabe je Leg (d2dcc94), Fast-Flip (3d3ebe1), Wake-Parallel (ebf94e6), Sleep-Flush joint die Write-Throughs (sgl-project#1470 b9ec24b) und die Arena-Umbindung nach dem L3-Ack (sgl-project#1424). 12 Dateien mit Konflikten, aufgeloest: - weight_updater: beide Draft-Reload-Skips - torch_memory_saver_adapter + Test: NF - base_cuda_graph_runner: _solo_draft = is_draft_solo_host or spec_solo_rank_local_graphs - weight_exchange_shadow: beide Skips - barlink_abort_gate: 27B - weight_exchange: _widths mit der Breite-0->[]-Regel, NF fuer den empty/local_scratch-Block - weg2_memory_saver: beide (W108-Persistenz + W109-Klasse + _alloc_wait) - scheduler.py: NF (W11b-Log) - xchg_manifest: NF-Breitenbedingungen mit MIXED_FUSED_COLS; NF fuer Halter und leere Manifeste - launcher: NF (6 Bloecke) - front.py: beide Helfer; Konstruktor weights_resident + weight_form; Pause-Reihenfolge NF if/else mit interleave_chain_card im else (SGLANG_WEG2_FLIP_ORDER_CHAIN=0 schaltet ab); Legs: NF weights_resident-Zweig, sonst 27B Wake-Parallel (fruehes kv); Controller: _ahead-Semaphor + _adopt_first_flip - tests/moe_offload/test_kv_resume_refusal_0920.py: aufgeloest Tests (nach dem Merge, ohne CUDA): - weg2-Liste: 18 rot (Basis 16 + 2 Stub-Drift-Ratschen test_weg2_1363_smoke_stub_drift: _weg2_bar1*/_weg2_stage_charge/... ueber das Leg erreichbar, weder geliehen noch ausgeschlossen -- auf der 27B-Spitze identisch rot). - 91 mitgekommene Testdateien: 581 gruen, 13 rot; 9 davon auf der 27B-Spitze identisch rot (arena_host_pool_1424 x3, intake_stall_authority_xsn288, post_wake_settle_1471 x2, region_form_lane_cap_1464, wake_kv_early_xsn315, wake_kv_first_xsn314); 4 xchg_solo_draft_xsn389 pruefen die 27B-Join-Form fuer Solo-Draft-Schatten, die NFs sgl-project#76/sgl-project#103-Form ersetzt (bewusst NF in xchg_manifest; am Metall x18-x22 bewiesen). - mem_cache: 41 rot (Basis 33); 10 der 12 neuen auf der 27B-Spitze identisch rot (arena_1424 x3, mamba_anchor_seams_747, staging_write_ring_810 x5, transfer_domain_1206), 2 (0828 extent-io, meta_tp_layout_785) nur im Vollauf rot, einzeln gruen (Reihenfolge).
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 24, 2026
…tzten Zustand auffrischen Upstream 48ae829 (sgl-project#31648, v0.5.20), angepasst: hinter SGLANG_MAMBA_LRU_REFRESH_USED_ONLY (Default aus). Portiert: MambaComponent.refresh_lru-Override (unified radix cache, den P und D des 27B bauen). Eingeschaltet: MATCH_END frischt im Mamba-LRU nur best_match_node auf (acquire_component_lock pinnt ohnehin nur dessen Zustand), WALKDOWN/INSERT_END lassen den Mamba-LRU in Ruhe (neue Zustaende kommen weiter ueber commit_insert_component_data). Upstream-Begruendung: Ganzketten-Refresh haelt die Zustaende einer Session im LRU beieinander und wirft kalte Sessions unter Pooldruck komplett raus. Warum opt-in statt Default: das ist eine Eviktions-POLITIK, keine reine Hot-Path-Optimierung (Match passiert je Admission, nicht je Decode-Schritt). Sie ordnet um, was drive_eviction zuerst tombstoned -- und die Fork-Anker-/ Retention-Mechanik (sgl-project#747 Grid-Retention, sgl-project#773/sgl-project#755 Anker-Release, sgl-project#1470 Flush-Join, sgl-project#1481 END-ANKER-Hold) ist nur gegen die Ganzketten-Ordnung gemessen; das aktive Flip x HiCache-Problem liegt genau dort. Aus = Basis- refresh, byte-identisch. Kandidat fuer einen A/B-Boot. Nicht portiert: sgl-project#31643 (dieselbe Idee fuer MambaRadixCache) -- keine weg2-Gruppe baut MambaRadixCache (D- und P-Log xsn411: "UnifiedRadixCache hybrid_ssm=True hierarchical=True"). Test (CPU, incg 3 GiB): test_unified_radix_cache_unittest.py neu TestUnifiedMambaLRUMatchRefresh (upstream-Test unter Env an + Default- Fall byte-identisch): 2 passed; Gegenprobe mit Basis-mamba_component.py: opt-in-Test rot. Teilmenge -k "lru|LRU|mamba|Mamba": 39 failed / 246 passed -- identische Fehlmenge wie auf der Basis (CPU-Altlasten, z.B. hicache Stream.query). test_mamba_reorder_unified_773 17, test_unified_mamba_views gruen; test_unified_mamba_pin_trace_581 1 failed / 10 passed = Altlast (auf der Basis identisch).
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 25, 2026
…-- x172: TP0 hielt eine Store-Schreibung mehr als TP1/TP2, der MIN-Drain liess sie ewig liegen, hicache_backup(1) verweigerte jeden Flush, W3 (fnFL2 H74) x172 (D, Form A TP3), 23:37:33: nach einer 6144-Token-Antwort gab der Flush-Publish auf TP0 7 Write-throughs aus, auf TP1/TP2 6 (sgl-project#1470 issued=7/6, Sweeps 3+3+1 gegen 3+2+1). Nur TP0 spaltete den 6080-Token-Knoten (PUBLISH-SPLIT pieces=2 window=4096): das Fenster ist ein Viertel des EIGENEN Host-Pools -- TP0 4096 (Arena-Staging, 4096 Zeilen), Worker 86016 (353600 Zeilen). Jeder Ack reihte eine Store-Schreibung ein; drain_storage_control_queues nimmt die Ack-Zahl als MIN ueber die TP-Gruppe: 6. TP0s siebter Ack blieb liegen, ongoing_backup wurde nie leer, 'not-idle because: hicache_backup(1)' von 23:37:34 bis W3 um 23:39:03. (1) Die Backup-Acks werden je Rang vollstaendig abgeraeumt (_drain_backup beruehrt nur eigenen Zustand -- das sgl-project#737-Argument, eine Queue weiter); Revokes und Host-Releases behalten den MIN. Zeile, wenn der MIN-Drain etwas liegen gelassen haette: H74 BACKUP-ACK DRAIN rank-local. SGLANG_WEG2_ENABLE_LOCAL_BACKUP_ACK_DRAIN (Standard an). (2) Auf einer TP-Gruppe (attn-Welt > 1) ist das Publish-Fenster auf jedem Rang der Chunk (4096), unabhaengig vom eigenen Host-Pool -- gleiche Knoten, gleich viele Store-Schreibungen je Rang. Einzelrang-Gruppen (P-Stufen) unveraendert. SGLANG_WEG2_ENABLE_TP_UNIFORM_PUBLISH_WINDOW (Standard an). Test test_backup_ack_drain_tp_asymmetry_h74.py: drei Raenge mit den x172-Pools, echtes Fenster und echter Drain ueber einen echten Drei-Rang-MIN (Threads + Barriere), Sweeps wie am Metall: rot auf c281ce5 ([1, 0, 0], TP0 hicache_backup(1)), gruen mit H74.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 25, 2026
…rtet auf die Store-Schreibvorgaenge der Write-through-Acks (fnFL2 H63d) x169 (c286615, TAIL_FOLD=1): P verweigerte den END-Teil ("kv rows 97792 < cut 97840"), D las aus dem Store nur 1344 von 1528 Seiten (shortfall 11776) und kreiste. (a) cache_finished_req: unter der Faltung ist der letzte Chunk der beendende Forward; sein extra_buffer-Track (floor_page(N)) steht beim Finish noch an (im Schnitt-Pfad verbrauchte ihn der unfertige Insert bei c), die Mamba-Komponente kuerzt darauf, und die Kuerzung gab [97792, N) frei, BEVOR publish_rows die Zeilen las. publish_rows laeuft jetzt vor der Kuerzung mit allen N Zeilen (ohne Capture ein No-op, Schnitt-Pfad unveraendert). Die END-ANCHOR-Sonde fragt nach dem Prompt (token_ids_full), nicht nach dem gekuerzten Schluessel -- auf den gekuerzten ids spaltete sie den letzten Knoten eine Seite zu kurz (ok=False, sgl-project#1481-Marke fehlte). (b) #1470b: die Write-through-Acks einer Direktschreibung reihen die Store-Schreibvorgaenge der Sidecars ein (#106S, QSA-Index); der Reset des Flush stoppt den Backup-Thread nach dem laufenden Vorgang und baut eine frische Queue -- der Rest ging spurlos verloren (RESET JOIN zaehlt nur Prefetch). PP0 entscheidet den Flush auf der Idle-Runde der VORIGEN Schlafphase (x169: Epoche 1 von 22:00:34, verbraucht 22:04:26), nicht auf seinem eigenen hicache_backup(n). flush_cache wartet jetzt vor dem Reset (begrenzt, ranglokal), bis kein Store-Schreibvorgang aus ongoing_backup mehr in der Backup-Queue steht -- den laufenden beendet der Thread-Join des Resets selbst, ein Eintrag ohne Vorgang in der Queue haelt den Flush nicht. Schalter = der sgl-project#1470-Schalter SGLANG_HICACHE_FLUSH_PUBLISH_SWEEP (Standard an). Zeile: #1470b FLUSH-STORE-JOIN. Test test_weg2_tail_fold_store_h63d.py: echter Chunk-Loop + Track + echtes cache_finished_req (a) und echte Controller-Pipeline + echtes flush_cache (b), rot auf c286615 mit den Metallzahlen (refused 97792 < 97840; 1344 von 1528 Seiten = 86016 Token, shortfall 11776), gruen mit H63d; Schnitt-Pfad und leerer Flush gruen auf beiden.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 26, 2026
…e (L(n) - n x 5 statt 38 - 30), der Budget-Check steht vor dem eigenen Pin statt ueber der Eltern-Rekursion, mamba usage rechnet gegen die erreichbaren Slots Befund (Desk, Baum 192ae05): H95c begrenzt den Mamba-Allocator einer D-Phase mit n < --d-bs Sitzen auf die Slots 1..L(n) (NF: 38 Slots bei --d-bs 6, also 7/13/19/25/32/38) und laesst hoechstens n laufende Requests zu (d_seat_vram.admission_cap). Das sgl-project#581-Pin-Budget (Boden = laufende Menge, Budget = Pool minus Boden, damit die Zusage unabhaengig vom Ack-Abfluss gilt) wurde einmal aus dem Boot-Pool und --max-running-requests berechnet und gecacht: unified_radix_cache._mamba_pin_budget und hi_mamba_radix_cache._mamba_pin_budget, Metall 'MAMBA-FLOOR pool=38 floor=30 retention_budget=8 (6 x (1 active + 2 ping-pong + 1 donation + 1 pinned checkpoint))' (fnFL2h91bb2 D-Log Z. 7746). In der n=1-Phase ist das Budget (8) groesser als jeder erreichbare Slot (7): Write-Through-Pins duerfen alle halten. Die Garantie Boden + Budget <= Pool bricht fuer n=1..5 (L(n) - 5n = 2/3/4/5/7 < 8). Erreichbarkeit auf der NF-D-Form (write_back, sgl-project#811 aus): Pins entstehen auf D nur durch erzwungene Write-Throughs (d_park_runtime.park_running setzt force_host_write_through, das Attribut wird nie zurueckgesetzt, also auch beim Finish eines aus dem Park fortgesetzten Requests) und den Flush-Sweep bei leerer laufender Menge. Solange die Pins von einem Request stammen, der die laufende Menge verlassen hat, reicht es fuer n>=2 knapp (n=2: 13 - 7 = 6 >= 5). Der Weg, der NICHT reicht: Flip-Park (erzwungene Pins auf der Kette des Requests) + awake-Requeue derselben Population (SGLANG_WEG2_D_PARK_AWAKE_ REQUEUE_S, 30 s), solange Acks offen sind. Bei n=1 bis zu 5 Pins (Kette: Anker + Lock-Knoten + gecachte Checkpoints, die 2 Ping-Pong-Slots frei), der Request braucht 3 neue (active + 2 ping-pong) von 7 - 5 = 2 -> der COW der Wiederaufnahme scheitert -> zero_match_result, volles Re-Prefill (oder MambaLoadBackUnservable -> load_back False). Drain-abhaengig, genau das, was das Budget ausschliessen soll. Zweites Loch: write_backup fragt das Budget VOR der Eltern-Rekursion und pinnt danach; eine erzwungene Einfuegung ueber k ungesicherte Checkpoints bestand k Pruefungen beim selben Stand und nahm k Pins (auch in der Cap-Form ueber 8). Nebenbefund: pool_stats_observer zaehlte die zurueckgehaltenen Slots als belegt -- n=1 im Leerlauf 'mamba usage: 0.82' (31/38), mit einem laufenden Request 0.92 (35/38). Auf D ist der Prefill-Delayer aus, betroffen sind die Log-Zeilen und die Gauges mamba_usage/mamba_used_tokens. Fix (kein Schalter, keine Kollektive, rang-einheitlich: Limit und n kommen aus dem Wake-Request, der Boden aus server_args): - allocator/mamba.py: set_phase_limit(limit, seats=None) haelt die Sitzzahl der Phase (phase_seats); ohne Limit None. - d_seat_vram.on_wake uebergibt seats=target. - mamba_pool_floor.mamba_phase_pin_budget: ohne Limit = mamba_retention_pin_ budget wie bisher, mit Limit = L - hard_floor(min(n, mrr)). NF: 2/3/4/5/7/8. Limit ohne Sitzzahl rechnet mit --max-running-requests (kleineres Budget). - unified/hi_mamba _mamba_pin_budget: Cache je (phase_limit, phase_seats), neu berechnet bei jedem Wake, der sie aendert. - unified_radix_cache.write_backup: nach der Eltern-Rekursion wird das Budget vor dem eigenen Pin erneut gefragt; Ablehnung laesst den Elter gesichert und den Knoten dem Publish-Sweep ('mamba_pin'). - pool_stats_observer: mamba_num_used/mamba_usage gegen size - phase_withheld_slots (der Mamba-Zwilling von residency_withheld); ohne Limit byte-gleich. Kosten: in kleinen Phasen serialisiert das Budget die Pins eines Parks (n=1: 2 in flight); der sgl-project#1470-Flush-Sweep schleift mit writing_check zwischen den Runden bis unbacked == 0, Budget >= 2 in jeder Phase haelt ihn in Bewegung. Tests (CPU, echter Allocator/Cache/Pool, incg.sh): test/registered/unit/weg2/test_weg2_d_seat_pin_budget_h95e.py (9): auf 192ae05 6 rot -- n=1 'the running request was starved of a slot (7 of 7 reachable slots pinned)', Budget 8 != 2, Rekursion 'went on to its transfer and pin past the budget', mamba_num_used 31 != 0 und 35 != 4 --, n=6 und der verweigerte Limit-Fall gruen auf beiden; mit Fix 9/9 gruen. Betroffene Suiten (16 Dateien: h95c, h95d, mamba_pool_floor, from_floor_773, pin_budget_live_773, reorder_unified_773, anchor_ack_release_811, lock_ref_pairing_581, form_a_host_shadow_r12, write_backup_l3_parent_x20, host_tier_contiguous_backup_841, staging_write_ring_810, anchor_aliasing_924, double_free_924, pool_invariant_double_owned_912, idle_census_1262): Basis 256 gruen / 11 rot, Fix 256 gruen / 11 rot, dieselben 11 Knoten (924 double-free x5, 810 staging ring x6), 0 neu.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 26, 2026
…bb3 starb am Sleep-Drain des zweiten D-Schlafbeins (W120 -> W29) Metall fnFL2h91bb3 @ 50cd288 (D TP3), erster Boot, auf dem der H91-Park-Pfad wirklich lief: 15:52:39.722 Front WAIT-BOUND FIRED epoch=16 -> /weg2/park_running; D: '#969AD RETRACT site=weg2_park_running', 'WEG2-D-PARK park_running ... parked=[weg2-16-23]' auf 3/3. 15:52:39.905 erstes Schlafbein (kv_cache+cuda_graph): Drain leer, Flush ('sgl-project#1470 FLUSH-PUBLISH' joint die Write-Throughs des Parks VOR dem Reset), pause(kv_cache), 'WEG2-DORMANT set', dann hold_parked -> gewoehnliche Intake: zuerst _prefetch_kvcache (Store->Host-Read registriert, 'sgl-project#1028 HICACHE-ROUND ... ongoing_prefetch=1'), dann sgl-project#1443-Hold ('WEG2-D-PARK hold: 1 parked request(s) at the head of the dormant hold'). 15:52:39.985 zweites Schlafbein (weights_*): _weg2_drain_hicache_before_sleep sah 'hicache_prefetch(1: weg2-16-)' auf jedem Rang, 887 Gruppen-Polls / 10,01 s, W120 3/3 -> WEG2-LEG-ABORT -> W29 -> D tot. Wurzel: weder Selbstblockade gegen den eigenen Write-Through (der war beim Flush gejoint) noch ein Arena-Ack. Ein Prefetch-Record verlaesst ongoing_prefetch nur ueber check_prefetch_progress (Admission, sgl-project#1233-Orphan-Collector -- der gehaltene rids seit sgl-project#1456 bewusst auslaesst --, sgl-project#1456-Top-up), Revoke, Abort oder Re-Issue; check_hicache_events ruft nichts davon. Der Read des Holds soll per Design den ganzen Flip ueberspannen (sgl-project#1455: Host-Read im Schlaf, Device-Load beim Wake; sgl-project#1456: Nachladen waehrend die Gruppe schlaeft). Der Drain jedes SPAETEREN Schlafbeins zaehlte ihn trotzdem als in-flight -- er konnte nie leer werden. Gleiche Klasse fuer jede sgl-project#1443-Ankunft und jeden sgl-project#1456-Re-Issue zwischen zwei Schlafbeinen. Fix (Richtung b, rang-einheitlich, kein Schalter, keine Reserve, kein Warten): weg2_sleep_drain.hold_owned_prefetch nennt die offenen Prefetch-Records, die der dormant hold besitzt -- nur wenn weg2_dormant (KV-Pool pausiert, kein Device-Ziel mehr) und der rid im Hold steht (Hold repliziert, Registrierung participation-voted). Ein Prefetch-Record ist Store->Host (Host-Pool-Zeilen); seine Device-Haelfte ist ein Load-back (ongoing_load_back) und blockiert weiter, ebenso Write-Through, Backup und jeder Read eines nicht gehaltenen Requests. Der Pre-Sleep-Drain und der Idle-Assert des Release-Beins (_weg2_sleep_idle) nehmen dieselbe Ausnahme (Scheduler.idle_blockers / is_fully_idle mit exempt_prefetch, Default leer = unveraendert); Zeile 'H91e SLEEP-DRAIN HOLD-OWNED prefetch=N rids=[...]'. Der Read laeuft weiter, der Wake gibt den Request zuerst frei, wach ist der Read wieder ein gewoehnlicher Term. Tests test_weg2_hold_prefetch_sleep_h91e (7; echte Scheduler.idle_blockers/is_fully_idle, echte park_running/hold_parked, echter Drain ueber eine 3-Rang-MAX-Reduktion in Threads): 5 rot auf 50cd288 (bb3-Form: W120 'hicache_prefetch(1: weg2-16-)' auf 3/3, wortgleich zum Metall), alle 7 gruen mit Fix; Park-/Drain-/Idle-Suiten h91b/h91c2/h91c3/h91d/x105/1445/1272/h74/1268/1268-lap/1233/1361/x36/s1: 27 Altlasten identisch zur Basis (s1_memory_saver 26, s3s4_refusals_1233 1), 0 neu.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 28, 2026
…dit -- Bruecke f833fcb: D schrieb den Anker 37376 in 16-46s eigenem Extend ('sgl-project#1469 RETAIN rid=weg2-16-46 ... cache_len=37376', 19:50:38), 16-48 setzte darauf auf (19:50:51, '#cached-token: 37376'). Der D-Schlaf 19:51:15-16 verweigerte die Host-Sicherung ('sgl-project#1421 BACKUP-REFUSED why=mamba_pin ... pins=8/8', danach 'why=mamba_claim' hinter 'sgl-project#1427 ARENA-CLAIM REFUSED ... no free slot' der 32-Slot-Arena) und setzte den Baum zurueck ('sgl-project#1470 FLUSH-PUBLISH issued=13 unbacked_left=1', 'Cache flushed'). Nach dem Wake gab der Store den KV zurueck (store_hit=37376), aber keinen Anker ('[sgl-project#904 match-census] ... MambaComponent:absent=37376'); die Front preiste weg2-16-54 trotzdem SHORT (presence 35942 src=d_leg2_cached) -> 17 s D-Sitz, dann W31 am X-Gate (38291 Tok) und W50-Umweg ueber P (12 solche in rc12z26, 8 auf der Bruecke). Das X-Gate auf D preist schon die anker-nutzbare Tiefe (W31), die Front nicht. Fix: (a) Instrument: sgl-project#1421 BACKUP-REFUSED nennt depth= und rid= (weg2_node_depth, weg2_anchor_rid). (b) Der Flush zaehlt vor tree_cache.reset() jeden nur-Device-Mamba-Anker mit Tiefe (UnifiedRadixCache.weg2_unbacked_anchors, 'WEG2-ANCHOR-LOST at=flush n= depths= rids='); der Scheduler haelt die Tiefen bis zur Schlafantwort (weg2_take_anchors_lost, einmal lesen). (c) Die Gruppenzaun-Stimme des release-Legs traegt anchors_lost (Modulfunktion _weg2_anchors_lost_for_leg, [] auf jedem anderen Leg und ohne Scheduler-Ledger), die Reduktion vereinigt, ReleaseMemoryOccupationReqOutput.anchors_lost, der Tokenizer-Merge vereinigt (Feld fehlt, wenn nichts verloren -> alte Antwortform). (d) Front.flip liest nach completed_tags die Schlafantwort von D und nimmt jeden SpanLRU-Eintrag zurueck, dessen Kredit auf einer verlorenen Tiefe stand (depth_cap, sonst gemessene ct), 'WEG2 PRESENCE-ANCHOR-LOST'; ein Eintrag auf einem ueberlebenden Anker behaelt ihn. Zu viel Zuruecknehmen ist sicher (voller Preis = Preis des X-Gates). Die Rettung des Ankers ueber den Schlaf bleibt bei sgl-project#259 4c. Luecke: Arena-Verdraengung ohne L3 ausserhalb des Flushs erfasst der Ledger nicht (nur die Host-Kopie-Pruefung). Tests test_weg2_anchor_lost_presence_0928 (10): alle rot auf 1ea8133, gruen mit Fix. Nachbarn 18 Dateien (1424g, H113, H74, R12, sgl-project#59, X-exact, Spans, sgl-project#1470, sgl-project#49/P49, flip_cost_1235, 1273 x2, sched_fix3, W35, Profil, H91e, sgl-project#248): 298 gruen auf Fix und Basis, dieselben 5 Altlasten (VramCredit x3, sched_fix3 b4a/b4c).
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 28, 2026
…dit -- Bruecke f833fcb: D schrieb den Anker 37376 in 16-46s eigenem Extend ('sgl-project#1469 RETAIN rid=weg2-16-46 ... cache_len=37376', 19:50:38), 16-48 setzte darauf auf (19:50:51, '#cached-token: 37376'). Der D-Schlaf 19:51:15-16 verweigerte die Host-Sicherung ('sgl-project#1421 BACKUP-REFUSED why=mamba_pin ... pins=8/8', danach 'why=mamba_claim' hinter 'sgl-project#1427 ARENA-CLAIM REFUSED ... no free slot' der 32-Slot-Arena) und setzte den Baum zurueck ('sgl-project#1470 FLUSH-PUBLISH issued=13 unbacked_left=1', 'Cache flushed'). Nach dem Wake gab der Store den KV zurueck (store_hit=37376), aber keinen Anker ('[sgl-project#904 match-census] ... MambaComponent:absent=37376'); die Front preiste weg2-16-54 trotzdem SHORT (presence 35942 src=d_leg2_cached) -> 17 s D-Sitz, dann W31 am X-Gate (38291 Tok) und W50-Umweg ueber P (12 solche in rc12z26, 8 auf der Bruecke). Das X-Gate auf D preist schon die anker-nutzbare Tiefe (W31), die Front nicht. Fix: (a) Instrument: sgl-project#1421 BACKUP-REFUSED nennt depth= und rid= (weg2_node_depth, weg2_anchor_rid). (b) Der Flush zaehlt vor tree_cache.reset() jeden nur-Device-Mamba-Anker mit Tiefe (UnifiedRadixCache.weg2_unbacked_anchors, 'WEG2-ANCHOR-LOST at=flush n= depths= rids='); der Scheduler haelt die Tiefen bis zur Schlafantwort (weg2_take_anchors_lost, einmal lesen). (c) Die Gruppenzaun-Stimme des release-Legs traegt anchors_lost (Modulfunktion _weg2_anchors_lost_for_leg, [] auf jedem anderen Leg und ohne Scheduler-Ledger), die Reduktion vereinigt, ReleaseMemoryOccupationReqOutput.anchors_lost, der Tokenizer-Merge vereinigt (Feld fehlt, wenn nichts verloren -> alte Antwortform). (d) Front.flip liest nach completed_tags die Schlafantwort von D und nimmt jeden SpanLRU-Eintrag zurueck, dessen Kredit auf einer verlorenen Tiefe stand (depth_cap, sonst gemessene ct), 'WEG2 PRESENCE-ANCHOR-LOST'; ein Eintrag auf einem ueberlebenden Anker behaelt ihn. Zu viel Zuruecknehmen ist sicher (voller Preis = Preis des X-Gates). Die Rettung des Ankers ueber den Schlaf bleibt bei sgl-project#259 4c. Luecke: Arena-Verdraengung ohne L3 ausserhalb des Flushs erfasst der Ledger nicht (nur die Host-Kopie-Pruefung). Tests test_weg2_anchor_lost_presence_0928 (10): alle rot auf 1ea8133, gruen mit Fix. Nachbarn 18 Dateien (1424g, H113, H74, R12, sgl-project#59, X-exact, Spans, sgl-project#1470, sgl-project#49/P49, flip_cost_1235, 1273 x2, sched_fix3, W35, Profil, H91e, sgl-project#248): 298 gruen auf Fix und Basis, dieselben 5 Altlasten (VramCredit x3, sched_fix3 b4a/b4c).
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 29, 2026
…teg-0929 (z30y3j: sgl-project#284 REARM_DEFER_HOST, PARK-WINDOW-GATE, W98 bounded-fill, sgl-project#1470 idle-lap)
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 30, 2026
…ubliziert im Leerlauf, die Quiesce wartet nicht auf die eigene Sicherung (zwei Schalter, aus bis Metall)
Befund y4i 09301011 (12 D->P-Flips, Front-Uhr ms-genau, D-Decode t:):
die erste Quiesce-/flush_cache wurde in 11/12 Flips abgewiesen
("not-idle because: hicache_backup(n)"); davor sgl-project#1470 FLUSH-PUBLISH
waited_ms 32-166 (~28 ms je unbesichertem Knoten, n 1 -> 6 ueber den Boot,
write_back-Politik), Wiederholung 7-22 ms plus 10 ms Poll. FLIP begin ->
Quiesce fertig Median 98 ms (53-410). D war vor JEDEM dieser Flips leer:
letztes D-Decode -> FLIP begin 137-333 ms, laenger als die Sicherung.
1. D-IDLE-PUBLISH (SGLANG_WEG2_ENABLE_D_IDLE_PUBLISH, Default aus): der
Sweep des Bubble-Publishers (Nutzerentscheid 16.09., nur im PP-Loop
verdrahtet -- Gruppe D hatte nie eine Blase) laeuft aus Scheduler.on_idle:
nichts laeuft, nichts wartet, nicht dormant (KV gemappt). Tor nur auf
replizierten Zustand (TP-Gleichschritt ueber den Request-Broadcast), keine
Uhr, Deckel SGLANG_WEG2_D_IDLE_PUBLISH_MAX_ISSUE (4) je Durchlauf, ein
Baumgang je forward_ct. Die Acks laufen ueber check_hicache_events.
2. FLUSH-QUIESCE-NONBLOCK (SGLANG_WEG2_ENABLE_FLUSH_QUIESCE_NONBLOCK, Default
aus): die Quiesce (tp-group-Pfad) antwortet "quiesced", wenn auf keinem
Rang etwas anderes blockiert als hicache_write_through/hicache_backup
(zweite Gruppenreduktion, nur wenn group_idle schon False ist -- gleich auf
allen Raengen). Baum, Pools und laufende Schreibvorgaenge bleiben; der
Schlaf-Leg macht vor der kv_cache-Pause, was er schon tut: Gruppen-Drain
(W120 an der Schranke), Idle-Assert, flush_cache(zero_kv=False) mit sgl-project#1470
(Rest publizieren, joinen), #1470b (Store-Queue), ANCHOR-LOST, H81-Arena-
Refs im reset(), Reset -- erst dann die Pause. Kein Knoten unbesichert
weg, keine Seite vor ihrer Kopie entmappt. Die Quiesce-FLUSH-PUBLISH gibt
dabei nur aus (ohne Write-back-Join); bleibt ein Knoten unausgegeben
(Pin-Budget/Arena), laeuft fuer diese Flush die blockierende sgl-project#1470-Schleife.
Gruppen: SGLANG_WEG2_FLUSH_NONBLOCK_GROUPS (Default D). PP-Gruppen unberuehrt.
Tests: test_weg2_flush_nonblock_b1_0930.py 17 passed; auf 835ab6b 14
failed, 3 gruen (die Invarianten-Waechter: Basis-Abweisung, Reihenfolge
Drain < Assert < Flush < kv-Pause, harter Blocker weist ab). Nachbarn
(1470, 1268, h74, anchor_lost, dormant_hold, hold_refetch, h91e, seam_defer,
1189, 1262, 1264, flush_*): 194 passed, 8 failed -- dieselben 8 auf der Basis
(idle_round_fresh_1268 retry, tail_fold_store_h63d Stub ohne
_weg2_note_lost_anchors).
(cherry picked from commit ea00e4a)
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 30, 2026
…s its sgl-project#59 depth after D's sleep leg published it Switch SGLANG_WEG2_ENABLE_D_EPOCH_PUBLISH_PRESENCE (front only, default off). At a D->P flip done D's sleep leg has drained its HiCache writes, published the rest (sgl-project#1470) and joined the store queue (#1470b) before the kv pause. TokenSpans.promote_published(done_epoch): every text D served (held credit) in an epoch before done_epoch that carries D's own sgl-project#59 weg2_resumable_depth gets that depth as a STORE presence -- never the prompt, never past the text; no sgl-project#59 depth, no credit; the current epoch untouched. The depth is kept in TokenSpans.published BESIDE the entry: pending() credits it only where it lies on the new text's shared path, so the entry's lower measured anchor still credits a text that diverges earlier (folding it into ct lost weg2-134-146 in the replay). A new D reading of the text (a W31 refusal's small cached_tokens) pops it: the over-credit is refused, not repeated. Line 'WEG2 D-EPOCH-PUBLISH-PRESENCE', counters d_epoch_publish_presence[_tokens], then the queue reprice. Replay (fixture re-extracted: flip begin/done, D-side 'sgl-project#59 RESUMABLE' depths from the D log; the router's held-credit rule 'D awake AND serving'; a re-priced queued LONG reaches D only through the short drain, i.e. while D is awake and serving) on w109290020: OFF 59 LONG, L1 (P-anchor presence) 38 -- 21 moved (7 by the reprice at the witness), none back (supersedes the 58 -> 43 of 75833a7, which had no flip state, no D depths, no reprice); L2 alone 56 (3 moved: weg2-15-18, 27-27, 90-99), L1+L2 38 -- L2 adds NOTHING on top of L1 here: the 7 DDIRECT_GAP turns were priced DURING the D->P flip already under way (no held credit, no witness yet); their LONG route costs no extra flip, the flip happened anyway. Recommendation: L2 stays OFF (not in the flip-levers patch); L1 is the lever. Tests: test_weg2_d_epoch_publish_49_0930.py 5 (witnessed depth never the prompt; no depth / current epoch -> nothing; divergence keeps the lower anchor; DANGER: D's contradicting reading retracts -> LONG again; front hook only at D->P and switched on). Replay file 6 (+L2 arm). test_weg2_front_x_exact: the reprice-hook count 4 -> 5 with the new hook's guard pinned. Neighbours (40 files importing front_tokens / X-EXACT / flip): 0 new failures vs 75833a7.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 30, 2026
…s its sgl-project#59 depth after D's sleep leg published it Switch SGLANG_WEG2_ENABLE_D_EPOCH_PUBLISH_PRESENCE (front only, default off). At a D->P flip done D's sleep leg has drained its HiCache writes, published the rest (sgl-project#1470) and joined the store queue (#1470b) before the kv pause. TokenSpans.promote_published(done_epoch): every text D served (held credit) in an epoch before done_epoch that carries D's own sgl-project#59 weg2_resumable_depth gets that depth as a STORE presence -- never the prompt, never past the text; no sgl-project#59 depth, no credit; the current epoch untouched. The depth is kept in TokenSpans.published BESIDE the entry: pending() credits it only where it lies on the new text's shared path, so the entry's lower measured anchor still credits a text that diverges earlier (folding it into ct lost weg2-134-146 in the replay). A new D reading of the text (a W31 refusal's small cached_tokens) pops it: the over-credit is refused, not repeated. Line 'WEG2 D-EPOCH-PUBLISH-PRESENCE', counters d_epoch_publish_presence[_tokens], then the queue reprice. Replay (fixture re-extracted: flip begin/done, D-side 'sgl-project#59 RESUMABLE' depths from the D log; the router's held-credit rule 'D awake AND serving'; a re-priced queued LONG reaches D only through the short drain, i.e. while D is awake and serving) on w109290020: OFF 59 LONG, L1 (P-anchor presence) 38 -- 21 moved (7 by the reprice at the witness), none back (supersedes the 58 -> 43 of 75833a7, which had no flip state, no D depths, no reprice); L2 alone 56 (3 moved: weg2-15-18, 27-27, 90-99), L1+L2 38 -- L2 adds NOTHING on top of L1 here: the 7 DDIRECT_GAP turns were priced DURING the D->P flip already under way (no held credit, no witness yet); their LONG route costs no extra flip, the flip happened anyway. Recommendation: L2 stays OFF (not in the flip-levers patch); L1 is the lever. Tests: test_weg2_d_epoch_publish_49_0930.py 5 (witnessed depth never the prompt; no depth / current epoch -> nothing; divergence keeps the lower anchor; DANGER: D's contradicting reading retracts -> LONG again; front hook only at D->P and switched on). Replay file 6 (+L2 arm). test_weg2_front_x_exact: the reprice-hook count 4 -> 5 with the new hook's guard pinned. Neighbours (40 files importing front_tokens / X-EXACT / flip): 0 new failures vs 75833a7. (cherry picked from commit 3ec239f, desk/27b-front-span-49-0930; environ.py: beside the RPC-STALL-WATCHDOG entry)
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Oct 13, 2026
…loop is progress-aware (review flushfast-1012 finding 1) The first version stopped the loop at round 0 whenever every un-backed node was arena-refused. Metal disproves "cannot be followed by a round that issues": int24g D.log sleep leg epoch 105, round 0 n=987 unbacked=66 issued=0 refused=66 in_flight_after=16, then n=988 issued=2 in_flight_after=3, n=989 issued=3, FLUSH-PUBLISH issued=5. With the stop at round 0 those 5 nodes landed at the reset. Now the stop needs a round before it (round 0 never stops) AND issued==0 AND all un-backed arena-refused AND the in-flight count not lower than the round before (no write landed during the wait). A round whose wait let writes land goes on. Fix B (the skip under R12, one claim per sweep) is unchanged and makes each round ~100-200 ms. Marker text unchanged in name (sgl-project#1470 FLUSH-PUBLISH ARENA-FULL-STOP), now with "(round before: N)". No flag, no ENV, no threshold. Tests (pytest_gedeckelt.sh, HOME=/root, one lock hold, no GPU): - test_flush_arena_full_stop_flushfast_1012.py + test_sweep_full_arena_skip_1007.py: 23 passed, 0 failed, 0 skipped. New: arena full in round 0 / writes land / room frees -> loop continues and issues; writes landing keep the loop going until a stuck round. On c59d8bd the new file: 6 failed, 4 passed (red). - 9 mutants (loop break removed, R12 disarms skip, break on any refusal, skip records nothing, claimed refusal not counted, any refusal counted, no progress check, round 0 may stop, prev never updated): all killed (1-6 failed each). - Gate set (99 files by flush/sleep/arena/hicache/park/pool_leak/r12/form_a content + NF goldens test_nf_n3_unchanged_1005, test_planer_referenz_n3_1006): fix tree 1217 passed / 19 failed / 6 skipped, base c59d8bd 1215 / 20 / 6; failing IDs of the fix tree are a subset of the base's (timing/env tests).
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Oct 13, 2026
…loop is progress-aware (review flushfast-1012 finding 1) The first version stopped the loop at round 0 whenever every un-backed node was arena-refused. Metal disproves "cannot be followed by a round that issues": int24g D.log sleep leg epoch 105, round 0 n=987 unbacked=66 issued=0 refused=66 in_flight_after=16, then n=988 issued=2 in_flight_after=3, n=989 issued=3, FLUSH-PUBLISH issued=5. With the stop at round 0 those 5 nodes landed at the reset. Now the stop needs a round before it (round 0 never stops) AND issued==0 AND all un-backed arena-refused AND the in-flight count not lower than the round before (no write landed during the wait). A round whose wait let writes land goes on. Fix B (the skip under R12, one claim per sweep) is unchanged and makes each round ~100-200 ms. Marker text unchanged in name (sgl-project#1470 FLUSH-PUBLISH ARENA-FULL-STOP), now with "(round before: N)". No flag, no ENV, no threshold. Tests (pytest_gedeckelt.sh, HOME=/root, one lock hold, no GPU): - test_flush_arena_full_stop_flushfast_1012.py + test_sweep_full_arena_skip_1007.py: 23 passed, 0 failed, 0 skipped. New: arena full in round 0 / writes land / room frees -> loop continues and issues; writes landing keep the loop going until a stuck round. On c59d8bd the new file: 6 failed, 4 passed (red). - 9 mutants (loop break removed, R12 disarms skip, break on any refusal, skip records nothing, claimed refusal not counted, any refusal counted, no progress check, round 0 may stop, prev never updated): all killed (1-6 failed each). - Gate set (99 files by flush/sleep/arena/hicache/park/pool_leak/r12/form_a content + NF goldens test_nf_n3_unchanged_1005, test_planer_referenz_n3_1006): fix tree 1217 passed / 19 failed / 6 skipped, base c59d8bd 1215 / 20 / 6; failing IDs of the fix tree are a subset of the base's (timing/env tests).
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Oct 13, 2026
…t-g 7f1f374 + earlycap-g db1f898 + hostwarn-g 86b1b26, no code change in this commit Four git merge --no-ff steps (3ed54ac = head of the merges), no conflict, no code change beyond the merged commits (patch-ids of every merge delta equal the delta of the single branch and of the int24f3 merges; diff int24f3..int24i has the same patch-id as int24f..int24g). Markers present: WEG2 COLLECT-P-QUEUED rid=, sgl-project#1470 FLUSH-PUBLISH ARENA-FULL-STOP, WEG2 LEG1-EARLY seat-cap=, WEG2-FLIP outstanding, HOST-RAM-WARN. Tests (pytest_gedeckelt.sh, HOME=/root, CUDA_VISIBLE_DEVICES empty, one lock hold, test_pp_dead_peer_is_not_the_wedge_801 excluded): - six fix test files (collect_p 9, flush_arena_full_stop 10, sweep_full_arena_skip_1007 13, leg1_early_seat_cap 9, leg1_early_1002 3, host_warn_w98 19): 63 passed, 0 failed, 0 skipped - the four new files on base 09235ed: 31 failed / 16 passed (red) - gate set 400 files (front/routing/X-SUM, flush/arena/park, rate-latch/sleep-leg/front-loop-blockers, NF goldens): head 4515 passed / 139 failed / 43 skipped; base 09235ed (396 files) 4468 / 138 / 43; 138 failing ids common; 1 head-only id is a load test: test_a_real_prewarm_holds_the_loop_under_120_ms (single runs head 2/8 red, base 1/8 red) - NF goldens test_planer_referenz_n3_1006: 4 failed on head and base alike (environment)
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Oct 13, 2026
…518cac + earlycap a9475c3 + hostwarn 2c8db9c, no code change in this commit Four git merge --no-ff steps (cfeb289 = head of the merges), no conflict, no code change beyond the merged commits (patch-ids of every merge delta equal the delta of the single branch). Markers present: WEG2 COLLECT-P-QUEUED rid=, sgl-project#1470 FLUSH-PUBLISH ARENA-FULL-STOP, WEG2 LEG1-EARLY seat-cap=, WEG2-FLIP outstanding, HOST-RAM-WARN. Tests (pytest_gedeckelt.sh, HOME=/root, CUDA_VISIBLE_DEVICES empty, one lock hold, test_pp_dead_peer_is_not_the_wedge_801 excluded): - six fix test files (collect_p 9, flush_arena_full_stop 10, sweep_full_arena_skip_1007 13, leg1_early_seat_cap 9, leg1_early_1002 3, host_warn_w98 19): 63 passed, 0 failed, 0 skipped - the four new files on base c59d8bd: 31 failed / 16 passed (red) - gate set 399 files (front/routing/X-SUM, flush/arena/park, rate-latch/sleep-leg/front-loop-blockers, NF goldens): head 4505 passed / 140 failed / 43 skipped; base c59d8bd (395 files) 4459 / 138 / 43; 138 failing ids common; 2 head-only ids are load tests: test_a_real_prewarm_holds_the_loop_under_120_ms (single runs head 1/8 red, base 5/8 red) and DcOffPath::test_switch_on_moves_the_settled_reading_off_the_flip (3 single runs: head 0 red, base 0 red) - NF goldens test_planer_referenz_n3_1006: 4 failed on head and base alike (environment)
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Oct 16, 2026
…ng wird vor dem Told wach nachgefragt; jede geraeumte L3-Datei traegt eine Zeile weg2-5-52 (Boot 133855): P's LEG1-EARLY-Lesung (13:50:19.398, sgl-project#1443 ruhend) fiel in D's NONBLOCK- Flush desselben Flips (sgl-project#1470 FLUSH-PUBLISH unbacked_left=5 ... B1 NONBLOCK, Park-End-Anker nach L3 13:50:20): #1028B kv=1730 claimed=27 caps={qsa_indexer: 47, mamba: 27} -> 108999 Tok neu. Bindend war die QSA-Kappe 47 (ALL_PAGES); mamba 27 ist ihre Folge (Trailing-Suche innerhalb final_pages). Ein Divert-Gate auf PARK-DEMOTE pool=anchor haette den Fall nicht geaendert (Divert 37 s vor der Lesung, End-Anker lag in der geteilten Arena) -- nicht gebaut. Fix: der sgl-project#1443-Hold markiert req._weg2_read_dormant; P-HELD-REREAD fragt fuer eine solche Lesung vor dem Told EINMAL wach den Store (#1416c/d-Vollspannen-Frage, Fetch-Schluesselform) und liest neu, wenn er >= 1 Seite mehr haelt; ruhend nur Halten. PP0 entscheidet, Folger folgen dem Told. Schalter SGLANG_WEG2_P_WAKE_PROBE, Vorgabe AN. L3-EVICT-FILE stem= comp= bytes= age_s= why=<cap|cap_bg|min_free> run= n= je geraeumter Datei (auch L3-PAIR-Zwillinge), gedeckelt je Lauf (SGLANG_HICACHE_L3_EVICT_FILE_LOG, Vorgabe 64), Rest in L3-EVICT-FILE SUMMARY. BACKUP-REFUSED im Flip-Flush (Fall 127: refused=3 mamba_pin, Abschluss unbacked_left=0 -- Pin-Deckel ist Rundenbreite, der Flush wartet schon auf freie Pins): kein Code. Echte Luecke ARENA-FULL-STOP auf Form A ist der K10-Port bb54ba5 (desk/nf-h16p-k10-1015), nicht doppelt gebaut. Basis: Merge desk/nf-h16p-k12b-1015 @ cd8c500 (aa52e61838). Tests: test_weg2_zero_anchor_store_complete_1015.py 19 gruen, auf aa52e61838 6 rot (die neuen). Mutanten: Probe auch ruhend ROT 1, Probe bei jedem Told ROT 1, Vorgabe AUS ROT 2, keine Datei- Zeile ROT 1, Deckel weg ROT 1. Regression 180 Dateien in 9 Paketen: 1834 Tests, Kopf 39 rot = Basis 39 rot, nur-Kopf 0 (Paket 100-119 auf beiden Seiten am 4-GiB-Deckel beendet, rc=137). Kaltstart-Rig s7s8 @ 2820a88 28/28 GRUEN rc=0.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Oct 16, 2026
…iegelt) -- der Sleep-Flush findet Platz, wenn host-only Knoten die KV-Arena halten (h109 weg2-66-470) NF h16q2, Boot 1016_051456, D 06:25:38 (D>P-Sleep): sgl-project#1470 FLUSH-PUBLISH ARENA-FULL-STOP unbacked=54 arena_refused=54 (TP0), unbacked_left=59 (TP1/TP2), sgl-project#1421 arena_claim depth=57472/66240/66304 auf den Workern, W3-ARENA SPILL candidates=0 -- die KV-Arena war von host-only Knoten gehalten; die Geraeterunde nimmt sie nie, die Host-Leaf-Runde (Port 27B Q-697c) nur auf dem local-PP-Floor. Der Reset verwarf weg2-66-458's Schwanz (KV 56512..65024 + End-Anker), weg2-66-470 setzte bei 56512 auf: 8779 gerechnet, 1739 gepreist. TP1/TP2 sgl-project#988 extent=40640 ist der Host-Anteil hinter dem Geraetekopf 15872 (TP0 56512), dieselbe Lesung auf allen Raengen. Fix: host_only_spill.armed ist auf Form A fuer TP0 (role host) scharf; _w3_arena_spill sammelt die dabei verworfenen Knoten per _r12_rec und schickt sie als R12-STATE (why=w3_host_leaf) an die Worker, wie evict_host; Worker nehmen die Runde nie selbst. L3-Kopie jeder Seite zuerst (bestehende Regel). Schalter SGLANG_WEG2_W3_HOST_LEAF_FORMA, Vorgabe AN. Tests: test_weg2_k15b_forma_host_leaf_spill_1016.py 4 + dual15 4 gruen.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Oct 16, 2026
…emo-lite, FLUSH-UNBACKED named The P->D quiesce of 11:29:08 (boot ..._1f4b3e73d4_1016_103428): 24 /flush_cache polls code=400, 14278 ms (WEG2-QUIESCE-PENDING first_pending_to_200_ms=14127), every refusal "not-idle because: hicache_backup(1)" / hicache_write_through, blocking_rank 1 (and 0). In the window 11:29:08-11:29:22: PP0 130 PUBLISH-SWEEP against 26 sgl-project#1470 FLUSH-PUBLISH, PP1 23 / 0, PP2 24 / 0 -- a follower never runs flush_cache per poll (CTRL-RECV -> CTRL-FWD, answer through the sgl-project#1268 lap), so EVERY follower sweep and most of PP0's came from the bubble publisher (a sweep per 0.2 s of idle loop, max 16), and their write-throughs, acks and #106S sidecar store writes were the blockers the vote saw. Also 29 #1427r CLAIM-RELEASE site=claim_refused (13/9/7) and 70 sgl-project#1421 BACKUP-REFUSED why=arena_claim: each sweep's first claim on the full arena was a real one, partially taken and given back. Correction recorded: every write-back the window issued had room for its whole need (alloc_write issues only on a full claim); the 14 s are real writing into an almost full arena -- the room is F1's (shared slot spill, ae3675d). (a) While a quiesce is open -- from the first poll a rank receives (request_receiver sgl-project#1458 intake, every rank; also flush_cache) until the sleep leg (ReleaseMemoryOccupation), the flush's reset, or a launched batch -- the bubble publisher issues no sweep; publishing belongs to the sgl-project#1470 loop alone (max_issue 256, up to 64 rounds per poll), no node is lost. Switch SGLANG_WEG2_BUBBLE_QUIESCE_PAUSE (default on). (b) MEMO-LITE: a node whose last claim was refused for arena room is asked the room question (_weg2_full_arena_refuses -> claim_would_refuse) before any claim, also as a sweep's first claim; a memo skip engages the sweep's SWEEP-FULL-ARENA mode. Remembered until a claim of it succeeds (bounded 4096). Switch SGLANG_WEG2_SWEEP_REFUSED_MEMO (default on). (c) sgl-project#1470 FLUSH-UNBACKED site= nodes= tokens= pending= ids= before the flush's reset: device KV neither on the host nor in the store that the reset drops -- measured, never silent (planner: do we lose tokens today?). The NF-W3-DRAIN invariant (an un-acked store backup blocks the vote) is untouched; its test stays green unchanged. No strict per-quiesce memo (planner decision: no token loss for a faster flip). Files: managers/weg2_bubble_publish.py (quiesce_begin/end, pause), scheduler_components/request_receiver.py (every rank opens at the poll, the sleep leg closes), managers/scheduler.py (flush_cache opens, names, closes at the reset), mem_cache/unified_radix_cache.py (memo-lite in publish_unbacked_sweep; _w3_arena_spill / _weg2_evict_spill_room / host_only_spill untouched), managers/weg2_flush_nonblock.py (unbacked_census, note_unbacked_at_reset). Tests (pytest_gedeckelt): 45 passed in one turn: test_weg2_quiesce_publish_f5_1016.py (6), the UNCHANGED invariant test_weg2_backup_ack_drain_on_vote_1014.py, test_sweep_full_arena_skip_1007.py, test_weg2_bubble_publish_1406.py, test_weg2_flush_publish_join_1470.py, test_flush_sweep_memo_1403.py, test_weg2_idle_lap_own_work_1470_0929.py, plus the mutant aggregate. RED: mutant F5r (bubble pause off) -- the 11:29:08 window runs ~56 opportunistic sweeps in 14 s. Mutants KILLED: F5a the quiesce never opens, F5b a launched batch does not end it, F5c memo-lite never consulted, F5d never records, F5e a memo skip does not engage the full-arena mode, F5f the census counts backed nodes, F5g a follower's intake does not open the quiesce. Re-applied on top of the F3/F2 review fixes 7e22656 (cherry-pick of 9dd5b7c3cf; the mutant script merged: the review list plus the F5 constants and entries). On this integrated tip: 69 passed in one turn -- the F5 test, the UNCHANGED invariant test_weg2_backup_ack_drain_on_vote_1014.py, test_sweep_full_arena_skip_1007.py, test_weg2_bubble_publish_1406.py, test_weg2_flush_publish_join_1470.py, test_flush_sweep_memo_1403.py, test_weg2_idle_lap_own_work_1470_0929.py, test_weg2_room_arbiter_1016.py, test_weg2_room_verdicts_1016.py; mutants F5r (RED), F5a-F5g, F3r, F2r all KILLED.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Oct 20, 2026
…anks give back the tree references of pages L3 holds (group-agreed veto, digest barrier), so the sgl-project#1470 flush finds room for park-end chains; review conditions A1-A3 (W86 named stop on DIVERGED/post-collective error, collectives pinned in 1537 P8 and 1537b (d), fail closed); S86 accepted by the planner Conflict only in catalog.json, resolved by the generator over the merged tree: 2892 = union (2891 / 2887), missing 0, extra 0 (new: FLLIPER_PDFLIP_SLEEP_L3_RELEASE, default on). environ.py, weight_updater.py and the pin tests merged automatically.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Oct 20, 2026
…cord AND sgl-project#1459 index and queue; 0 file I/O on the scheduler thread, transitively (SOLL R7 R11; user 20.10.) User order 20.10. (verbatim): "UND WEHE DAS SCHREIBEN IN DEN CACHE BLOCKIERT DURCH IRGENDEINE SYNCHRON ODER WARTESCHEISSE". (1) ArenaMHAHostPool._evict_for_claim (sgl-project#257 d, scheduler thread): l3_secured.unsecured_keys_lo (one C census of the COMPLETE slots + memory reads) puts every page without an L3 copy -- by the write-behind's published record or the shared sgl-project#1459 L3 stem index (HiCacheFile.l3_listed: the evictor's exact shm bookkeeping, no stat, no open) -- on the keep list of every stage and queues it for the write-behind; the taken candidates are verified, never written (l3_secured.verify_candidates; one that re-completed between census and clock is the old stage-iii loss, named). (2) HiCacheFile._arena_evict_to_disk (clock evict): the same keep list (extra_lo); none copied: S109d ARENA-EVICT PENDING, asked again; a race: S109d ARENA-EVICT RACE dropped_without_l3. Note: its callers are the storage / fill threads (batch_get, _batch_set_each, _arena_fill_from_disk_impl, _await_fill_room_loop), not the scheduler thread; converted per the order (writing into the cache is never held by a synchronous write). Return value unchanged (pages written: 0 now). (3) ArenaMambaPoolHost.anchor_held: arena COMPLETE -> True; else the sgl-project#1459 index (l3_listed), never a stat; no opened index -> None (cannot tell). A reader attaches the shared record at most once a second until the owner made it (ATTACH_RETRY_S). Review 20.10. ("NEIN in dieser Form", deskq/done/nf-s108-s109-review-1020.md), fixed before this commit: A1 (data loss) l3_secured.secured / unsecured_keys_lo = published record (this generation) AND the sgl-project#1459 L3 index (HiCacheFile.l3_listed, registered per arena at _open_arena); and the L3 LRU evictor's on_evict (HiCacheFile._l3sec_on_evict, its own thread) voids the record of every slot holding the evicted stem. A file the L3 cap unlinked is never read as a copy again. Review tests R4/R5 green (R1-R3 skip without S108). A2 ArenaMambaPoolHost._secure_before_drop is read-only (returns the keep set; drop_unreferenced drops only copied anchors, queues the rest, check writer "anchor_drop"); old body kept as _secure_before_drop_now (writer form). H19 displacement (park spill, flush spill) therefore no longer stats or writes 56 MiB + fsync on the scheduler thread. The check is TRANSITIVE now: a runtime guard counts every os.stat/lstat/open/fsync, builtins/io.open, HiCacheFile.arena_secure_to_disk/_stat_stems call on the calling thread through claim, clock, secure_rows_to_l3, H19 displacement (3-rank harness) and the S86 sleep release + sgl-project#1470 flush round: 0. It found one more: hicache_arena._evict_gens_for did os.path.realpath (an lstat per path component) on every claim/clock call -- resolved once at ShmArena attach now. A3 verify_candidates returns a mask; claim and clock free only candidates with a copy. A race candidate without one (re-completed between census and clock) is NOT freed and NOT counted lost: l3_secured.hand_over queues it for the hand-over writer (thread pdflip-l3-evict-handover: arena_secure_to_disk writer=evict_handover, then free_evicted_named); a failed copy keeps it EVICTING, named (S109-A3 EVICT-HANDOVER). A4 request() sets l3_secured.WAKE; the write-behind waits with wait_or_stop(stop, wait_s), so a queued page is written at once instead of at the next 2-s tick. S86 before the sleep (rc19): with the pinned pages copied by the write-behind the park-end chain gets in, lost_tokens 0, 0 file I/O; with half of them still uncopied S86 keeps those (not_on_l3) and the released half is room enough, lost 0, the request woke the write-behind. Boundary, named not hidden: with NONE of the pinned pages copied at the sleep, S86 releases nothing (not_on_l3:N) and the chain is lost as on the S85 base (S85 PARK-END-UNBACKED lost_tokens>0 in the log) -- the old S86 wrote the copies synchronously there, which the order of 20.10. forbids. Source check over all 17 scheduler forms (test_s109d_zero_file_io_on_every_scheduler_form) + the transitive runtime guard above: 0 file I/O. Mutants (test/registered/unit/mem_cache/mutants_s109_1020.py, serial under /spinning/gpu-arb/pytest.lock): 16 of 16 killed (M1-M8: secured counts all; claim / clock without the keep list; anchor_held stat; no publish; aux stage off; S109c worker decides; pending counted as copied. A1a secured record alone; A1c census record alone; A1b LRU evict leaves the record; A2a drop_unreferenced drops uncopied anchors; A2b realpath per call; A3a claim frees uncopied race candidates; A3b hand-over frees without a copy; A4 request does not wake). Checks of the order: (a) the write-behind never pauses for flip or sleep: quiet_reason() is None since S36 (18.10.); rc26/rc25 D+P 0x "L3-REUSE WRITE-BEHIND gate="; D TP0 26 passes paused=- inside its 25 sleep windows (383 s), P PP0 21 while asleep. (b) "== RANKS -> == 1" is right under Form A: one shared /dev/shm arena attached by TP0/TP1/TP2 (rc26 D 5539/5542/ 5559), token cut [0, 9, 7] with each owner writing its own rows of every page (D 8/10, arena_pool.py:1462 sgl-project#239 S4b F14), COMPLETE only when the page is full (hicache_arena.py:1060), the write-behind writes whole COMPLETE slots (hicache_storage.py:3842/3967); the mamba anchor arena is TP0's alone (D 5564). Tests seam: the conftests of mem_cache/, pdflip/ and (new) managers/ swap in the writer's forms (verify_candidates_now = the pre-S109d sgl-project#257 write, byte for byte; unsecured_keys_lo_none) for the claim/clock LOGIC tests; adapted pin: test_pdflip_anchor_only_backup_0930::test_y6b_anchor_held_reads_the_arena_then_the_l3_index (the index, not a stat). TESTS (serial, flock /spinning/gpu-arb/pytest.lock, systemd-run --scope -p MemoryMax=2G, CUDA_VISIBLE_DEVICES=""): 91 affected suites (incl. test_review_s108_s109_1020 from review/nf-s108-s109-1020 66db115b2f): 85 green, 6 with only the pre-existing reds below (10 tests, identical to the base). The review snapshot's 8 reds (test_pdflip_d_norecompute_1002 1, test_pdflip_mamba_last_resort_1008 3, test_pdflip_park_end_anchor_first_1303 4): green (9/7/19 passed). test_s109_backup_wall_aux_leaves_1020 35 passed, test_s86_sleep_l3_release_1020 11, test_pdflip_mamba_arena_displace_h19 9, test_review_s108_s109_1020 2 passed 3 skipped. Pre-existing red on rc27 56f3a0c (checked in a base worktree): test_pdflip_read_room_1015 (1), test_pdflip_arenafull_1015 (2), test_arena_l3_fill_group_rc12z (1), test_flush_arena_full_stop_flushfast_1012 (2), test_l3_fill_orphan_claim_nf (2), test_pdflip_prefix_trace_in (2).
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.
Multiple critical bug fixes
#1469
#1454