Re: ITIMER_VIRTUAL implementation seems wrong?
- In reply to: Kyle Evans : "ITIMER_VIRTUAL implementation seems wrong?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 20 Sep 2025 15:07:42 UTC
On 2025-09-18 17:23, Kyle Evans wrote: > Hi, > > Paul Floyd has been trying to diagnose a hang they see in the valgrind > test suite under VirutalBox. The test[0] is fairly simple and uses the > process virtual timer; just running it outside of Valgrind, you'll maybe > note that the runtime varies pretty wildly from real hardware to > virtualized > environments. > Hi Just a small bit of background on the test. All it does is spam a system call (write) whilst also spamming a restartable interrupt ( SIGVTALRM from a 100usec setitimer). This was for a crash related to syscall restarting. In the testcase the interrupt handler needs to run 100 times. That's at least 10ms. On my workstation it takes 1-2s. As Kyle says there is a race between the interrupts and the syscalls and the interrupts can end up getting starved. That is exacerbated by using a VM and the testcase running under Valgrind where, on 15.0-ALPHA2, I'm seeing the interrupts being completely starved and the testcase hanging. A+ Paul