RFC: Fuzzing instruction scheduling for concurrency testing

Aleksey Shipilev aleksey.shipilev at oracle.com
Sat Feb 23 10:21:15 PST 2013


Hi guys,

I'm trying to follow up on recent finding with HotSpot's C2 compiler
barrier problem [1] by trying to fuzz the instruction scheduling.

I haven't pushed this through any sort of rigorous testing, but still
want to hear if the direction is correct. This is what appeared to be
the minimal change:
 http://cr.openjdk.java.net/~shade/scratch/isch-fuzz/webrev.00/

Although, this only fuzzes within the basic block, which arguably limits
the usability. Still, -XX:+FuzzInstructionScheduling makes DekkerTest
[2] fail more or less reliably, in ~30% of executions on my 4-thread
x86_64 laptop with the latest hs-comp. The reason for the failure is
very similar to [1]: disassembly shows the volatile read jumped over the
volatile write, breaking the JMM.

I'd like to have something like that in Hotspot to run other concurrency
tests with. Thoughts, corrections, guidance would be appreciated.

Thanks,
Aleksey.

[1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8007898
[2]
https://github.com/shipilev/java-concurrency-torture/blob/master/src/main/java/org/openjdk/concurrent/torture/tests/volatiles/DekkerTest.java


More information about the hotspot-compiler-dev mailing list