Skip to content

Fix race condition in fault-handlers tutorial + minor tweaks/lints#129

Merged
lsf37 merged 3 commits into
masterfrom
lsf37/faulthandlers
Jul 10, 2026
Merged

Fix race condition in fault-handlers tutorial + minor tweaks/lints#129
lsf37 merged 3 commits into
masterfrom
lsf37/faulthandlers

Conversation

@lsf37

@lsf37 lsf37 commented Jul 5, 2026

Copy link
Copy Markdown
Member
  • Link all mentions of the seL4 manual, not just one.

  • Add blank lines where markdown lints demand

  • Avoid the VM/cap fault at the end of the handler that tends to confuse people by instead waiting for faults forever.

  • Fix another race condition:
    Similar to the notification tutorial, the fault handler tutorial has a printing race at the very end when both the fault handler and the faulter thread are finishing.

    This can leave to interleaved output, which leaves no recognisable success string for CI.

    Instead, use this to talk about the final VM fault of the faulter thread and show how to get the fault type from the message label, which so far has not been part of the tutorial. Catch the final VM fault and do nothing. This serialises the output.

@lsf37
lsf37 requested a review from Indanz July 5, 2026 07:43
@lsf37

lsf37 commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

https://github.com/seL4/sel4-tutorials/actions/runs/28922675257/attempts/1 just is an example of that race condition

Comment thread tutorials/fault-handlers/fault-handlers.md Outdated
Comment thread tutorials/fault-handlers/fault-handlers.md Outdated
Comment thread tutorials/fault-handlers/fault-handlers.md
Comment thread tutorials/fault-handlers/fault-handlers.md Outdated
lsf37 added 2 commits July 10, 2026 12:37
- Link all mentions of the seL4 manual, not just one.
- add blank lines where markdown lints demand

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
Avoid the VM/cap fault at the end of the handler that tends to confuse
people by instead waiting for faults forever.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
@lsf37
lsf37 force-pushed the lsf37/faulthandlers branch from ec6ec6e to c1f8f84 Compare July 10, 2026 02:37
Similar to the notification tutorial, the fault handler tutorial has a
printing race at the very end when both the fault handler and the
faulter thread are finishing.

This can leave to interleaved output, which leaves no recognisable
success string for CI.

Instead, use this to talk about the final VM fault of the faulter thread
and show how to get the fault type from the message label, which so far
has not been part of the tutorial. Catch the final VM fault and do
nothing. This serialises the output.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
@lsf37
lsf37 force-pushed the lsf37/faulthandlers branch from c1f8f84 to fa4aefc Compare July 10, 2026 02:41
@lsf37
lsf37 merged commit cca18b9 into master Jul 10, 2026
27 checks passed
@lsf37
lsf37 deleted the lsf37/faulthandlers branch July 10, 2026 02:45
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.

2 participants