seL4 / sel4test

Test suite for seL4.
http://sel4.systems
Other
24 stars 60 forks source link

SCHED0021: decrease chances of a race condition #105

Closed lsf37 closed 10 months ago

lsf37 commented 10 months ago

Decrease the chance that the monitor thread is preempted just when it has released the preemption threads, but before it has yielded itself. (If that happens, the preemption threads get two time slices.)

See also #42 -- the implementation here is basically @axel-h's suggestion from that issue.

We believe we might have seen an instance of this in one test run (of many) for PR seL4/seL4#968

lsf37 commented 10 months ago

After this is merged, I might try enabling this test for simulation again in a separate PR to see if it got any better. Although I don't really think it was this specific race condition that was the reason for failure there.

Indanz commented 10 months ago

This should be enough to make it robust. If time_now() can't run within one time slice, there's something horribly wrong.