Richard Henderson <richard.henderson@linaro.org> writes:
> It is my guess that the majority of the flakiness with the
> linux-user signals.c test is due to a race condition between
> translation and page writes. I vaguely recall a bug report
> about this, but I cannot find it now.
>
> Since the vast majority of "self-modifying code" is due to
> signal delivery, work around this by allocating a new page,
> into which we write the signal handlers.
>
> A better workaround would be to implement the vdso that is
> required by many guests. However, that is a much larger
> problem, and some guests do not define a vdso in upstream
> linux. This serves as a decent fallback.
>
> Neither bit of work, I will note, solves the posited race
> condition described above.
Well this certainly solves the failures I was seeing with
s390x-on-s390x:
retry.py -n 500 -c -- ./qemu-s390x ./tests/tcg/s390x-linux-user/signals
Results summary:
0: 500 times (100.00%), avg time 2.253 (0.00 varience/0.00 deviation)
Ran command 500 times, 500 passes
However qemu-hppa (on x86_64 host) still has the stuborn 1% failure rate
(-static build):
Results summary:
0: 198 times (99.00%), avg time 2.255 (0.00 varience/0.00 deviation)
-4: 2 times (1.00%), avg time 0.252 (0.00 varience/0.00 deviation)
Ran command 200 times, 198 passes
So have a:
Tested-by: Alex Bennée <alex.bennee@linaro.org>
(for s390x at least)
--
Alex Bennée