ibmruntimes / openj9-openjdk-jdk

Extensions for OpenJDK for Eclipse OpenJ9
GNU General Public License v2.0
17 stars 73 forks source link

Acquire interruptLock for interruptImpl and isInterruptedImpl #803

Closed babsingh closed 2 months ago

babsingh commented 3 months ago

interruptImpl and isInterruptedImpl use the eetop/threadRef value. Acquiring interruptLock assures that the eetop/threadRef value won't change during interruptImpl and isInterruptedImpl. This will prevent crashes which happen when a stale eetop/threadRef value is used to invoke OMR thread library functions.

Related: https://github.com/eclipse-openj9/openj9/issues/19544 Related: https://github.com/eclipse-openj9/openj9/issues/19598

babsingh commented 3 months ago

Started a personal build on amac and alinux to verify these changes. This build covers the following test suites: sanity.functional, sanity.openjdk, and extended.openjdk.

babsingh commented 3 months ago

Only infra and known failures are seen in the personal build.

In a grinder for the CloseAndAvailableRC test, the failure manifested 9/50 times in a grinder; see https://github.com/eclipse-openj9/openj9/issues/19598#issue-2328561363. With this fix, a 200x grinder on alinux and amac passes with no failures.

tajila commented 3 months ago

jenkins test sanity zlinux jdknext

tajila commented 2 months ago

@babsingh Please open backports