Skip to content

Docs: kshell exec /shell.elf | cat does not hang - #190

Merged
douglasmun merged 1 commit into
mainfrom
docs/pipehang-diagnosis
Oct 11, 2026
Merged

douglasmun merged 1 commit into
mainfrom
docs/pipehang-diagnosis

Conversation

@douglasmun

Copy link
Copy Markdown
Owner

Corrects doc/SECURITY_AUDIT_2026-10.md §3. The kernel-shell exec /shell.elf | cat "hang" recorded in #189 is a probe artifact, not a kernel bug.

Diagnosis (serial-direct instrumentation, since reverted):

  • The child was created and scheduled, and it blocked in stdin_read on the console. The kernel shell was blocked in sys_waitpid on it, as designed.
  • The typist sent every line while shell.elf was being signature-verified with interrupts masked. QEMU's PS/2 queue dropped the overflow: echo INNER reached the child as eche, and exit never arrived.
  • Rerun with typing gated on the child reading stdin: echo INNER and exit were received, the child exited, waitpid returned, INNER came out through cat, and the outer shell answered echo OUTERALIVE.

Docs only; no code change.

🤖 Generated with Claude Code

The 2026-10 audit recorded this as an open, undiagnosed hang. Serial-direct
tracing shows the probe typed every line while shell.elf was being
signature-verified with interrupts masked, so QEMU's PS/2 queue dropped the
keystrokes ("echo INNER" arrived as "eche", "exit" never arrived) and the
child waited on stdin. With typing held until the child read stdin, the
pipeline completed and the outer shell answered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@douglasmun
douglasmun merged commit 8dca181 into main Oct 11, 2026
2 checks passed
@douglasmun
douglasmun deleted the docs/pipehang-diagnosis branch October 11, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant