Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jdk23 java/util/concurrent/forkjoin/AsyncShutdownNowInvokeAnyRace #19816

Closed
pshipton opened this issue Jul 5, 2024 · 2 comments
Closed

jdk23 java/util/concurrent/forkjoin/AsyncShutdownNowInvokeAnyRace #19816

pshipton opened this issue Jul 5, 2024 · 2 comments
Assignees
Labels
comp:vm jdk23 segfault Issues that describe segfaults / JVM crashes test failure

Comments

@pshipton
Copy link
Member

pshipton commented Jul 5, 2024

https://openj9-jenkins.osuosl.org/job/Test_openjdk23_j9_sanity.openjdk_s390x_linux_Nightly_testList_0/18
jdk_util_1
java/util/concurrent/forkjoin/AsyncShutdownNowInvokeAnyRace.java

https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Test/Test_openjdk23_j9_sanity.openjdk_s390x_linux_Nightly_testList_0/18/openjdk_test_output.tar.gz

00:20:49  Unhandled exception
00:20:49  Type=Segmentation error vmState=0x00000000
00:20:49  J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000001
00:20:49  Handler1=000003FFB63CA690 Handler2=000003FFB62B1A60 InaccessibleAddress=0000000000000000
00:20:49  gpr0=000003FFAEC87698 gpr1=000003FFAD18C5D0 gpr2=000003FFB002BBB0 gpr3=0000000000000028
00:20:49  gpr4=000003FFAFE57EB0 gpr5=000003FEC4AC9C90 gpr6=000003FFAD18C5C8 gpr7=000003FFAD18C5C8
00:20:49  gpr8=000003FFB002BBB0 gpr9=000003FFB6BD1F90 gpr10=000003FEC4996700 gpr11=000003FEC49B8300
00:20:49  gpr12=000003FF34BBB0A8 gpr13=000003FEC49B8300 gpr14=000003FFAFE57EB0 gpr15=000003FFB5FFE3E0
00:20:49  psw=000003FFAFE57F2A mask=0705200180000000 fpc=00080000 bea=000003FFAFE57EBA
00:20:49  fpr0=000003fec449d85e (f: 3293173760.000000, d: 2.170307e-311)
00:20:49  fpr1=49905148b5ffdae8 (f: 3053443840.000000, d: 2.328914e+46)
00:20:49  fpr2=0000000000000000 (f: 0.000000, d: 0.000000e+00)
00:20:49  fpr3=4005555555555555 (f: 1431655808.000000, d: 2.666667e+00)
00:20:49  fpr4=0000000000000007 (f: 7.000000, d: 3.458460e-323)
00:20:49  fpr5=0000000000000000 (f: 0.000000, d: 0.000000e+00)
00:20:49  fpr6=000003fec449d888 (f: 3293174016.000000, d: 2.170307e-311)
00:20:49  fpr7=0000000000000000 (f: 0.000000, d: 0.000000e+00)
00:20:49  fpr8=0000000000041000 (f: 266240.000000, d: 1.315400e-318)
00:20:49  fpr9=0000000000000000 (f: 0.000000, d: 0.000000e+00)
00:20:49  fpr10=000003ffb5fbf000 (f: 3053187072.000000, d: 2.172310e-311)
00:20:49  fpr11=000003ff8a7fe3b8 (f: 2323637248.000000, d: 2.171950e-311)
00:20:49  fpr12=00061c785651b461 (f: 1448195200.000000, d: 8.498685e-309)
00:20:49  fpr13=000003fef40bd248 (f: 4094415360.000000, d: 2.170703e-311)
00:20:49  fpr14=000003ffe68fbe14 (f: 3868179968.000000, d: 2.172713e-311)
00:20:49  fpr15=000003fef40039c8 (f: 4093655552.000000, d: 2.170702e-311)
00:20:49  Module=/home/jenkins/workspace/Test_openjdk23_j9_sanity.openjdk_s390x_linux_Nightly_testList_0/jdkbinary/j2sdk-image/lib/default/libjclse29.so
00:20:49  Module_base_address=000003FFAFE00000 Symbol=Java_java_lang_Thread_interruptImpl
00:20:49  Symbol_address=000003FFAFE57E88
00:20:49  Target=2_90_20240704_19 (Linux 5.4.0-181-generic)
00:20:49  CPU=s390x (4 logical CPUs) (0x1f58f2000 RAM)
00:20:49  ----------- Stack Backtrace -----------
00:20:49  Java_java_lang_Thread_interruptImpl+0xa2 (0x000003FFAFE57F2A [libjclse29.so+0x57f2a])
00:20:49   (0x000003FF34BB5BE8 [<unknown>+0x0])
@pshipton pshipton added comp:vm test failure segfault Issues that describe segfaults / JVM crashes jdk23 labels Jul 5, 2024
@pshipton pshipton added this to the Java 23 (0.47) milestone Jul 5, 2024
@pshipton
Copy link
Member Author

pshipton commented Jul 5, 2024

@babsingh fyi

babsingh added a commit to babsingh/openj9-openjdk-jdk23 that referenced this issue Jul 8, 2024
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: eclipse-openj9/openj9#19544
Related: eclipse-openj9/openj9#19598
Related: eclipse-openj9/openj9#19816

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
@babsingh
Copy link
Contributor

babsingh commented Jul 8, 2024

The symptoms highlight a race condition between j.l.Thread termination and invocation of Thread.interrupt.
ibmruntimes/openj9-openjdk-jdk#803 should fix this issue. The fix was ported to JDK-next, JDK22 and JDK21, but it didn't get into JDK23. Created ibmruntimes/openj9-openjdk-jdk23#10 to port the fix to JDK23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:vm jdk23 segfault Issues that describe segfaults / JVM crashes test failure
Projects
None yet
Development

No branches or pull requests

2 participants