Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 769 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 769 Bytes

JEMalloc Java Deadlock test

This test code was created to reprocuce a JVM bug when running with Jemalloc 5.1+ that results in a thread permanently hodling onto an object monitor even though the code has exited the synchronized block. Defects have been filed with both jemalloc and the JVM.

How to build

mvn package

How to run

export LD_PRELOAD=/path/to/jemalloc.so
for i in $(seq -w 200); do 
	echo "Test ${i}/200"
	java -cp jemalloc-java-deadlock-0.0.1-SNAPSHOT.jar -DnumTasks=50000 com.example.DeadlockTest 2>&1 > ${i}.log || break
done

The loop will exit if a deadlock was detected. Check the numbered log file for the last test to run.