Skip to content

notifications: avoid returning after success#124

Open
praneelmalapaka wants to merge 1 commit into
seL4:masterfrom
praneelmalapaka:notifications/avoid-return-after-success
Open

notifications: avoid returning after success#124
praneelmalapaka wants to merge 1 commit into
seL4:masterfrom
praneelmalapaka:notifications/avoid-return-after-success

Conversation

@praneelmalapaka

Copy link
Copy Markdown

Summary

The notifications tutorial solution can print Success! and then fault in tcb_consumer at address 0 after returning from main.

This change keeps the consumer alive after printing Success! by yielding in a loop instead of returning from main.

Testing

I reproduced the issue locally with the notifications solution:

cd ~/sel4/sel4-tutorials
mkdir -p notifications_fix_test
cd notifications_fix_test
../init --tut notifications --solution
cd ../notifications_fix_test_build
ninja
./simulate

Before this change, the tutorial reached Success! and then produced a post-success fault similar to:

Success!
Caught cap fault in send phase at address 0
while trying to handle:
vm fault on data at address 0 with status 0x4
in thread ... "tcb_consumer" at address 0

After this change, the tutorial reaches Success! and no longer produces the post-success tcb_consumer fault in my local run.

Notes

This appears related to the existing CI issue where the notifications simulation can reach success but later fail or time out after a tcb_consumer fault.

Related to #100

Signed-off-by: Praneel Malapaka <z5448041@ad.unsw.edu.au>
@lsf37

lsf37 commented Jun 22, 2026

Copy link
Copy Markdown
Member

Generally, most of the tutorials end with a cap fault, and that is not a problem as such, but you might be right that this relates to #100 because the consumer might reach the fault before the "Success!" print is finished.

Will need to have a closer look.

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