posix: timer: should use asynchronous cancellation. #67870
Labels
area: POSIX
POSIX API Library
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Describe the bug
The
test_timer_overrun
test intests/posix/common/src/timer.c
was failing quite regularly fornrf52_bsim
in CI. Ironically, it only did this after parts ofpthread.c
were fixed. Namely, respecting deferred vs asynchronous pthread cancelation.Effectively, by not specifying to cancel the pthread asynchronously, it was allowed to continue running (detached, of course), and then after the sem was cleared in the next test, it tried to jump to
NULL
causing a segfault. Also, it might not be intuitive, but with POSIX threads, asynchronous cancellation means asynchronous w.r.t. cancellation points, and to synchronously w.r.t. the calling thread.There is some additional setup required for nrf52_bsim to test locally so most tests are skipped unless you go out of your way to set up dependencies.
Please also mention any information which could help others to understand
the problem you're facing:
nrf52_bsim
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The timer overrun test should succeed without segfaulting.
Impact
It's blocking a relatively high bugfix #67223
Logs and console output
https://github.com/zephyrproject-rtos/zephyr/actions/runs/7587603835/job/20668392712?pr=67223
Environment (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: