Skip to content

x86: removing non-error log records from the dispatch path exposes a doubled bsh prompt after init start (production-profile gate 5/9 red) #783

Description

@ryanbreen

Removing the whole non-error log:: record class from
kernel/src/interrupts/context_switch.rs reddens the x86 production-profile
gate on 4 of 9 boots with a console-prompt signature that 8 baseline boots and
13 boots of two narrower arms never produced. The removal is therefore not
shipped by #775, and this issue records what it costs and what the evidence is.

Signature

docker/qemu/run-x86-prod-profile-boot-test.sh aborts on one of its three
prompt checks:

:942   test "$PROMPT_AFTER" -gt "$PROMPT_BEFORE"
:952   test "$PROMPT_BEFORE" -eq 1
:953   test "$PROMPT_AFTER" -eq 2

The failing boots report a console prompt count of 3 or 0 where a healthy boot
reports 1 -> 2. The 3-prompt face is a DOUBLED prompt emitted immediately
after init announces itself. Verbatim, from the committed specimen
docs/planning/green-program/sockets/serials/775/round3/case-d-broad-removal/specimens/prod-r3head-b/boot3/serial_user.txt
lines 75-78:

[init] Breenix init starting (PID 1)
[SW]<K>[SW]<T><B>[SW]<K>
breenix> 
breenix> [SW]<T><B>[SW]<K>...

The 0-prompt face is specimens/prod-r3head-b/boot4/: no prompt in the whole
capture, so PROMPT_AFTER never exceeds PROMPT_BEFORE.

A/B, one host, one QEMU at a time

arm boots pass fail failure sites
51d7468f, the pre-#775-round-3 head 8 6 2 :1016 x2 (bsshd started != 1)
the census on COM2 plus the idle hook, 33 of 33 records kept 5 5 0 --
+ only the 3 records finding F15 named removed (what #775 ships) 5 5 0 --
+ the 22 non-error records removed 9 4 5 :953 x2, :942 x1, :952 x1, :1016 x1

The prompt signature is 4 of 9 on the broad arm and 0 of 13 on the two narrower
arms. :1016 is a separate, pre-existing flake that appears on the baseline
too.

Recipe: build the zero-feature production profile
(cargo build --release --bin qemu-uefi), run
docker/qemu/run-x86-prod-profile-boot-test.sh repeatedly, and read the
failing command: and console prompt: lines out of each transcript.

Hypothesis

The removed records are log::trace!/log::debug!/log::info! calls inside
the dispatch functions -- switch_to_thread, restore_userspace_thread_context,
setup_first_userspace_entry and their neighbours. Deleting them changes the
timing of the dispatch path, and that timing change exposes a race between init
starting and the console writing its prompt. The logging was load-bearing for
something. What that something is, is not known: the #775 rounds measured the
regression and declined the removal rather than chasing the mechanism.

Note that CLAUDE.md forbids serial output in exactly these functions, so the
19 surviving non-error records there are a standing violation that cannot be
removed until this is understood. That is the reason this issue matters beyond
the one gate.

Committed evidence

  • docs/planning/green-program/sockets/serials/775/round3/case-d-broad-removal/README.md
    -- 22 summary rows, one per uncommitted boot, each with its PASS count, abort
    site and prompt line, plus the commands that produced them.
  • .../case-d-broad-removal/specimens/prod-r3head-b/gate-{3,4,5}.txt with
    boot{3,4,5}/serial_{kernel,user}.txt -- three of the four prompt-signature
    boots in full.
  • .../case-d-broad-removal/specimens/standalone-gate.txt -- the fourth; its
    serial captures were overwritten before they could be recovered, so only the
    gate transcript survives.
  • docs/planning/green-program/sockets/serials/775/round3/r3-production/gate-{1..5}.txt
    -- the 5 boots of the shipped narrow arm.

Filed from the #775 round-4 slot; see the branch fix/775-dispatch-log-removal
and docs/planning/green-program/sockets/775-CENSUS-EQUIVALENCE-2026-09-04.md
for the surrounding work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions