Repository navigation
Description
Goal: where a git that git's update ran dies of a signal, make bootstrap fails naming it, wherever the update met it, and not only where the signal's code is the update's last.
Depends on #1045 landing (open; closes #998 and #996; stacked on #954). The lines below are at #1045's head b2bbb31c.
State
-
the family root's bootstrap.py: git's update ended by a signal fails the run by name, and B4 with a token in use is told from fetches redone without a trace, so the token reaches no file (#998, #996) #1045's
ended_on(templates/family-root/scripts/bootstrap.py:743-760) reads a signal from git's update's exit code alone:128 + Nfor N belowsignal.NSIG, where a git it ran died of signal N, and-N, where git itself was killed.fetch_membersasks it of the update's exit code only (:452), and asks the walk (stopped_below) only where that code is exactly 128 (:453-454). -
Two docstrings say the signal's code is what the update ends with:
ended_on's, "git's update goes on past that gitlink and ends with that code" (:747-748), andcredential_advice's, "a fetch git could not make ends git's update there with 128, so an update that ends128 + Nmet none" (:726-728). -
Git keeps only the LAST non-zero code. In
update_submodules(git 2.47.1,builtin/submodule--helper.c:2742-2774) each gitlink's code replacesret, and only 128 stops the loop:fail: if (!code) continue; ret = code; if (ret == 128) goto cleanup; -
A member whose nested update dies of a signal (
:2700-2704,Failed to recurse into submodule path, thenreturn ret, the child's code), or whosegit checkoutdoes (:2389-2394,use "git checkout"'s), gives128 + N, and git's update goes on to the next gitlink. A later gitlink's 128 or 1 replaces that code, soended_onsees no signal.
What happens (measured)
Lane 5's probe at b2bbb31c, with git 2.43.0 and git 2.47.1. Each state was made with tests/test_family_bootstrap_stops_named.py's own helpers, in the holder unless said, and run as bootstrap.py --skip-members, offline. A signal ends something in IRRS, the first member git's update comes to; then something fails in IRSS, which it comes to after. Two triggers:
- P3 (lane 5's on the family root's bootstrap.py: a gitlink a member's own index gives no url, or a member's commit that a fetch reaching its remote did not bring, fails the run by name with its cure and no credential advice, where it said
family bootstrap okbeside git's exit 128 (#892) #954, and the family root's bootstrap.py: git's update ended by a signal fails the run by name, and B4 with a token in use is told from fetches redone without a trace, so the token reaches no file (#998, #996) #1045's own row): IRRS's own.gitmodulesgives itscodeleg abranchwith no value. Git 2.43.0's nested update in IRRS dies of SIGSEGV:error: submodule--helper died of signal 11, thenfatal: Failed to recurse into submodule path 'members/IRRS'. Git 2.47.1 refuses that line instead, and dies there (128), so P3 is a 2.43.0 state. - A killed checkout, on any git: IRRS's gitlink and pin moved by hand to its checkout's
HEAD~1, and apost-checkouthook in IRRS's store that sends SIGKILL to thegit checkoutgit's update runs there (kill -s KILL $PPID), standing in for the OOM killer:error: checkout died of signal 9, thenfatal: Unable to checkout '<commit>' in submodule path 'members/IRRS'.
"With the credential" means the fixture's file transport is allowed (cloning); "no credential" means it is refused (isolated).
| in IRRS, then in IRSS | git | git's update | bootstrap |
|---|---|---|---|
| P3, then IRSS's pin moved on, no credential (rv996's state) | 2.43.0 | 128 | the advice, family bootstrap ok, exit 0 |
| P3, then B4, with the credential | 2.43.0 | 128 | the advice, ok, exit 0 |
| the same, in a plain clone of the holder | 2.43.0 | 128 | the advice, ok, exit 0 |
| P3, then IRSS's checkout refused (an edit it would overwrite), with the credential | 2.43.0 | 1 | the advice, ok, exit 0 |
| killed checkout, then IRSS's pin moved on, no credential | both | 128 | the advice, ok, exit 0 |
| killed checkout, then IRSS's checkout refused, with the credential | both | 1 | the advice, ok, exit 0 |
| killed checkout, then B4, with the credential | both | 128 | UPDATE STOPPED ... git stopped at members/IRSS ..., FAILED, exit 1; no signal said |
| control: P3 alone, with the credential | 2.43.0 | 139 | UPDATE KILLED ... signal 11 (SIGSEGV, exit 139) ..., FAILED, exit 1 |
| control: killed checkout alone, with the credential | both | 137 | UPDATE KILLED ... signal 9 (SIGKILL, exit 137) ..., FAILED, exit 1 |
- In each
okrow, bootstrap's ownFETCH INCOMPLETE (git exit 128)(orexit 1) block prints git'sdied of signalline, and IRRS'sspecandcodelegs are not checked out after the run (no.gitin either): the signal stopped git's update in IRRS before it recursed there. - In the rows with the credential, nothing a credential cures is missing, and the advice says to set
SHAPE_LEGS_TOKEN. - With P3 then B4, B4 is not named either. The walk stops at IRRS, whose own
.gitmodulesgit cannot read (UNTOLD), sostopped_belowsays nothing. B4 at IRSS alone is named (test_b4_a_commit_the_fetch_did_not_bring_fails_naming_it, both rows passing here on 2.43.0). - With
SHAPE_LEGS_TOKENset to a fake token (the family root's bootstrap.py: with SHAPE_LEGS_TOKEN or SHAPE_LEGS_APP_TOKEN set, a member's commit no branch of its remote holds (B4) still endsfamily bootstrap ok, with the advice to set the token that is already set #996's untraced run), four of the states read the same (P3's on 2.43.0, the killed checkout's on both gits): P3 then B4, P3 then the refused checkout, and the killed checkout then the refused checkout end with the advice andok, exit 0, the advice saying to set theSHAPE_LEGS_TOKENthat is set; the killed checkout then B4 fails naming B4 alone. The token was in no output. - The baseline rows at
b2bbb31cpass on 2.43.0: B4 in the holder and in a plain clone, the credential's skip (three rows), a member's.gitmodulesgit cannot read, P3, and the two signal rows (9 passed).
Direction
Tell a signal wherever git's update met one.
-
With no token in use, git's update is traced already (
run_update,fetched_in), and the trace holds the signal: thechild_exitevent the parent git writes for the git that died gives that git's code. Measured, the same states withGIT_TRACE2_EVENTset to a directory:- P3 then B4, and P3 then the refused checkout (2.43.0):
child_exitcode 139 forgit submodule--helper update --recursive --super-prefix members/IRRS/ --jobs=1 --init, while git's update exited 128 and 1; - the killed checkout then B4, and then the refused checkout (2.43.0 and 2.47.1):
child_exitcode 137 forgit checkout -q <commit>, while git's update exited 128 and 1.
Read from the events
fetched_inreads, by the code and never git's words, as bootstrap.py (family root): after #879, two states still endfamily bootstrap okbeside git's exit 128: a stray gitlink inside a member's own index, and a member's gitlink at a commit no store holds #892 reads a fetch: achild_exitwhose code is128 + N, N belowsignal.NSIG, for a child whosechild_startargv beginsgit, is a git that git's update ran dying of signal N. The run then fails asended_onmakes it fail, naming the first such signal, with no advice. - P3 then B4, and P3 then the refused checkout (2.43.0):
-
With a token in use, git's update is not traced (the family root's bootstrap.py: with SHAPE_LEGS_TOKEN or SHAPE_LEGS_APP_TOKEN set, a member's commit no branch of its remote holds (B4) still ends
family bootstrap ok, with the advice to set the token that is already set #996), and its exit code is all there is. Either say that limit inended_on's andcredential_advice's docstrings and pin it with a row, as the family root's bootstrap.py: a gitlink a member's own index gives no url, or a member's commit that a fetch reaching its remote did not bring, fails the run by name with its cure and no credential advice, where it saidfamily bootstrap okbeside git's exit 128 (#892) #954 pinned B4 with a token in use (test_with_a_credential_in_use_b4_is_read_as_before, there atfe907c84and gone atb2bbb31c, where the family root's bootstrap.py: git's update ended by a signal fails the run by name, and B4 with a token in use is told from fetches redone without a trace, so the token reaches no file (#998, #996) #1045 names B4), or find a way to read it that writes no token to disk. That is the writer's to measure. -
Either way, correct the two docstrings: git's update ends with a signal's code only where no gitlink after it fails.
-
Where a signal and a stop the walk names past it (B4) are both told, which is said first is the writer's call. Today the B4 line alone is said.
Verify
- P3 then IRSS's pin moved on, no credential, on git 2.43.0 (skipped where git does not crash, as the family root's bootstrap.py: git's update ended by a signal fails the run by name, and B4 with a token in use is told from fetches redone without a trace, so the token reaches no file (#998, #996) #1045's P3 row is): exit 1, signal 11 (SIGSEGV) named, no advice, FAILED.
- On every POSIX git: the killed checkout then IRSS's pin moved on, no credential; and the killed checkout then IRSS's checkout refused, with the credential. Each exits 1, names signal 9 (SIGKILL) and gives no advice.
- The two controls, the signal alone, read as now, and so do the credential's skip and the
exit-128andexit-255rows. - With a token in use: what the Direction settles, pinned by a row.
Found by lane 5's independent review of #1045 (#998, #996), rv996 (#1045 issuecomment-6288783192), and measured by lane 5.
Milestone: v1.2.0 (placement is lane 3's call).
Not claimed.
Lane: openreposhape-5 (openRepoShape-5)
Activity
brettheap commentedon Oct 20, 2026
CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-20T11:01:04Z, for #1056
Logged in
lanes/log/openRepoShape-5.mdat44d4f399e0bda3f6cdc4bf1c59e6d75ccf24912c.The three reads (lane-collision-protocol Rule 1):
the family root's bootstrap.py: `credential_advice` and `ended_on` sa…