Repository navigation
A log read answers an unpublished ring at its first number, as the console does - #1207
Merged
Merged
Conversation
…nsole does A machine whose firmware names a CPU that never starts had no console after the kernel's hand-over. logkeeper hands the UART's carrier the log once its read positions reach what the kernel says the console spoke (SYS_LOG_SPOKEN), ring by ring. The console's positions start at each ring's first number, 1, a ring no CPU published among them; a read clamped a zeroed position only in a ring it opened, so the never-started CPU's position stayed 0, 0 >= 1 never held, the carrier's start was never said and the UART carried nothing for the machine's life. The clamp moves to where a caller's cursor becomes a walk, so every position is answered from its ring's first number on, and `open` no longer repeats it. This is what `virt_reboot_refused_without_psci` stalled on: `psci-withheld` leaves the second CPU off, and the row is the only AArch64 one that reads a program's line off the PL011 without the kernel's stop putting the log there. Seen on main in guest-rows run 42094494342; with the kernel kept on the wire (run 42922032425) the same boot showed the job refused and ended with exit 1 at 2.04 s while the UART's carrier said nothing. Closes issues/virt-reboot-refused-without-psci-goes-quiet-before-its-job.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Collaborator
Author
Review r1 of #1207 at fa35593Base d49f483. It merges cleanly into main fb88cec, which has not touched AssessmentThe cause is established and the fix is at the right owner. The code is ready; one published evidence file is wrong.
Net: production +4/-4 ( BLOCKER
SUGGESTION
The questions asked
SEND BACK — for the evidence file in item 1 only. |
…itions`, and the carrier's wait is recorded Comments only in code: - `sdk/abi/src/log.rs`, the cursor contract: no position is answered below 1, by a read or by `SYS_LOG_SPOKEN`, which is what lets a reader compare the two. - `kernel/src/log/read.rs`, `Positions`: every position is at or past `FIRST_SEQ`, which `open` now relies on. New record: `Hub::wire_start` waits for the carrier's start with no bound and no report, which is what turned an unreachable kernel answer into a UART silent for the machine's life. Not fixed here. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Collaborator
Author
|
Orchestrator verification at 094c039, after review r1 (code accepted; SEND BACK for one evidence file).
Queueing. |
Japabu
marked this pull request as ready for review
November 11, 2026 02:37
This was referenced Nov 11, 2026
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.
Problem
virt_reboot_refused_without_pscistalled on the guest runner on every run(
issues/virt-reboot-refused-without-psci-goes-quiet-before-its-job.md):the console stopped at the kernel's
Boot: completeand the job neverended on it.
The cause is not the row's. A machine whose firmware names a CPU that never
starts has no console after the kernel hands the UART over:
logkeeperhands the UART's carrier the log once its read positions reachwhat the kernel says the console spoke (
SYS_LOG_SPOKEN), ring by ring.CPU published among them.
never-started CPU's ring is never opened, so its position stayed 0.
0 >= 1never held, the carrier's start was never said, and the UARTcarried nothing for the machine's life.
psci-withheldleaves the second CPU off. Userland itself ran: with thekernel kept on the wire (a diagnostic commit, run 42922032425) the same boot
showed the job refused and ended with exit 1 at 2.04 s.
It was not the only row.
virt_failed_ap_leaves_no_hole, whosesmp-skip-apleaves one CPU of four unstarted, stalls the same way on thebase (run 42943718738) and is green with the fix. The first commit's message
calls
virt_reboot_refused_without_psci"the only AArch64 one"; that iswrong, and the review found it.
Resulting behavior
A caller's cursor is answered from each ring's first number on, an
unpublished ring's too, where it becomes a walk (
Cursor::from_reader).openno longer repeats the clamp. A reader's position and the console'snow compare in every ring.
Checks
virt_reboot_refused_without_psci virt_reboot virt_smp, guest runner (AArch64, emulated)fa3559395virt_failed_ap_leaves_no_hole console_image_boots, guest runnerfa3559395virt_reboot_refused_without_psciec8912181virt_failed_ap_leaves_no_holed49f4834ewaiting for the job unmap_touch to endkernel-loom'slog_cursor, hostfa3559395read.rs's change revertedfa3559395[3, 0] is behind [3, 1]cargo run -- --ci host, macOSfa3559395issues/the-llvm-environment-test-breaks-git-on-macos.mdThe new host test asks the console's positions with zeros, as
logkeeperdoes, through the kernel's own
Published, and requires a zeroed cursor'sread to reach them beside an unpublished ring.
Evidence: https://github.com/ToyOSOrg/evidence/tree/4eaca7b33acf5a0b5d7f06c2c001aaeecd8fca99/r1
The diagnostic arm is
diagnostic-kernel-keeps-the-wire-d49f4834e..096b67e4a.patchthere: three lines of
kernel/src/log/console.rsond49f4834e. The patchfirst published under the shorter name was a diff against a newer main and
is corrected in the README.
Review r1
The head,
094c03964, isfa3559395plus comments and one issue file. Nocheck ran again for it. What changed in code, comments only:
sdk/abi/src/log.rs, the cursor contract: one sentence, that no positionis answered below 1 by a read or by
SYS_LOG_SPOKEN.kernel/src/log/read.rs, onPositions: one sentence, that everyposition is at or past
FIRST_SEQ.Records
Closes
issues/virt-reboot-refused-without-psci-goes-quiet-before-its-job.md.Nothing outside
issues/cited it.New:
issues/logkeepers-uart-carrier-waits-for-its-start-with-no-bound-and-no-report.md.Hub::wire_startwaits with no bound and no report, which is what turnedthe kernel's answer into a silent UART. This PR removes the cause and not
that wait; it is recorded and not fixed here.
Risks
The same silence would have held on x86-64 metal with a CPU the MADT
enables that never starts, where the UART is the console. No bench has such
a CPU, so that is inferred from the code and not measured.
🤖 Generated with Claude Code