Skip to content

sys/event: fix stack size requirement build system integration#21957

Merged
maribu merged 3 commits intoRIOT-OS:masterfrom
maribu:sys/event/thread-stack-size-build-system-integration-fix
Dec 16, 2025
Merged

sys/event: fix stack size requirement build system integration#21957
maribu merged 3 commits intoRIOT-OS:masterfrom
maribu:sys/event/thread-stack-size-build-system-integration-fix

Conversation

@maribu
Copy link
Copy Markdown
Member

@maribu maribu commented Dec 15, 2025

Contribution description

The stack requirements were applied to the wrong thread in case of a shared thread managing medium and lowest priority queues (in other words: when event_thread_medium is not used).

This fixes the implementation and corrects the documentation to which thread handles which queues.

Testing procedure

Use a event_thread, bump the requirements of the medium event queue, then run ps. It will not show an increase in master of the single event thread, but will show now with this PR.

Issues/PRs references

None

@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Dec 15, 2025
@github-actions github-actions bot added Area: tests Area: tests and testing framework Area: sys Area: System labels Dec 15, 2025
@riot-ci
Copy link
Copy Markdown

riot-ci commented Dec 15, 2025

Murdock results

✔️ PASSED

3372ebb tests/sys/event_thread_shared: bump Makefile.ci

Success Failures Total Runtime
10950 0 10950 12m:28s

Artifacts

Copy link
Copy Markdown
Contributor

@Enoch247 Enoch247 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@Enoch247 Enoch247 enabled auto-merge December 15, 2025 21:23
@maribu maribu force-pushed the sys/event/thread-stack-size-build-system-integration-fix branch from d49212d to ddd9522 Compare December 15, 2025 21:43
The stack requirements were applied to the wrong thread in case of
a shared thread managing medium and lowest priority queues (in other
words: when `event_thread_medium` is not used).

This fixes the implementation and corrects the documentation to which
thread handles which queues.
On native the stack size needs to be a bit larger than on MCUs to not
run into a stack overflow.
@maribu maribu force-pushed the sys/event/thread-stack-size-build-system-integration-fix branch from ddd9522 to adf423e Compare December 15, 2025 21:44
@maribu
Copy link
Copy Markdown
Member Author

maribu commented Dec 15, 2025

OK, all regressions should now also be fixed. I'll do another spin on real hardware to see if the fix still works as expected.

@maribu
Copy link
Copy Markdown
Member Author

maribu commented Dec 15, 2025

Yep, the stack indeed now still is above the 512 B and at the 1024 B minimum set via Makefile.dep:

2025-12-15 22:51:26,280 #  pid | name                 | state    Q | pri | stack  ( used) ( free) | base addr  | current     
2025-12-15 22:51:26,281 # 	 - | isr_stack            | -        - |   - |    512 (  264) (  248) | 0x20000000 | 0x200001c8
2025-12-15 22:51:26,296 # 	 2 | event                | bl anyfl _ |   6 |   1024 (  976) (   48) | 0x2000120c | 0x20001554 

@Enoch247 Enoch247 added this pull request to the merge queue Dec 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 15, 2025
@maribu maribu enabled auto-merge December 16, 2025 06:12
@maribu maribu added this pull request to the merge queue Dec 16, 2025
Merged via the queue into RIOT-OS:master with commit da7765a Dec 16, 2025
25 checks passed
@maribu maribu deleted the sys/event/thread-stack-size-build-system-integration-fix branch December 25, 2025 10:32
@leandrolanzieri leandrolanzieri added this to the Release 2026.01 milestone Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants