broken atomic lock when starting multiple cores
@midnightveil is already working on this.
Since Jun 17, 2026.
Assessment
This issue has not been assessed yet.
Description
Hello,
Synchronization between cores in SMP mode relies on STLR/LDAR instructions to implement release/acquire semantics on the print_lock flag. These instructions depend on proper cache coherency and on memory being mapped as Normal, Inner Shareable.
Therefore, all cores must have the MMU (and caches) enabled with consistent attributes in order to use locks across cores0
In loader.c:main(), the MMU on logical core 0 is enabled after the secondary cores have already been started.
As a result, core 0 does not participate in the coherency domain when the other cores begin execution. Consequently, updates to the print_lock flag performed by secondary cores are not observed by core 0, leading to an infinite loop.
Workarounds are: Disabling the data cache via SCTLR.C, or using Normal_NC in MAIR for the translation tables
The MMU on core 0 should be enabled before releasing secondary cores.
Originally posted by @bruelc in https://github.com/seL4/microkit/issues/446#issuecomment-4156815830
- Dominant language
- Rust
- Stars
- 201
- Forks
- 80
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from seL4/microkit
-
Difficulty 2/5 Half a day Newbie friendliness 72/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100