You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky: test_v4l2_busy_signal force_camera_closes_the_holder_and_opens_the_camera fails under Tier 2 -j4 #953
test_v4l2_busy_signal (added with #800) fails intermittently in Tier 2 Linux in force_camera_closes_the_holder_and_opens_the_camera (about 6 s, then fail), on PRs that don't touch linux-v4l2.
Likely a timing assumption about the holder process exiting or releasing the device, which breaks under machine load since Tier 2 moved to ctest -j4 (#837). Related: #838 (load-sensitive audio tests).
Fix should make the test wait on the holder's exit or the device becoming free instead of a fixed delay, shown RED under load (e.g. stress or -j with parallel load) then GREEN.
Claiming. Cause: the fake libv4l2 in the test decides "busy" with waitpid(holder, WNOHANG) == 0. After Force Camera sends SIGTERM, the holder closes its fds before it becomes a reapable zombie. The plugin's /proc scan sees the device free in that window (so released is true), but the reopen's waitpid(WNOHANG) can still return 0: the fake answers EBUSY, fake.holder keeps the pid, and the test fails with <pid> != 0 at line 296 (I hit 10185 != 0 in a loaded local run, logged on #838). The window widens under load.
Fix (test fixture only, the plugin is right): the fake treats the holder as holding the device only while /proc/<pid>/fd still has camera_path open, the same view the plugin has; with no fd left it is exiting, so a blocking waitpid reaps it and records the SIGTERM status deterministically. The ignore_term holder keeps its fd and stays busy.
Evidence: run.sh --repeat N --tests test_v4l2_busy_signal under load, failing before and passing after.
Activity
zackees commentedon Oct 16, 2026
Claiming. Cause: the fake libv4l2 in the test decides "busy" with
waitpid(holder, WNOHANG) == 0. After Force Camera sends SIGTERM, the holder closes its fds before it becomes a reapable zombie. The plugin's/procscan sees the device free in that window (soreleasedis true), but the reopen'swaitpid(WNOHANG)can still return 0: the fake answers EBUSY,fake.holderkeeps the pid, and the test fails with<pid> != 0at line 296 (I hit10185 != 0in a loaded local run, logged on #838). The window widens under load.Fix (test fixture only, the plugin is right): the fake treats the holder as holding the device only while
/proc/<pid>/fdstill hascamera_pathopen, the same view the plugin has; with no fd left it is exiting, so a blockingwaitpidreaps it and records the SIGTERM status deterministically. Theignore_termholder keeps its fd and stays busy.Evidence:
run.sh --repeat N --tests test_v4l2_busy_signalunder load, failing before and passing after.test: Fix the force_camera race in test_v4l2_busy_signal's fake libv4…