MicroEarthquake reproduces flaky bugs by fuzzing process scheduling with sched_setattr(2)
.
$ (cd microearthquake; python3 native_build.py)
On Terminal 1:
$ (cd /somewhere; mvn test)
On Terminal 2:
$ ./bin/microearthquake pid $TERMINAL1_MVN_PID
Notes:
- Requires
CAP_SYS_NICE
. - subprocesses and LWPs (i.e.,threads) are also fuzzed.
Using Dirichlet distribution, MicroEarthquake finds the randomized utilization sequence $u_i$
($0 <= i < NTASKS$
) that satisfies $\sum u_i = NCPU$
.
Then MicroEarthquake determines actual parameters that almost satisfy $WCET_i / P_i = u_i$
.
See sched-deadline.txt
.
We still need much more improvement.
- FOSDEM (January 30-31, 2016, Brussels)
MicroEarthquake is planned to be rewritten in Go and merged to Earthquake;
Even after that, MicroEarthquake may continue as a lightweight version of Earthquake.
After running MicroEarthquake many times, sched_setattr(2)
can fail with EBUSY
.
This seems to be a bug of kernel; I'm looking into this.