This repository was archived by the owner on Nov 8, 2026. It is now read-only.
Repository navigation
tests: start child processes with a start-up handshake - #1
Merged
Merged
Conversation
TESTs 4, 9, 10 and 12 start child processes with CreateNewProcTags(). A child at a higher priority than the test (MCPd and Run start it at -2, the children at 0) can run and exit before CreateNewProcTags() returns, before dos.library has linked it into its process list. Its exit then Remove()s an unlinked node: a DSI in the kernel's Remove(), called from dos.library's process exit. dos.doc says a child may exit before the call returns, but dos.library 54.136 does not survive it. This crashed TEST 9 with this driver too: real reads on two units, round 85 of 150 (with the Rust virtioscsi.device, round 1). Measured with QEMU's GDB stub; the write-up is in derfsss/rust-amigaos4-crate, examples/virtio-scsi/docs/PROGRESS.md, "ROOT CAUSE". The fix is the start-up handshake of the AmigaOS wiki's own child process example (Exec Signals, SIGB_SINGLE): each child's first act is Wait(SIGBREAKF_CTRL_F), and the parent sends CTRL-F only after CreateNewProcTags() has returned. The entry functions also get the dos.doc NP_Start prototype and return RETURN_OK. Run three times at MCPd's priority, the system disk plus a second unit: this driver 53.10 completes the suite each time with no crash (TESTs 4, 9, 10 and 12 pass; the known TEST 14 and 18 failures remain). Co-Authored-By: Claude Opus 5.5 <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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
TESTs 4, 9, 10 and 12 start child processes with
CreateNewProcTags(). A child at a higher priority than the test (MCPd andRunstart the test at -2, the children at 0) can run and exit beforeCreateNewProcTags()returns, before dos.library has linked it into its process list. Its exit thenRemove()s an unlinked node: a DSI in the kernel'sRemove(), called from dos.library's process exit. dos.doc says a child may exit before the call returns, but dos.library 54.136 does not survive that.It crashed TEST 9 with this driver too (real reads on two units, round 85 of 150), and with the Rust virtioscsi.device in round 1. Write-up: derfsss/rust-amigaos4-crate,
examples/virtio-scsi/docs/PROGRESS.md, "ROOT CAUSE".Fix: the start-up handshake of the AmigaOS wiki's own child-process example (Exec Signals, SIGB_SINGLE). Each child's first act is
Wait(SIGBREAKF_CTRL_F), and the parent sends CTRL-F only afterCreateNewProcTags()has returned. The entry functions also get the dos.docNP_Startprototype and returnRETURN_OK. Six call sites, one file.Tested: three runs at MCPd's priority, system disk plus a second unit, on this driver 53.10. The suite completes each time with no crash. TESTs 4, 9, 10 and 12 pass; the known TEST 14 and TEST 18 failures remain.
🤖 Generated with Claude Code