This patch fixes https://github.com/eclipse-openj9/openj9/issues/19304. Setting the interrupted field to true and calling interrupt0 in Thread::interrupt used to be synchronized via interruptLock. An OpenJDK change removed this synchronization which caused a data race on the interrupted field with ReentrantLockTest leading to intermittent test failures.
This patch adds the synchronized block around setting interrupted and calling interrupt0 and eliminates the data race with ReentrantLockTest.
This patch fixes https://github.com/eclipse-openj9/openj9/issues/19304. Setting the
interrupted
field to true and callinginterrupt0
inThread::interrupt
used to be synchronized viainterruptLock
. An OpenJDK change removed this synchronization which caused a data race on theinterrupted
field withReentrantLockTest
leading to intermittent test failures.This patch adds the
synchronized
block around settinginterrupted
and callinginterrupt0
and eliminates the data race withReentrantLockTest
.Issues: https://github.com/eclipse-openj9/openj9/issues/19304 Signed-off-by: Nathan Henderson nathan.henderson@ibm.com