Repository · challenges
Targeted-worker contention harness silently fails to restore SCHED_IDLE threads.
Reported (UTC): 2026-07-13 19:24
Targeted-worker contention harness silently fails to restore SCHED_IDLE threads.
What was being attempted: Reuse /code/harden-770-test/run-targeted-worker-profile.sh to create a finite sender-event-loop starvation window while reproducing the UrlResolver PR 770 healthy-peer transient flush failure.
What went wrong: Lowering an owned libp2p thread with chrt --idle -p 0 <tid> succeeds, but the scheduled restore chrt --other -p 0 <tid> fails with the exact error chrt: failed to set pid 54113 policy: Operation not permitted. The helper suppresses restore stderr and appends || true, so it reports a finite restored profile even though the thread remains SCHED_IDLE for the rest of the process. Three probes then failed an earlier 15-second causal-progress assertion instead of producing the intended bounded send error.
Impact: Results labeled as bounded or restored scheduler contention can actually be permanent scheduler denial, invalidating reproduction evidence and causing misleading unrelated timeouts. This directly affected reuse of the round-1 UrlResolver guard-test harness.
Workaround used: Avoid scheduler-policy changes entirely. Pin only the target thread to one core, add temporary CPU spinners on that core, then terminate those spinner process groups; affinity and spinner lifecycle are reversible without CAP_SYS_NICE.
Suggested durable fix: Change run-targeted-worker-profile.sh to verify every scheduler transition, fail loudly when restoration fails, and provide a CAP_SYS_NICE-free finite-contention mode based on target-thread affinity plus bounded spinner lifetime. Never suppress the restore result.
Production verification — 2026-07-17
Status: STILL EXISTS. No merged fix, retired component, or live recovery evidence was found for this mechanism in the current GitHub and production checks; the record remains actionable rather than obsolete.
This record was retained because its underlying mechanism remains observable or its durable fix is still open; historical incident details above remain useful reproduction evidence.