DLM rung-2: real cross-node $ENQ GRANT (vms-e8f1 / vms-17c, H4) - #849
Merged
Merged
Conversation
…cutive
H4, the crown of the 0.6 DLM ladder: the first rung that MODIFIES THE EXECUTIVE.
vms_lock_dlm_xnode_dispatch (src/kernel-core/vms_lock.c) now GRANTS an inbound
cross-node $ENQ for a resource mastered on this node, instead of the rung-1
honest SS$_UNSUPPORTED stub.
Executive (kernel-core, rides the 3-way gate {x86_64, VAX ILP32, Alpha LP64}):
- vms_lock_dlm_xnode_dispatch ENQ case marshals the decoded request into
vms_enq_core() with owner_csid = req->req_csid, so the master's lock record is
held FOR the REMOTE requester's cluster identity, not the local delivery
daemon. Compatible -> SS$_NORMAL (grant); LCK_M_NOQUEUE fences out cross-node
contention (incompatible -> SS$_NOTQUEUED, no wait queue); no SYNC/VALBLK/AST.
DEQ/GRANT/BLKAST still decline honestly (later rungs). INV-6: genuine grant,
never a fabricated SS$_NORMAL.
- vms_lock_entry gains req_csid (the CSID a lock is held for; 0 = local),
stamped in vms_enq_core from vms_enq_args.owner_csid.
- GET_RESMASTER reports remote_holder_csid -- the CSID a remote-held grant is
held for -- so a test PROVES the master genuinely holds a lock for a peer,
not just that n_granted rose. Both fields reuse existing struct pad (no ABI
size change; static_asserts unchanged). Mirrored into the NetBSD headers.
Transport (SCSD, src/vmsscs/scsd.c):
- scsd_dlm_dispatch_to_executive, on a granted ENQ, reads B's own lock DB back
(GET_RESMASTER, same registered fd) and prints SCSD-I-DLMHELD -- a READ of
real executive state. DLMRX/DLMGRANT/DLMDONE wording is now status-aware
(GRANTED vs honest decline). The H0 --dlm-selftest switches ENQ->DEQ so it
stays a side-effect-free "executive reached" probe (still 2296), leaving the
H0 harness untouched.
Proof -- H4 harness (extends H3): tests/qemu/{Dockerfile.dlm-harness-h4,
init_dlm_h4.sh,run_dlm_harness_h4.sh} + a dlm-harness-h4 CI job on the
dlm_harness path filter. Two real-/dev/vms QEMU nodes join, node A issues a
cross-node $ENQ for a B-mastered resource, and the verdict asserts (a) B's
dispatch = SS$_NORMAL and (b) B holds the lock for A's CSID (SCSD-I-DLMHELD
held_for_csid == A's CSID, n_granted>=1, is_local_master=1). H3's verdict is
updated to the grant (SS$_NORMAL) so it stays green; test_kmod_dlm_xnode is
retargeted to the foundation grant + a contention scope-fence (SS$_NOTQUEUED).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The H3 assertion already expects SS$_NORMAL (the rung-2 grant); only the diagnostic echo line still said 'want 2296'. Cosmetic, log-only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Aug 28, 2026
baron-3dl
added a commit
that referenced
this pull request
Aug 28, 2026
…ce parity, SHOW USERS de-fab (#858) Bumps OVMX_PRODUCT_VERSION and os-release V0.5-7 -> V0.5-8. 14 commits since V0.5-7. Distributed Lock Manager — the cross-node ladder tops out at a real GRANT: - #849 vms-e8f1/vms-17c DLM rung-2 (H4): the first REAL cross-node $ENQ GRANT — node B holds a lock on A's behalf for A's CSID, $ENQ returns SS$_NORMAL over live SCS (no longer INV-6 "grants nothing"). The distributed lock manager now actually locks across nodes. - #845 vms-209 DLM harness H3 — a cross-node $ENQ reaches node B's real executive - #843 vms-4bd0 DLM harness H2 — two real-executive QEMU nodes complete the full VMS$VAXcluster join - #842 vms-534 DLM harness H1 — two real-executive nodes exchange the 0x6007 HELLO over a socket netdev - #840 vms-4b6 DLM harness rung H0 — SCSD.EXE composes with a real executive - #841 docs Alpha cross-node DLM wire oracle — observed SCS transport + documented GRANT semantics (Rule 8) Alpha co-release parity — authenticated login + the shared SHOW battery: - #852 vms-f2c Alpha DCL/SHOW acceptance parity — the same shared 11-command battery x86_64 runs, now on qemu-system-alpha - #847 vms.ko guards BG fork-inherit tracepoints behind CONFIG_TRACEPOINTS (Alpha P0 modpost fix) Authenticity (INV-6 de-fabrication): - #839 vms-6a1 SHOW USERS fails honestly when the executive is absent — no more per-process fabricated user list Boot console fidelity: - #850 vms-dec kill boot-console newline spam (the operator's echoed RETURNs) + a type-during-boot regression gate Networking (layered-product promotion): - #851 vms-67f TCP/IP Services promoted to a first-class layered product — build plan + roadmap (1.0 blocker) Docs / ledger: - #745 Alpha C-RTL archive DECIDED — Option A (operator ruling 2026-08-23) - #709 vms-da0 OpenVMS GCC port × OVMX faithful-surface gap analysis - #838 reconcile the release block for the V0.5-7 tag (INV-LEDGER) QA'd under KVM boot-to-login on the workshop host with the full SHOW acceptance battery VMS-faithful; boot console clean (no newline flood) and SHOW USERS honest. Release notes are generated at tag time by tools/gen_release_notes.py (INV-LEDGER single-ledger); the roadmap narrative block + public site are the conductor's reconcile (INV-0/INV-LEDGER). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
baron-3dl
added a commit
that referenced
this pull request
Aug 28, 2026
) Renames tests/qemu/test_kmod_dlm_xnode.c -> test_syssvc_dlm_xnode.c so the cross-node DLM RECEIVE-handler proof runs in the qemu_syssvc_tests family on BOTH x86_64 and Alpha LP64 from a SINGLE source (DRY). On qemu-system-alpha, with a freshly-built merged vms.ko (#849), it asserts the LIVE rung-2 grant: a compatible cross-node $ENQ is GRANTED (SS$_NORMAL) and held for the REMOTE requester's CSID, an incompatible one declines SS$_NOTQUEUED (NOQUEUE fence, not queued/faked), DEQ/GRANT/BLKAST honestly decline SS$_UNSUPPORTED, and bad-mode/op/empty-name are refused SS$_BADPARAM. 16/16 pass, modpost clean -- proving the vms_dlm_xnode_args / vms_enq_args LP64 struct layout is width-correct. - syssvc contract: honest SKIP (77) when /dev/vms is absent, never a fake pass. - tests/qemu/CMakeLists.txt: per-target src/kernel include (vms_ioctl.h). - facility_defects.sh: new genuine negctl 'dlm-xnode-mode-unvalidated' + anchor (neuters the dispatch's lock-mode bounds check; reddens ONLY the bad-mode assertion) so the new test_syssvc_ suite is covered, not floor-bumped (INV-6). - cross-ref comments in vms_kif.h/scsd.c/test_scsd_wire.c follow the rename. Verified: qemu-system-alpha DRIVER_RC=0, SUITE rc=0 (16 pass / 0 fail). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
H4 — the crown of the 0.6 DLM ladder: the first rung that MODIFIES THE EXECUTIVE
Makes
vms_lock_dlm_xnode_dispatch(src/kernel-core/vms_lock.c) actually GRANT an inbound cross-node$ENQfor a resource mastered on this node, instead of the rung-1 honestSS$_UNSUPPORTED(2296) stub. Grounded ondocs/research-alpha-dlm-wire.md§7 (rung-2 GRANT semantics from public$ENQ/$LCKDEF/IDSM/Cluster Systems sources). Clean-room Rule 8 respected — no VSI/HPE disassembly.Executive (kernel-core; rides the 3-way gate {x86_64, VAX ILP32, Alpha LP64})
vms_enq_core()withowner_csid = req->req_csid, so the master's lock record is held for the REMOTE requester's cluster identity, not the local delivery daemon. Compatible →SS$_NORMAL.LCK_M_NOQUEUEfences out cross-node contention (incompatible →SS$_NOTQUEUED, no wait queue); noSYNC(never blocks the delivery thread); noVALBLK/AST (LVB replication + blocking-AST are later rungs).DEQ/GRANT/BLKASTstill decline withSS$_UNSUPPORTED.vms_lock_entrygainsreq_csid(the CSID a lock is held for; 0 = local), stamped invms_enq_core.GET_RESMASTERreportsremote_holder_csidso a test can PROVE the master genuinely holds a lock for a peer. Both fields reuse existing structpad— no ABI size change, static_asserts unchanged. Mirrored into the NetBSD headers.Transport (SCSD)
On a granted ENQ,
scsd_dlm_dispatch_to_executivereads B's own lock DB back (GET_RESMASTER, same registered fd) and printsSCSD-I-DLMHELD— a READ of real executive state. DLMRX/DLMGRANT/DLMDONE wording is now status-aware. H0--dlm-selftestswitches ENQ→DEQ so it stays a side-effect-free "executive reached" probe (still 2296) — H0 harness untouched.Proof — H4 harness (
dlm-harness-h4CI job)Two real-
/dev/vmsQEMU nodes join, node A issues a cross-node$ENQfor a B-mastered resource. Ran locally under KVM — PASSED:held_for_csid=1601 is node A's real SCSSYSTEMID (OVMXA) — B's resource DB genuinely holds the lock for A's cluster identity, not a fabricated
SS$_NORMAL.test_kmod_dlm_xnoderetargeted to the foundation grant + a contention scope-fence (SS$_NOTQUEUED) proof.SS$_NORMAL) so it stays green (re-ran locally — PASSED).Alpha caveat
Alpha
vms.kois P0-broken on main (rd vms-d38b / #835, unrelated). This change adds no new Alpha break; x86_64 grant proof above is the authoritative leg. Conductor release-gates Alpha convergence once the P0 lands.🤖 Generated with Claude Code