Skip to content

JDK17 jsr292_MethodHandleAPI_Test_JitCount1_0_FAILED - NullPointerException: Cannot read field "rtype" because "this" is null #13167

Closed
eclipse-omr/omr
#6208

Description

@JasonFengJ9

Failure link

From an internal build Test_openjdk16_j9_extended.functional_ppc64le_linux_testList_0/50/:

openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment Temurin-16.0.1+9 (build 16.0.1+9)
Eclipse OpenJ9 VM Temurin-16.0.1+9 (build master-d5a8afc9d, JRE 16 Linux ppc64le-64-Bit Compressed References 20210710_57 (JIT enabled, AOT enabled)
OpenJ9   - d5a8afc9d
OMR      - bdee22f4b
JCL      - 3c4bffefe5 based on jdk-16.0.1+9)

Rerun in Grinder

Optional info

Failure output (captured from console output)

[2021-07-10T15:22:16.062Z] Running test jsr292_MethodHandleAPI_Test_JitCount1_0 ...
[2021-07-10T15:22:16.062Z] ===============================================
[2021-07-10T15:22:16.062Z] jsr292_MethodHandleAPI_Test_JitCount1_0 Start Time: Sat Jul 10 08:22:15 2021 Epoch Time (ms): 1625930535049
[2021-07-10T15:22:16.062Z] "/home/jenkins/workspace/Test_openjdk16_j9_extended.functional_ppc64le_linux_testList_0/openjdkbinary/j2sdk-image/bin/java" -Xshareclasses:destroyAll; "/home/jenkins/workspace/Test_openjdk16_j9_extended.functional_ppc64le_linux_testList_0/openjdkbinary/j2sdk-image/bin/java" -Xshareclasses:groupAccess,destroyAll; echo "cache cleanup done";
[2021-07-10T15:22:16.062Z] JVMSHRC005I No shared class caches available
[2021-07-10T15:22:16.062Z] JVMSHRC005I No shared class caches available
[2021-07-10T15:22:16.062Z] cache cleanup done
[2021-07-10T15:22:16.062Z] variation: NoOptions
[2021-07-10T15:22:16.062Z] JVM_OPTIONS:  

[2021-07-10T15:22:53.453Z] FAILED: test_countedLoop_ByteType
[2021-07-10T15:22:53.453Z] java.lang.NullPointerException: Cannot read field "rtype" because "this" is null
[2021-07-10T15:22:53.454Z] 	at java.base/java.lang.invoke.MethodType.hashCode(MethodType.java:876)
[2021-07-10T15:22:53.454Z] 	at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
[2021-07-10T15:22:53.454Z] 	at java.base/java.lang.invoke.MethodType$ConcurrentWeakInternSet.get(MethodType.java:1370)
[2021-07-10T15:22:53.454Z] 	at java.base/java.lang.invoke.MethodType.makeImpl(MethodType.java:343)
[2021-07-10T15:22:53.454Z] 	at java.base/java.lang.invoke.MethodType.methodType(MethodType.java:263)
[2021-07-10T15:22:53.454Z] 	at java.base/java.lang.invoke.MethodHandles.countedLoopChecks(MethodHandles.java:7363)
[2021-07-10T15:22:53.454Z] 	at java.base/java.lang.invoke.MethodHandles.countedLoop(MethodHandles.java:7311)
[2021-07-10T15:22:53.454Z] 	at com.ibm.j9.jsr292.api.MethodHandleAPI_countedLoop.test_countedLoop_ByteType(MethodHandleAPI_countedLoop.java:215)
[2021-07-10T15:22:53.454Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2021-07-10T15:22:53.454Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
[2021-07-10T15:22:53.454Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2021-07-10T15:22:53.454Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[2021-07-10T15:22:53.454Z] 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
[2021-07-10T15:22:53.454Z] 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:580)
[2021-07-10T15:22:53.454Z] 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
[2021-07-10T15:22:53.454Z] 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
[2021-07-10T15:22:53.454Z] 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
[2021-07-10T15:22:53.454Z] 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
[2021-07-10T15:22:53.454Z] 	at org.testng.TestRunner.privateRun(TestRunner.java:648)
[2021-07-10T15:22:53.454Z] 	at org.testng.TestRunner.run(TestRunner.java:505)
[2021-07-10T15:22:53.454Z] 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
[2021-07-10T15:22:53.454Z] 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
[2021-07-10T15:22:53.454Z] 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
[2021-07-10T15:22:53.454Z] 	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
[2021-07-10T15:22:53.454Z] 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
[2021-07-10T15:22:53.454Z] 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
[2021-07-10T15:22:53.454Z] 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
[2021-07-10T15:22:53.454Z] 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
[2021-07-10T15:22:53.454Z] 	at org.testng.TestNG.runSuites(TestNG.java:1049)
[2021-07-10T15:22:53.454Z] 	at org.testng.TestNG.run(TestNG.java:1017)
[2021-07-10T15:22:53.454Z] 	at org.testng.TestNG.privateMain(TestNG.java:1354)
[2021-07-10T15:22:53.454Z] 	at org.testng.TestNG.main(TestNG.java:1323)

[2021-07-10T15:22:53.475Z] ===============================================
[2021-07-10T15:22:53.475Z] jsr292_Suite_SE90
[2021-07-10T15:22:53.475Z] Total tests run: 436, Failures: 39, Skips: 0
[2021-07-10T15:22:53.475Z] ===============================================
[2021-07-10T15:22:53.475Z] 
[2021-07-10T15:22:56.515Z] 
[2021-07-10T15:22:56.515Z] jsr292_MethodHandleAPI_Test_JitCount1_0_FAILED

Activity

  1. pshipton commented on Jul 15, 2021

    @pshipton
    Member
  2. JasonFengJ9 commented on Aug 19, 2021

    @JasonFengJ9
    MemberAuthor

    The error is observed w/ a recent JDK16 build at Test_openjdk16_j9_extended.functional_ppc64le_linux_Personal/10/tapResults/

    18:14:50  openjdk version "16.0.2-internal" 2021-07-20
    18:14:50  OpenJDK Runtime Environment (build 16.0.2-internal+0-adhoc.jenkins.BuildJDK16ppc64lelinuxPersonal)
    18:14:50  Eclipse OpenJ9 VM (build master-cd8db74f1d4, JRE 16 Linux ppc64le-64-Bit Compressed References 20210818_32 (JIT enabled, AOT enabled)
    18:14:50  OpenJ9   - cd8db74f1d4
    18:14:50  OMR      - ac3ab4821a5
    18:14:50  JCL      - 44316ee515b based on jdk-16.0.2+7)
    
    ===============================================
    Running test jsr292_MethodHandleAPI_Test_JitCount1_0 ...
    ===============================================
    jsr292_MethodHandleAPI_Test_JitCount1_0 Start Time: Wed Aug 18 17:56:39 2021 Epoch Time (ms): 1629334599074
    variation: NoOptions
    JVM_OPTIONS:  
    
    FAILED: test_countedLoop_ByteType
    java.lang.NullPointerException: Cannot read field "rtype" because "this" is null
    	at java.base/java.lang.invoke.MethodType.hashCode(MethodType.java:876)
    	at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
    	at java.base/java.lang.invoke.MethodType$ConcurrentWeakInternSet.get(MethodType.java:1370)
    	at java.base/java.lang.invoke.MethodType.makeImpl(MethodType.java:343)
    	at java.base/java.lang.invoke.MethodType.methodType(MethodType.java:263)
    	at java.base/java.lang.invoke.MethodHandles.countedLoopChecks(MethodHandles.java:7363)
    	at java.base/java.lang.invoke.MethodHandles.countedLoop(MethodHandles.java:7311)
    	at com.ibm.j9.jsr292.api.MethodHandleAPI_countedLoop.test_countedLoop_ByteType(MethodHandleAPI_countedLoop.java:215)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
    	at org.testng.internal.Invoker.invokeMethod(Invoker.java:580)
    	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
    	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
    	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
    	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
    	at org.testng.TestRunner.privateRun(TestRunner.java:648)
    	at org.testng.TestRunner.run(TestRunner.java:505)
    	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
    	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
    	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
    	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
    	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
    	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
    	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
    	at org.testng.TestNG.runSuites(TestNG.java:1049)
    	at org.testng.TestNG.run(TestNG.java:1017)
    	at org.testng.TestNG.privateMain(TestNG.java:1354)
    	at org.testng.TestNG.main(TestNG.java:1323)
    
    ...
    
    ===============================================
        jsr292_MethodHandleAPI_Test
        Tests run: 436, Failures: 39, Skips: 0
    ===============================================
    
    
    ===============================================
    jsr292_Suite_SE90
    Total tests run: 436, Failures: 39, Skips: 0
    ===============================================
    
    
    jsr292_MethodHandleAPI_Test_JitCount1_0_FAILED
    

    Re-run the Grinder

  3. JasonFengJ9 commented on Aug 26, 2021

    @JasonFengJ9
    MemberAuthor

    Observed in latest JDK17 https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/4/consoleFull

    05:25:31  openjdk version "17-internal" 2021-09-14
    05:25:31  OpenJDK Runtime Environment (build 17-internal+0-adhoc.****.BuildJDK17ppc64aixNightly)
    05:25:31  Eclipse OpenJ9 VM (build master-4b629d2fc7f, JRE 17 AIX ppc64-64-Bit Compressed References 20210825_4 (JIT enabled, AOT enabled)
    05:25:31  OpenJ9   - 4b629d2fc7f
    05:25:31  OMR      - 1d0a329e26b
    05:25:31  JCL      - 72d25cf4859 based on jdk-17+35)
    
    07:02:45  ===============================================
    07:02:45  Running test jsr292_MethodHandleAPI_Test_JitCount1_0 ...
    07:02:45  ===============================================
    07:02:45  jsr292_MethodHandleAPI_Test_JitCount1_0 Start Time: Thu Aug 26 07:02:44 2021 Epoch Time (ms): 1629975764909
    07:02:45  "/home/jenkins/workspace/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/openjdkbinary/j2sdk-image/bin/java" -Xshareclasses:destroyAll; "/home/jenkins/workspace/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/openjdkbinary/j2sdk-image/bin/java" -Xshareclasses:groupAccess,destroyAll; echo "cache cleanup done";
    07:02:45  JVMSHRC005I No shared class caches available
    07:02:45  JVMSHRC005I No shared class caches available
    07:02:45  cache cleanup done
    07:02:45  variation: NoOptions
    07:02:45  JVM_OPTIONS:  
    
    07:03:30  FAILED: test_countedLoop_ByteType
    07:03:30  java.lang.NullPointerException: Cannot read field "rtype" because "this" is null
    07:03:30  	at java.base/java.lang.invoke.MethodType.hashCode(MethodType.java:873)
    07:03:30  	at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
    07:03:30  	at java.base/java.lang.invoke.MethodType$ConcurrentWeakInternSet.get(MethodType.java:1368)
    07:03:30  	at java.base/java.lang.invoke.MethodType.makeImpl(MethodType.java:341)
    07:03:30  	at java.base/java.lang.invoke.MethodType.methodType(MethodType.java:257)
    07:03:30  	at java.base/java.lang.invoke.MethodHandles.countedLoopChecks(MethodHandles.java:7371)
    07:03:30  	at java.base/java.lang.invoke.MethodHandles.countedLoop(MethodHandles.java:7319)
    07:03:30  	at com.ibm.j9.jsr292.api.MethodHandleAPI_countedLoop.test_countedLoop_ByteType(MethodHandleAPI_countedLoop.java:215)
    07:03:30  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    07:03:30  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    07:03:30  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    07:03:30  	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    07:03:30  	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
    07:03:30  	at org.testng.internal.Invoker.invokeMethod(Invoker.java:580)
    07:03:30  	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
    07:03:30  	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
    07:03:30  	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
    07:03:30  	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
    07:03:30  	at org.testng.TestRunner.privateRun(TestRunner.java:648)
    07:03:30  	at org.testng.TestRunner.run(TestRunner.java:505)
    07:03:30  	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
    07:03:30  	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
    07:03:30  	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
    07:03:30  	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
    07:03:30  	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    07:03:30  	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
    07:03:30  	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
    07:03:30  	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
    07:03:30  	at org.testng.TestNG.runSuites(TestNG.java:1049)
    07:03:30  	at org.testng.TestNG.run(TestNG.java:1017)
    07:03:30  	at org.testng.TestNG.privateMain(TestNG.java:1354)
    07:03:30  	at org.testng.TestNG.main(TestNG.java:1323)
    
    07:03:30  ===============================================
    07:03:30      jsr292_MethodHandleAPI_Test
    07:03:30      Tests run: 436, Failures: 39, Skips: 0
    07:03:30  ===============================================
    07:03:30  
    07:03:30  
    07:03:30  ===============================================
    07:03:30  jsr292_Suite_SE90
    07:03:30  Total tests run: 436, Failures: 39, Skips: 0
    07:03:30  ===============================================
    07:03:30  
    07:03:32  
    07:03:32  jsr292_MethodHandleAPI_Test_JitCount1_0_FAILED
    

    Re-run the Grinder

  4. changed the title [-]JDK16 (OJDK MH) jsr292_MethodHandleAPI_Test_JitCount1_0_FAILED - NullPointerException: Cannot read field "rtype" because "this" is null[/-] [+]JDK17 jsr292_MethodHandleAPI_Test_JitCount1_0_FAILED - NullPointerException: Cannot read field "rtype" because "this" is null[/+] on Aug 26, 2021
  5. fengxue-IS commented on Sep 7, 2021

    @fengxue-IS
    Contributor

    10/10 passed on x86-64_linux
    14/15 failed on ppcle_linux
    I suspect this have to do with power codegen? maybe due to weak memory ordering?
    @nbhuiyan can you please take a look at this

  6. 0xdaryl commented on Sep 8, 2021

    @0xdaryl
    Contributor

    The backtrace for the remaining Power failure does not suggest a MH handle problem due to the JIT transformations for LambdaForms where many of the other problems are seen.

    In light of that, @zl-wang could you have someone triage this problem on Power Linux please? It seems quite reproducible (14/15 runs). Thank you.

  7. zl-wang commented on Sep 8, 2021

    @zl-wang
    Contributor

    @rmnattas vijay fixed EA for this very same issue previously you investigated. not sure why it happens again. please have a look.

  8. JasonFengJ9 commented on Sep 9, 2021

    @JasonFengJ9
    MemberAuthor

    Observed at an internal build Test_openjdk17_j9_extended.functional_ppc64le_linux_Personal/32/tapResults/

    22:46:24  openjdk version "17-internal" 2021-09-14
    22:46:24  OpenJDK Runtime Environment (build 17-internal+0-adhoc.jenkins.BuildJDK17ppc64lelinuxPersonal)
    22:46:24  Eclipse OpenJ9 VM (build v0.28.0-release-139535d5a37, JRE 17 Linux ppc64le-64-Bit Compressed References 20210908_41 (JIT enabled, AOT enabled)
    22:46:24  OpenJ9   - 139535d5a37
    22:46:24  OMR      - 407eef0153b
    22:46:24  JCL      - b6c1a570c77 based on jdk-17+35)
    
    ===============================================
    Running test jsr292_MethodHandleAPI_Test_JitCount1_0 ...
    ===============================================
    jsr292_MethodHandleAPI_Test_JitCount1_0 Start Time: Wed Sep  8 21:55:43 2021 Epoch Time (ms): 1631163343117
    variation: NoOptions
    JVM_OPTIONS:  
    
    FAILED: test_countedLoop_VoidReturnType_Body
    java.lang.NullPointerException: Cannot read field "rtype" because "this" is null
    	at java.base/java.lang.invoke.MethodType.hashCode(MethodType.java:873)
    	at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
    	at java.base/java.lang.invoke.MethodType$ConcurrentWeakInternSet.get(MethodType.java:1368)
    	at java.base/java.lang.invoke.MethodType.makeImpl(MethodType.java:341)
    	at java.base/java.lang.invoke.MethodType.methodType(MethodType.java:257)
    	at java.base/java.lang.invoke.MethodHandles.countedLoopChecks(MethodHandles.java:7371)
    	at java.base/java.lang.invoke.MethodHandles.countedLoop(MethodHandles.java:7319)
    	at com.ibm.j9.jsr292.api.MethodHandleAPI_countedLoop.test_countedLoop_VoidReturnType_Body(MethodHandleAPI_countedLoop.java:148)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
    	at org.testng.internal.Invoker.invokeMethod(Invoker.java:580)
    	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
    	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
    	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
    	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
    	at org.testng.TestRunner.privateRun(TestRunner.java:648)
    	at org.testng.TestRunner.run(TestRunner.java:505)
    	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
    	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
    	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
    	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
    	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
    	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
    	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
    	at org.testng.TestNG.runSuites(TestNG.java:1049)
    	at org.testng.TestNG.run(TestNG.java:1017)
    	at org.testng.TestNG.privateMain(TestNG.java:1354)
    	at org.testng.TestNG.main(TestNG.java:1323)
    
    ===============================================
        jsr292_MethodHandleAPI_Test
        Tests run: 436, Failures: 39, Skips: 0
    ===============================================
    
    jsr292_MethodHandleAPI_Test_JitCount1_0_FAILED
    

    Similar NPEs were observed at JDK17 head stream as well Test_openjdk17_j9_extended.functional_ppc64le_linux_Personal/33/tapResults/

    22:50:40  openjdk version "17-internal" 2021-09-14
    22:50:40  OpenJDK Runtime Environment (build 17-internal+0-adhoc.jenkins.BuildJDK17ppc64lelinuxPersonal)
    22:50:40  Eclipse OpenJ9 VM (build master-ec3bd5f0b20, JRE 17 Linux ppc64le-64-Bit Compressed References 20210908_42 (JIT enabled, AOT enabled)
    22:50:40  OpenJ9   - ec3bd5f0b20
    22:50:40  OMR      - 680b68120d9
    22:50:40  JCL      - b457a33a599 based on jdk-17+35)
    
  9. JasonFengJ9 commented on Sep 10, 2021

    @JasonFengJ9
    MemberAuthor

    Observed at JDK17 0.28 release MacOS build at job/Test_openjdk17_j9_extended.functional_x86-64_mac_testList_0/50/

    openjdk version "17-beta" 2021-09-14
    IBM Semeru Runtime Open Edition 17.0.0.0-m1 (build 17-beta+35-202109100226)
    Eclipse OpenJ9 VM 17.0.0.0-m1 (build openj9-0.28.0-m1, JRE 17 Mac OS X amd64-64-Bit Compressed References 20210909_23 (JIT enabled, AOT enabled)
    OpenJ9   - 5eef84fb1
    OMR      - 0bf455f83
    JCL      - b6c1a570c77 based on jdk-17+35)
    
    [2021-09-10T05:03:04.198Z] Running test jsr292_MethodHandleAPI_Test_JitCount1_0 ...
    [2021-09-10T05:03:04.198Z] ===============================================
    [2021-09-10T05:03:04.198Z] jsr292_MethodHandleAPI_Test_JitCount1_0 Start Time: Fri Sep 10 01:03:02 2021 Epoch Time (ms): 1631250182996
    [2021-09-10T05:03:04.198Z] "/Users/jenkins/workspace/Test_openjdk17_j9_extended.functional_x86-64_mac_testList_0/openjdkbinary/j2sdk-image/Contents/Home/bin/..//bin/java" -Xshareclasses:destroyAll; "/Users/jenkins/workspace/Test_openjdk17_j9_extended.functional_x86-64_mac_testList_0/openjdkbinary/j2sdk-image/Contents/Home/bin/..//bin/java" -Xshareclasses:groupAccess,destroyAll; echo "cache cleanup done";
    [2021-09-10T05:03:04.198Z] JVMSHRC005I No shared class caches available
    [2021-09-10T05:03:04.198Z] JVMSHRC005I No shared class caches available
    [2021-09-10T05:03:04.198Z] cache cleanup done
    [2021-09-10T05:03:04.198Z] variation: NoOptions
    [2021-09-10T05:03:04.198Z] JVM_OPTIONS:  
    
    [2021-09-10T05:03:24.027Z] FAILED: test_countedLoop_VoidReturnType_Body
    [2021-09-10T05:03:24.027Z] java.lang.NullPointerException: Cannot read field "rtype" because "this" is null
    [2021-09-10T05:03:24.027Z] 	at java.base/java.lang.invoke.MethodType.hashCode(MethodType.java:873)
    [2021-09-10T05:03:24.027Z] 	at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
    [2021-09-10T05:03:24.027Z] 	at java.base/java.lang.invoke.MethodType$ConcurrentWeakInternSet.get(MethodType.java:1368)
    [2021-09-10T05:03:24.027Z] 	at java.base/java.lang.invoke.MethodType.makeImpl(MethodType.java:341)
    [2021-09-10T05:03:24.027Z] 	at java.base/java.lang.invoke.MethodType.methodType(MethodType.java:257)
    [2021-09-10T05:03:24.027Z] 	at java.base/java.lang.invoke.MethodHandles.countedLoopChecks(MethodHandles.java:7371)
    [2021-09-10T05:03:24.027Z] 	at java.base/java.lang.invoke.MethodHandles.countedLoop(MethodHandles.java:7319)
    [2021-09-10T05:03:24.027Z] 	at com.ibm.j9.jsr292.api.MethodHandleAPI_countedLoop.test_countedLoop_VoidReturnType_Body(MethodHandleAPI_countedLoop.java:148)
    [2021-09-10T05:03:24.027Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [2021-09-10T05:03:24.027Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    [2021-09-10T05:03:24.027Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [2021-09-10T05:03:24.027Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    [2021-09-10T05:03:24.027Z] 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
    [2021-09-10T05:03:24.027Z] 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:580)
    [2021-09-10T05:03:24.027Z] 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
    [2021-09-10T05:03:24.027Z] 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
    [2021-09-10T05:03:24.027Z] 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
    [2021-09-10T05:03:24.027Z] 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestRunner.privateRun(TestRunner.java:648)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestRunner.run(TestRunner.java:505)
    [2021-09-10T05:03:24.027Z] 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
    [2021-09-10T05:03:24.027Z] 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
    [2021-09-10T05:03:24.027Z] 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
    [2021-09-10T05:03:24.027Z] 	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
    [2021-09-10T05:03:24.027Z] 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    [2021-09-10T05:03:24.027Z] 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestNG.runSuites(TestNG.java:1049)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestNG.run(TestNG.java:1017)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestNG.privateMain(TestNG.java:1354)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestNG.main(TestNG.java:1323)
    [2021-09-10T05:03:24.027Z] 
    [2021-09-10T05:03:24.027Z] FAILED: test_countedLoop_VoidReturnType_Body
    [2021-09-10T05:03:24.027Z] java.lang.NullPointerException: Cannot read field "rtype" because "this" is null
    [2021-09-10T05:03:24.027Z] 	at java.base/java.lang.invoke.MethodType.hashCode(MethodType.java:873)
    [2021-09-10T05:03:24.027Z] 	at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
    [2021-09-10T05:03:24.027Z] 	at java.base/java.lang.invoke.MethodType$ConcurrentWeakInternSet.get(MethodType.java:1368)
    [2021-09-10T05:03:24.027Z] 	at java.base/java.lang.invoke.MethodType.makeImpl(MethodType.java:341)
    [2021-09-10T05:03:24.027Z] 	at java.base/java.lang.invoke.MethodType.methodType(MethodType.java:257)
    [2021-09-10T05:03:24.027Z] 	at java.base/java.lang.invoke.MethodHandles.countedLoopChecks(MethodHandles.java:7371)
    [2021-09-10T05:03:24.027Z] 	at java.base/java.lang.invoke.MethodHandles.countedLoop(MethodHandles.java:7319)
    [2021-09-10T05:03:24.027Z] 	at com.ibm.j9.jsr292.api.MethodHandleAPI_countedLoop.test_countedLoop_VoidReturnType_Body(MethodHandleAPI_countedLoop.java:148)
    [2021-09-10T05:03:24.027Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [2021-09-10T05:03:24.027Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    [2021-09-10T05:03:24.027Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [2021-09-10T05:03:24.027Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    [2021-09-10T05:03:24.027Z] 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
    [2021-09-10T05:03:24.027Z] 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:580)
    [2021-09-10T05:03:24.027Z] 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
    [2021-09-10T05:03:24.027Z] 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
    [2021-09-10T05:03:24.027Z] 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
    [2021-09-10T05:03:24.027Z] 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestRunner.privateRun(TestRunner.java:648)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestRunner.run(TestRunner.java:505)
    [2021-09-10T05:03:24.027Z] 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
    [2021-09-10T05:03:24.027Z] 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
    [2021-09-10T05:03:24.027Z] 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
    [2021-09-10T05:03:24.027Z] 	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
    [2021-09-10T05:03:24.027Z] 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    [2021-09-10T05:03:24.027Z] 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestNG.runSuites(TestNG.java:1049)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestNG.run(TestNG.java:1017)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestNG.privateMain(TestNG.java:1354)
    [2021-09-10T05:03:24.027Z] 	at org.testng.TestNG.main(TestNG.java:1323)
    [2021-09-10T05:03:24.027Z] 
    [2021-09-10T05:03:24.027Z] 
    [2021-09-10T05:03:24.027Z] ===============================================
    [2021-09-10T05:03:24.027Z]     jsr292_MethodHandleAPI_Test
    [2021-09-10T05:03:24.027Z]     Tests run: 436, Failures: 2, Skips: 0
    [2021-09-10T05:03:24.027Z] ===============================================
    [2021-09-10T05:03:24.027Z] 
    [2021-09-10T05:03:24.027Z] 
    [2021-09-10T05:03:24.027Z] ===============================================
    [2021-09-10T05:03:24.027Z] jsr292_Suite_SE90
    [2021-09-10T05:03:24.027Z] Total tests run: 436, Failures: 2, Skips: 0
    [2021-09-10T05:03:24.027Z] ===============================================
    [2021-09-10T05:03:24.027Z] 
    [2021-09-10T05:03:26.405Z] 
    [2021-09-10T05:03:26.405Z] jsr292_MethodHandleAPI_Test_JitCount1_0_FAILED
    
    

    Rerun in Grinder

  10. 21 remaining items

  11. tajila commented on Sep 21, 2021

    @tajila
    Contributor

    @ymanton

    Isn't that the bug then? The intermediate MT can't be looked up in the intern table because it's hash code can't be computed because it has a NULL rtype?

    I looked at the test and there isn't a reason why the rtype should ever be null. So I think there is still another problem here. Adding a null check on the rtype before searching the intern table will just push the NPE somewhere else.

  12. tajila commented on Sep 21, 2021

    @tajila
    Contributor

    Based on the stack trace, the null rtype comes from the start.type().returnType(); of the MethodHandle countedLoop(MethodHandle start, MethodHandle end, MethodHandle init, MethodHandle body) call. In this test case it should be int.class as the start MH is MethodHandles.constant(int.class, 5);

  13. pshipton commented on Sep 27, 2021

    @pshipton
    Member

    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_x86-64_windows_Nightly_testList_1/35
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64le_linux_Nightly_testList_1/35
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/34
    jsr292_MethodHandleAPI_Test_JitCount1_0 (NoOptions)

    02:01:37  FAILED: test_countedLoop_IntType
    02:01:37  java.lang.NullPointerException: Cannot read field "rtype" because "this" is null
    02:01:37  	at java.base/java.lang.invoke.MethodType.hashCode(MethodType.java:873)
    02:01:37  	at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
    02:01:37  	at java.base/java.lang.invoke.MethodType$ConcurrentWeakInternSet.get(MethodType.java:1368)
    02:01:37  	at java.base/java.lang.invoke.MethodType.makeImpl(MethodType.java:341)
    02:01:37  	at java.base/java.lang.invoke.MethodType.methodType(MethodType.java:257)
    02:01:37  	at java.base/java.lang.invoke.MethodHandles.countedLoopChecks(MethodHandles.java:7371)
    02:01:37  	at java.base/java.lang.invoke.MethodHandles.countedLoop(MethodHandles.java:7319)
    02:01:37  	at com.ibm.j9.jsr292.api.MethodHandleAPI_countedLoop.test_countedLoop_IntType(MethodHandleAPI_countedLoop.java:281)
    

    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/35/

    01:06:21  FAILED: test_countedLoop_ByteType
    01:06:21  java.lang.NullPointerException: Cannot read field "rtype" because "this" is null
    01:06:21  	at java.base/java.lang.invoke.MethodType.hashCode(MethodType.java:873)
    01:06:21  	at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
    01:06:21  	at java.base/java.lang.invoke.MethodType$ConcurrentWeakInternSet.get(MethodType.java:1368)
    01:06:21  	at java.base/java.lang.invoke.MethodType.makeImpl(MethodType.java:341)
    01:06:21  	at <unknown class>.<unknown method>(Unknown Source)
    01:06:21  	at java.base/java.lang.invoke.MethodHandles.countedLoopChecks(MethodHandles.java:7371)
    01:06:21  	at java.base/java.lang.invoke.MethodHandles.countedLoop(MethodHandles.java:7319)
    01:06:21  	at com.ibm.j9.jsr292.api.MethodHandleAPI_countedLoop.test_countedLoop_ByteType(MethodHandleAPI_countedLoop.java:215)
    

    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/36
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/40
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_x86-64_linux_Nightly_testList_0/41
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/42
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/44
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64le_linux_Nightly_testList_1/46
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/45
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/46
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/48
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64_aix_Release_testList_0/7
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_x86-64_linux_Nightly_testList_0/50
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/51
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_x86-64_windows_Nightly_testList_1/53
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/54
    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_ppc64_aix_Nightly_testList_0/58

  14. ymanton commented on Sep 27, 2021

    @ymanton
    Member

    Managed to get a core file closer to the exception throw by hacking the exception handler to crash if execution is in MethodType.hashCode(). Working backwards from there to MethodHandles.countedLoopChecks() gets me to this bit of code:

            if (outerList.isEmpty()) {
                // special case; take lists from end handle
                outerList = end.type().parameterList();
                innerList = bodyType.insertParameterTypes(vsize + 1, outerList).parameterList();
            }
            MethodType expected = methodType(counterType, outerList);

    There are multiple compiled bodies containing the above, but for a particular warm compile of MethodHandles.countedLoopChecks() we generate the wrong code for the last line and call methodType(NULL, outerList):

    0x7b84b3084214 {java/.../MethodHandles.countedLoopChecks} +169          >    00006038 li        r3, 0 <<< +154
    0x7b84b3084218 {java/.../MethodHandles.countedLoopChecks} +170               00008463 ori       r4, r28, 0
    0x7b84b308421c {java/.../MethodHandles.countedLoopChecks} +171  -1:298       e5ecd54b bl        0x7b84b2de2f00 ^{java/lang/invoke/MethodType.methodType} +2    // invokestatic 311 {java/.../MethodType.methodType(Ljava/lang/Class;Ljava/util/List;)Ljava/.../MethodType;} 
    

    Going to get a trace log next to see why we generated the wrong code for that first parameter.

  15. nbhuiyan commented on Sep 27, 2021

    @nbhuiyan
    Member

    I have been able to reliably make this crash occur in every run by inserting a sleep point in test_countedLoop_DoubleType test case. With that setup, I observed that the test failure was also happening with -Xint, suggesting that this may not be due to something going wrong during compilation. I then inserted print statements in MethodHandles.countedLoop, MethodHandles.countedLoopChecks, MethodType.methodType, and MethodType.makeImpl that I could toggle using env variables. The goal was to track where counterType was becoming invalid, as that's the reason behind the MethodType object being created with a null rtype field.

    As Tobi mentioned above, counterType is obtained from start.type().returnType(), and should have been the value that is provided as the first arg in

    MethodType expected = methodType(counterType, outerList);
    

    Each of the failed tests are set to run 2 iterations, and for some of them, the first iteration completes without issues only to fail in the second run. In all failing cases, there is a point along countedLoopChecks that I was able to detect the first instance of the value of countedLoopChecks to change from int.class to null: right after this line.

    So the counterType can somehow become null, and I am not sure why. This eventually then results in the null MethodType.rtype field created via MethodType.makeImpl. When counterType becomes NULL, start.type().returnType() was still int.class, and somehow by replacing counterType with start.type().returnType() in MethodType expected = methodType(counterType, outerList); fixes the problem.

    Edit: the test setup ignores the -Xint option, so this could still be due to the JIT

  16. JasonFengJ9 commented on Oct 1, 2021

    @JasonFengJ9
    MemberAuthor

    Just note this is observed in JDK17 0.29 release build job/Test_openjdk17_j9_extended.functional_ppc64le_linux_Personal/59/tapResults/.

    23:23:05  openjdk version "17-internal" 2021-09-14
    23:23:05  OpenJDK Runtime Environment (build 17-internal+0-adhoc.jenkins.BuildJDK17ppc64lelinuxPersonal)
    23:23:05  Eclipse OpenJ9 VM (build v0.29.0-release-828307692e8, JRE 17 Linux ppc64le-64-Bit Compressed References 20210930_83 (JIT enabled, AOT enabled)
    23:23:05  OpenJ9   - 828307692e8
    23:23:05  OMR      - e66945e0106
    23:23:05  JCL      - 23999d8072a based on jdk-17+35)
    
    ===============================================
    Running test jsr292_MethodHandleAPI_Test_JitCount1_0 ...
    ===============================================
    jsr292_MethodHandleAPI_Test_JitCount1_0 Start Time: Thu Sep 30 22:44:21 2021 Epoch Time (ms): 1633067061634
    variation: NoOptions
    JVM_OPTIONS:  
    
    FAILED: test_countedLoop_VoidReturnType_Body
    java.lang.NullPointerException: Cannot read field "rtype" because "this" is null
    	at java.base/java.lang.invoke.MethodType.hashCode(MethodType.java:873)
    	at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
    	at java.base/java.lang.invoke.MethodType$ConcurrentWeakInternSet.get(MethodType.java:1368)
    	at java.base/java.lang.invoke.MethodType.makeImpl(MethodType.java:341)
    	at java.base/java.lang.invoke.MethodType.methodType(MethodType.java:257)
    	at java.base/java.lang.invoke.MethodHandles.countedLoopChecks(MethodHandles.java:7371)
    	at java.base/java.lang.invoke.MethodHandles.countedLoop(MethodHandles.java:7319)
    	at com.ibm.j9.jsr292.api.MethodHandleAPI_countedLoop.test_countedLoop_VoidReturnType_Body(MethodHandleAPI_countedLoop.java:148)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
    	at org.testng.internal.Invoker.invokeMethod(Invoker.java:580)
    	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
    	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
    	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
    	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
    	at org.testng.TestRunner.privateRun(TestRunner.java:648)
    	at org.testng.TestRunner.run(TestRunner.java:505)
    	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
    	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
    	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
    	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
    	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
    	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
    	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
    	at org.testng.TestNG.runSuites(TestNG.java:1049)
    	at org.testng.TestNG.run(TestNG.java:1017)
    	at org.testng.TestNG.privateMain(TestNG.java:1354)
    	at org.testng.TestNG.main(TestNG.java:1323)
    
    
    ===============================================
        jsr292_MethodHandleAPI_Test
        Tests run: 436, Failures: 39, Skips: 0
    ===============================================
    
    jsr292_MethodHandleAPI_Test_JitCount1_0_FAILED
    
  17. jdmpapin commented on Oct 15, 2021

    @jdmpapin
    Contributor

    Based on analysis of log files produced using @nbhuiyan's repro setup, we traced the cause of this to an intersection bug in VP. The code reads the rtype field of a MethodType, which gets a global {JavaLangClassObject} constraint, and then stores the reference into an auto named counterType. It then compares the value against int.class, creating a local (path-dependent) known object constraint in the successor where counterType == int.class. Later, in a block only reachable with counterType == int.class, the code compares it again to the result of List.get, which is constrained with a type bound of java/lang/Object. In the successor where they're equal, VP attempted to create a local constraint with the intersection of the known object and the java/lang/Object type, but first it intersected the java/lang/Object constraint with the global {JavaLangClassObject} constraint, resulting in a VPClass containing both: class Ljava/lang/Object; {JavaLangClassObject}, which means that counterType will be (null or) an instance of java/lang/Class that represents java/lang/Object or a subtype of it. This is the incorrect constraint - it should be just {JavaLangClassObject}. The incorrect constraint was then intersected with the known object, resulting in a known null reference because as a primitive, int is not a subtype of Object. (For this last intersection, VP could have produced an unreachable path constraint, but in that case any other constraint of the correct type will do as well.) Finally, there was downstream code passing counterType as the return type to MethodType.methodType, and the uses of counterType were folded to null.

    VPAcmpObjectPrimJLClass.java is a small test case that reproduces the underlying VP intersection bug

    $ java -Xnoaot -Xjit:'limit={*.go(*)*},dontInline={*.opaque*},count=1,disableAsyncCompilation,initialOptLevel=warm,inhibitRecompilation' VPAcmpObjectPrimJLClass
    

    It should print int both times, but instead prints int followed by null.

  18. 0xdaryl commented on Oct 26, 2021

    @0xdaryl
    Contributor

    This will require an openj9-omr PR in 0.29.1 as well.

  19. pshipton commented on Oct 26, 2021

    @pshipton
    Member

    We can keep this open until the 0.29.1 PR is merged.

  20. jdmpapin commented on Oct 26, 2021

    @jdmpapin
    Contributor

    The fix has been merged into the 0.29.1 release branch in eclipse-openj9/openj9-omr#129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions