eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.29k stars 722 forks source link

Re-enable openjdk test - jdk_bean #20531

Open llxia opened 3 weeks ago

llxia commented 3 weeks ago

jdk_beans got excluded as part of the general exclude a while back via https://github.com/eclipse-openj9/openj9/issues/10757.

https://github.com/adoptium/aqa-tests/blob/a498becc695f7bdeaa7c4b3752c827e65aa7e123/openjdk/playlist.xml#L755

My limited testing can pass on xlinux JDK17, 21 and 23. We still need to look into xlinux JDK8 and JDK11 failures. But I think we should look into re-enabling this test.

This would help us to discover issues like https://bugs.openjdk.org/browse/JDK-8336862 early. Presumably, we will hit the same issue on Windows: https://github.com/adoptium/aqa-tests/issues/5690#issuecomment-2417001452

github-actions[bot] commented 3 weeks ago

Issue Number: 20531 Status: Open Recommended Components: comp:test, comp:build, comp:vm Recommended Assignees: pshipton, llxia, longyuzhang

llxia commented 3 weeks ago

@annaibm could you run the test on all platforms? Thanks

llxia commented 2 weeks ago
Execution failed: `main' threw exception: java.lang.InternalError: Compile stub invoked! Apart from deliberate reflective access, this should not happen. Please report this to the project so it can be addressed 
java.lang.InternalError: Compile stub invoked! Apart from deliberate reflective access, this should not happen. Please report this to the project so it can be addressed
    at java.base/java.lang.invoke.OpenJDKCompileStub.OpenJDKCompileStubThrowError(OpenJDKCompileStub.java:38)
    at java.base/java.lang.invoke.MethodHandle.intrinsicName(MethodHandle.java:930)
    at java.base/java.lang.invoke.MethodHandleImpl.makeIntrinsic(MethodHandleImpl.java:1450)
    at java.base/java.lang.invoke.MethodHandleImpl$ArrayAccessor.<clinit>(MethodHandleImpl.java:164)
    at java.base/java.lang.Class.forNameImpl(Native Method)
    at java.base/java.lang.Class.forName(Class.java:347)
    at Task.getClasses(Task.java:134)
    at TestConstructorFinder.main(TestConstructorFinder.java:43)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:572)
    at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
    at java.base/java.lang.Thread.run(Thread.java:835)

JavaTest Message: Test threw exception: java.lang.InternalError: Compile stub invoked! Apart from deliberate reflective access, this should not happen. Please report this to the project so it can be addressed
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.InternalError: Compile stub invoked! Apart from deliberate reflective access, this should not happen. Please report this to the project so it can be addressed
  1. java/beans/XMLDecoder/8028054/TestMethodFinder.java.TestMethodFinder
Execution failed: `main' threw exception: java.lang.InternalError: Compile stub invoked! Apart from deliberate reflective access, this should not happen. Please report this to the project so it can be addressed 
pshipton commented 2 weeks ago

The failure on jdk8 is already resolved via https://github.com/ibmruntimes/openj9-openjdk-jdk8/pull/780

@babsingh pls take a look at the jdk11 failures.

llxia commented 2 weeks ago

Thanks @pshipton

With the latest JDK8, the NativeCrypto.isOpenSSLFIPS error is gone. However, there are 4 subtest failures, 2 of which are the same as those in JDK11. (link).

00:01:16.905  openjdk version "1.8.0_442-internal"
00:01:16.905  OpenJDK Runtime Environment (build 1.8.0_442-internal-_2024_11_08_03_05-b00)
00:01:16.905  Eclipse OpenJ9 VM (build master-26133ff75ca, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20241108_912 (JIT enabled, AOT enabled)
00:01:16.905  OpenJ9   - 26133ff75ca
00:01:16.905  OMR      - a34c903d0c8
00:01:16.905  JCL      - 70a9dda9400 based on jdk8u442-b01)
00:06:30.188  FAILED test targets:
00:06:30.188    jdk_beans_0 - Test results: passed: 346; failed: 4 
00:06:30.188        Failed test cases: 
00:06:30.188            TEST: java/beans/Introspector/Test5102804.java
00:06:30.188          TEST: java/beans/PropertyEditor/Test6397609.java
00:06:30.188          TEST: java/beans/XMLDecoder/8028054/TestConstructorFinder.java
00:06:30.188          TEST: java/beans/XMLDecoder/8028054/TestMethodFinder.java
annaibm commented 2 weeks ago
pshipton commented 2 weeks ago

@dmitripivkine pls take a look at the jdk8 failure.

pshipton commented 2 weeks ago

@babsingh pls take a look at the jdk11 xmac failure: java/beans/XMLDecoder/8028054/TestMethodFinder.java.TestMethodFinder java/beans/XMLDecoder/8028054/TestConstructorFinder.java.TestConstructorFinder

11:42:23  java.lang.InternalError: Compile stub invoked! Apart from deliberate reflective access, this should not happen. Please report this to the project so it can be addressed
11:42:23    at java.base/java.lang.invoke.OpenJDKCompileStub.OpenJDKCompileStubThrowError(OpenJDKCompileStub.java:38)
11:42:23    at java.base/java.lang.invoke.MethodHandle.intrinsicName(MethodHandle.java:930)
11:42:23    at java.base/java.lang.invoke.MethodHandleImpl.makeIntrinsic(MethodHandleImpl.java:1450)
11:42:23    at java.base/java.lang.invoke.MethodHandleImpl$ArrayAccessor.<clinit>(MethodHandleImpl.java:164)
11:42:23    at java.base/java.lang.Class.forNameImpl(Native Method)
11:42:23    at java.base/java.lang.Class.forName(Class.java:347)
11:42:23    at Task.getClasses(Task.java:134)
11:42:23    at TestMethodFinder.main(TestMethodFinder.java:43)
pshipton commented 2 weeks ago

There are some JIT asserts on xmac jdk21, which matches https://github.com/eclipse-openj9/openj9/issues/20267 java/beans/Introspector/Test8027905.java java/beans/Introspector/Test8040656.java

11:43:01  Assertion failed at /Users/jenkins/workspace/Build_JDK21_x86-64_mac_Nightly/omr/compiler/codegen/OMRTreeEvaluator.cpp:590: false
11:43:01  VMState: 0x0005ff04
11:43:01    badILOp BadILOp cannot be evaluated
11:43:01  
11:43:01  compiling java/lang/ClassLoader.defineClassInternal(Ljava/lang/String;[BIILjava/security/ProtectionDomain;Z)Ljava/lang/Class; at level: very-hot (profiling)
11:43:01  
11:43:01  Unhandled exception
11:43:01  Type=Unhandled trap vmState=0x0005ff04
11:43:01  J9Generic_Signal_Number=00000108 Signal_Number=00000005 Error_Value=00000000 Signal_Code=00000001
11:43:01  Handler1=00000000048F0480 Handler2=0000000004644570
11:43:01  RDI=0000000000004B03 RSI=0000000000000005 RAX=0000000000000000 RBX=0000000000000005
11:43:01  RCX=0000700007121998 RDX=0000000000000000 R8=FFFFFFFFFFFFFFE9 R9=00006000033DC020
11:43:01  R10=0000700007128000 R11=0000000000000246 R12=0000000000004B03 R13=0000000041A8E288
11:43:01  R14=0000700007128000 R15=0000000000000016
11:43:01  RIP=00007FF8159567A2 GS=0000 FS=0000 RSP=0000700007121998
11:43:01  RFlags=0000000000000246 CS=0007 RBP=00007000071219C0 ERR=0000000002000148
11:43:01  TRAPNO=0200014800000085 CPU=0000020001480000 FAULTVADDR=0000000000000000
11:43:01  XMM0=00000000000000ff (f: 255.000000, d: 1.259867e-321)
11:43:01  XMM1=0000000000000000 (f: 0.000000, d: 0.000000e+00)
11:43:01  XMM2=0000000000000000 (f: 0.000000, d: 0.000000e+00)
11:43:01  XMM3=0000000000000000 (f: 0.000000, d: 0.000000e+00)
11:43:01  XMM4=0000000000000000 (f: 0.000000, d: 0.000000e+00)
11:43:01  XMM5=0000000000000000 (f: 0.000000, d: 0.000000e+00)
11:43:01  XMM6=0000000000000000 (f: 0.000000, d: 0.000000e+00)
11:43:01  XMM7=0000000000000000 (f: 0.000000, d: 0.000000e+00)
11:43:01  XMM8=0f0f0f0f0f0f0f0f (f: 252645136.000000, d: 3.815737e-236)
11:43:01  XMM9=0f0f0f0f0f0f0f0f (f: 252645136.000000, d: 3.815737e-236)
11:43:01  XMM10=0302020102010100 (f: 33620224.000000, d: 3.524484e-294)
11:43:01  XMM11=0000000000000000 (f: 0.000000, d: 0.000000e+00)
11:43:01  XMM12=0000000000000000 (f: 0.000000, d: 0.000000e+00)
11:43:01  XMM13=0000000000000000 (f: 0.000000, d: 0.000000e+00)
11:43:01  XMM14=0000000000000000 (f: 0.000000, d: 0.000000e+00)
11:43:01  XMM15=0000000000000000 (f: 0.000000, d: 0.000000e+00)
11:43:01  Module=/usr/lib/system/libsystem_kernel.dylib
11:43:01  Module_base_address=00007FF81594E000 Symbol=__pthread_kill
11:43:01  Symbol_address=00007FF815956798
11:43:01  
11:43:01  Method_being_compiled=java/lang/ClassLoader.defineClassInternal(Ljava/lang/String;[BIILjava/security/ProtectionDomain;Z)Ljava/lang/Class;
11:43:01  Target=2_90_20241107_361 (Mac OS X 14.2.1)
11:43:01  CPU=amd64 (12 logical CPUs) (0x400000000 RAM)
11:43:01  ----------- Stack Backtrace -----------
11:43:01  __pthread_kill+0xb (0x00007FF8159567A3 [libsystem_kernel.dylib+0x87a3])
11:43:01  pthread_kill+0x106 (0x00007FF81598EF30 [libsystem_pthread.dylib+0x5f30])
11:43:01  raise+0x18 (0x00007FF81586FEA8 [libsystem_c.dylib+0x41ea8])
11:43:01  _ZN2TR4trapEv+0x41 (0x0000000006A2E8D1 [libj9jit29.dylib+0x3c38d1])
11:43:01  _ZN2TRL18va_fatal_assertionEPKciS1_S1_P13__va_list_tag+0xb (0x0000000006A2EABB [libj9jit29.dylib+0x3c3abb])
11:43:01  _ZN2TR15fatal_assertionEPKciS1_S1_z+0x79 (0x0000000006A2EB39 [libj9jit29.dylib+0x3c3b39])
11:43:01  _ZN3OMR13TreeEvaluator16badILOpEvaluatorEPN2TR4NodeEPNS1_13CodeGeneratorE+0x2a (0x00000000069B97DA [libj9jit29.dylib+0x34e7da])
11:43:01  _ZN3OMR13CodeGenerator8evaluateEPN2TR4NodeE+0x44 (0x00000000069BB804 [libj9jit29.dylib+0x350804])
11:43:01  _ZN2J913CodeGenerator22doInstructionSelectionEv+0x276f (0x000000000669A5DF [libj9jit29.dylib+0x2f5df])
11:43:01  _ZN3OMR12CodeGenPhase32performInstructionSelectionPhaseEPN2TR13CodeGeneratorEPNS1_12CodeGenPhaseE+0x165 (0x00000000069C65A5 [libj9jit29.dylib+0x35b5a5])
11:43:01  _ZN3OMR12CodeGenPhase10performAllEv+0xbb (0x00000000069C7E5B [libj9jit29.dylib+0x35ce5b])
11:43:01  _ZN3OMR13CodeGenerator12generateCodeEv+0x131 (0x00000000069BFFA1 [libj9jit29.dylib+0x354fa1])
11:43:01  _ZN3OMR11Compilation7compileEv+0x748 (0x00000000069E5888 [libj9jit29.dylib+0x37a888])
11:43:01  _ZN2TR28CompilationInfoPerThreadBase7compileEP10J9VMThreadPNS_11CompilationEP17TR_ResolvedMethodR11TR_J9VMBaseP19TR_OptimizationPlanRKNS_16SegmentAllocatorE+0x7ea (0x00000000066CE69A [libj9jit29.dylib+0x6369a])
11:43:01  _ZN2TR28CompilationInfoPerThreadBase14wrappedCompileEP13J9PortLibraryPv+0x50f (0x00000000066CC03F [libj9jit29.dylib+0x6103f])
11:43:01  omrsig_protect+0x392 (0x0000000004643062 [libj9prt29.dylib+0x21062])
11:43:01  _ZN2TR28CompilationInfoPerThreadBase7compileEP10J9VMThreadP21TR_MethodToBeCompiledRN2J917J9SegmentProviderE+0x3a7 (0x00000000066C7097 [libj9jit29.dylib+0x5c097])
11:43:01  _ZN2TR24CompilationInfoPerThread12processEntryER21TR_MethodToBeCompiledRN2J917J9SegmentProviderE+0x209 (0x00000000066C6749 [libj9jit29.dylib+0x5b749])
11:43:01  _ZN2TR24CompilationInfoPerThread14processEntriesEv+0x1a8 (0x00000000066C5AB8 [libj9jit29.dylib+0x5aab8])
11:43:01  _ZN2TR24CompilationInfoPerThread3runEv+0xde (0x00000000066C587E [libj9jit29.dylib+0x5a87e])
11:43:01  _Z30protectedCompilationThreadProcP13J9PortLibraryPN2TR24CompilationInfoPerThreadE+0x90 (0x00000000066C5640 [libj9jit29.dylib+0x5a640])
11:43:01  omrsig_protect+0x392 (0x0000000004643062 [libj9prt29.dylib+0x21062])
11:43:01  _Z21compilationThreadProcPv+0x245 (0x00000000066C3A75 [libj9jit29.dylib+0x58a75])
11:43:01  thread_wrapper+0x13a (0x00000000045A66BA [libj9thr29.dylib+0xa6ba])
11:43:01  _pthread_start+0x63 (0x00007FF81598F202 [libsystem_pthread.dylib+0x6202])
11:43:01  ---------------------------------------
babsingh commented 2 weeks ago

re https://github.com/eclipse-openj9/openj9/issues/20531#issuecomment-2477345312: JDK11 xmac failures have already been fixed via https://github.com/eclipse-openj9/openj9/pull/20570, which was merged 2 days ago. The grinder uses a JDK with changes only till 7 Nov 24 and doesn't include the fix. Using a newer JDK, which includes the fix, should resolve the issue.

11:36:45  openjdk version "11.0.25-internal" 2024-10-15
11:36:45  OpenJDK Runtime Environment (build 11.0.25-internal+0-adhoc.jenkins.BuildJDK11x86-64macNightly)
11:36:45  Eclipse OpenJ9 VM (build master-26133ff75ca, JRE 11 Mac OS X amd64-64-Bit Compressed References 20241107_945 (JIT enabled, AOT enabled)
11:36:45  OpenJ9   - 26133ff75ca <--- Only contains changes till 7 Nov 24
11:36:45  OMR      - a34c903d0c8
11:36:45  JCL      - abd834e5356 based on jdk-11.0.25+9)
dmitripivkine commented 2 weeks ago

Regarding OOM case for Test5102804: There is attempt to allocate 14m object to 16m heap.

1STGCHTYPE     GC History
3STHSTTYPE     16:37:56:294294148 GMT j9mm.101 -   J9AllocateIndexableObject() returning NULL! 14665856 bytes requested for object of class 000000001293E700 from memory space 'Generational' id=0000600002FD92E0
3STHSTTYPE     16:37:56:294273490 GMT j9mm.134 -   Allocation failure end: newspace=3735552/4194304 oldspace=12239088/12582912 loa=125952/125952

This allocation has failed because neither Tenure nor Nursery can take this object. OpenJ9 currently does not support expanding Tenure over Nursery (particularly for fully expanded heap -Xmx16m -Xms16m) to fulfill such allocation. If we need this test pass the only way is limit Nursery size by -Xmn512k.

pshipton commented 2 weeks ago

@dmitripivkine I think the OOM is intentional. The test catches the OOM and checks if a Reference has been freed.

dmitripivkine commented 2 weeks ago

Ok, thanks, I missed it. Do we know which Reference it is watching?

dmitripivkine commented 2 weeks ago

Ok, thanks, I missed it. Do we know which Reference it is watching?

I probably see it: there is Weak Reference stored in O-slot with referent pointed to class object. So I guess it expects Test5102804$Loader to be unloaded.

llxia commented 1 week ago

re https://github.com/eclipse-openj9/openj9/issues/20531#issuecomment-2477258497, @annaibm amac runs are invalid. Please rerun with disabled.jdk_beans_1.

00:14:25.286  ===============================================
00:14:25.286  Running test jdk_beans_0 ...
00:14:25.286  ===============================================
00:14:25.286  jdk_beans_0 Start Time: Fri Nov  8 14:10:28 2024 Epoch Time (ms): 1731093028209
00:14:25.286  Test is disabled due to:
00:14:25.286  - https://github.com/eclipse-openj9/openj9/issues/10757
00:14:25.286  Skipped due to jvm options ( -XX:+UseCompressedOops -Xverbosegclog ) => jdk_beans_0_SKIPPED
00:14:25.286  jdk_beans_0 Finish Time: Fri Nov  8 14:10:28 2024 Epoch Time (ms): 1731093028225
dmitripivkine commented 1 week ago

Regarding OOM case for Test5102804: Test seems works with -Xalwaysclassgc, tested on xLinux and OSX X 100 iterations each.

annaibm commented 1 week ago

re https://github.com/eclipse-openj9/openj9/issues/20531#issuecomment-2479622621 rerun on amac. JDK11 amac TEST RESULT: https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/44966/testReport JDK17 amac TEST RESULT: https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/44967/testReport JDK21 amac TEST RESULT: https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/44968/testReport

llxia commented 1 week ago

@annaibm please also list the failed subtests and the common failures. The Grinder links would expire after several days.

annaibm commented 1 week ago

re https://github.com/eclipse-openj9/openj9/issues/20531#issuecomment-2491591287

**Failures**

1. `java/beans/EventHandler/Test6179222.java.Test6179222`

Execution failed: `main' threw exception: java.awt.AWTError: WindowServer is not available
java.awt.AWTError: WindowServer is not available at java.desktop/sun.lwawt.macosx.LWCToolkit.(LWCToolkit.java:167) at java.base/java.lang.Class.forNameImpl(Native Method) at java.base/java.lang.Class.forName(Class.java:347) at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:588) at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:583) at java.base/java.security.AccessController.doPrivileged(AccessController.java:691) at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:582) at java.desktop/sun.awt.CGraphicsEnvironment.(CGraphicsEnvironment.java:73) at java.base/java.lang.Class.forNameImpl(Native Method) at java.base/java.lang.Class.forName(Class.java:347) at java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:101) at java.desktop/java.awt.GraphicsEnvironment$LocalGE.(GraphicsEnvironment.java:83) at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:129) at java.desktop/javax.swing.RepaintManager.(RepaintManager.java:240) at java.desktop/javax.swing.JComponent.repaint(JComponent.java:4835) at java.desktop/java.awt.Component.repaint(Component.java:3393) at java.desktop/javax.swing.AbstractButton.setModel(AbstractButton.java:1730) at java.desktop/javax.swing.JButton.(JButton.java:128) at java.desktop/javax.swing.JButton.(JButton.java:104) at Test6179222.test(Test6179222.java:51) at Test6179222.main(Test6179222.java:42) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:572) at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) at java.base/java.lang.Thread.run(Thread.java:835)


2.`java/beans/Statement/Test4653179.java.Test4653179`

java/beans/Statement/Test4653179.java.Test4653179 (from java_beans_Statement_Test4653179.java) Execution failed: main' threw exception: java.lang.reflect.InvocationTargetException java/beans/XMLDecoder/spec/TestObject.java.TestObject (from java_beans_XMLDecoder_spec_TestObject.java) **Stacktrace** **Execution failed**:main' threw exception: java.lang.Error: unexpected exception
Standard Error java.lang.Error: unexpected exception at AbstractTest.exceptionThrown(AbstractTest.java:31) at TestObject.exceptionThrown(TestObject.java:36) at java.desktop/com.sun.beans.decoder.DocumentHandler.handleException(DocumentHandler.java:361) at java.desktop/com.sun.beans.decoder.NewElementHandler.getValueObject(NewElementHandler.java:126) at java.desktop/com.sun.beans.decoder.ElementHandler.getContextBean(ElementHandler.java:113) at java.desktop/com.sun.beans.decoder.NewElementHandler.getContextBean(NewElementHandler.java:111) at java.desktop/com.sun.beans.decoder.ObjectElementHandler.getValueObject(ObjectElementHandler.java:146) at java.desktop/com.sun.beans.decoder.NewElementHandler.getValueObject(NewElementHandler.java:123) at java.desktop/com.sun.beans.decoder.ElementHandler.endElement(ElementHandler.java:169) at java.desktop/com.sun.beans.decoder.DocumentHandler.endElement(DocumentHandler.java:320) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:610) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1718) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2883) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824) at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216) at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635) at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324) at java.desktop/com.sun.beans.decoder.DocumentHandler$1.run(DocumentHandler.java:377) at java.desktop/com.sun.beans.decoder.DocumentHandler$1.run(DocumentHandler.java:374) at java.base/java.security.AccessController.doPrivileged(AccessController.java:717) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/com.sun.beans.decoder.DocumentHandler.parse(DocumentHandler.java:374) at java.desktop/java.beans.XMLDecoder$1.run(XMLDecoder.java:201) at java.desktop/java.beans.XMLDecoder$1.run(XMLDecoder.java:199) at java.base/java.security.AccessController.doPrivileged(AccessController.java:717) at java.desktop/java.beans.XMLDecoder.parsingComplete(XMLDecoder.java:199) at java.desktop/java.beans.XMLDecoder.readObject(XMLDecoder.java:250) at TestObject.validate(TestObject.java:65) at AbstractTest.test(AbstractTest.java:54) at TestObject.main(TestObject.java:60) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:572) at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) at java.base/java.lang.Thread.run(Thread.java:835) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at java.desktop/java.beans.Statement.invokeInternal(Statement.java:307) at java.desktop/java.beans.Statement$2.run(Statement.java:187) at java.base/java.security.AccessController.doPrivileged(AccessController.java:783) at java.desktop/java.beans.Statement.invoke(Statement.java:184) at java.desktop/java.beans.Expression.getValue(Expression.java:155) at java.desktop/com.sun.beans.decoder.ObjectElementHandler.getValueObject(ObjectElementHandler.java:166) at java.desktop/com.sun.beans.decoder.NewElementHandler.getValueObject(NewElementHandler.java:123) ... 36 more

3. `java/beans/XMLDecoder/spec/TestObject.java.TestObject (from java_beans_XMLDecoder_spec_TestObject.java)`
```Stacktrace
Execution failed: `main' threw exception: java.lang.Error: unexpected exception    
Standard Error
java.lang.Error: unexpected exception
    at AbstractTest.exceptionThrown(AbstractTest.java:31)
    at TestObject.exceptionThrown(TestObject.java:36)
TEST TARGETS SUMMARY
13:17:21  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
13:17:21  FAILED test targets:
13:17:21    jdk_beans_1 - Test results: passed: 354; failed: 10; error: 2 
13:17:21        Failed test cases: 
13:17:21            TEST: java/beans/Introspector/Test8039776.java
13:17:21          TEST: java/beans/Introspector/Test8040656.java
13:17:21          TEST: java/beans/PropertyEditor/6380849/TestPropertyEditor.java
13:17:21          TEST: java/beans/PropertyEditor/TestColorClassJava.java
13:17:21          TEST: java/beans/PropertyEditor/TestColorClass.java
13:17:21          TEST: java/beans/PropertyEditor/TestColorClassNull.java
13:17:21          TEST: java/beans/PropertyEditor/TestColorClassValue.java
13:17:21          TEST: java/beans/PropertyEditor/TestFontClass.java
13:17:21          TEST: java/beans/PropertyEditor/TestFontClassJava.java
13:17:21          TEST: java/beans/PropertyEditor/TestFontClassNull.java
13:17:21          TEST: java/beans/PropertyEditor/TestFontClassValue.java
13:17:21          TEST: java/beans/XMLEncoder/java_awt_ScrollPane.java
13:17:21          

Common Failures

  1. java/beans/PropertyEditor/6380849/TestPropertyEditor.java.TestPropertyEditor
    Execution failed: `main' threw exception: java.lang.Error: expected editor is not found    

     2. java/beans/PropertyEditor/TestColorClass.java.TestColorClass,

 java/beans/PropertyEditor/TestColorClassJava.java.TestColorClassJava,

 java/beans/PropertyEditor/TestColorClassNull.java.TestColorClassNull,

 java/beans/PropertyEditor/TestColorClassValue.java.TestColorClassValue,

Execution failed: `main' threw exception: java.lang.Error: could not find editor for class java.awt.Color 

 3. java/beans/PropertyEditor/TestFontClass.java.TestFontClass,

 java/beans/PropertyEditor/TestFontClassJava.java.TestFontClassJava,   java/beans/PropertyEditor/TestFontClassNull.java.TestFontClassNull,

 java/beans/PropertyEditor/TestFontClassValue.java.TestFontClassValue,

Execution failed: `main' threw exception: java.lang.Error: could not find editor for class java.awt.Font
  1.  java/beans/XMLEncoder/java_awt_ScrollPane.java.java_awt_ScrollPane
    Execution failed: `main' threw exception: java.awt.HeadlessException: The application is not running in a desktop session, but this program performed an operation which requires it. 
llxia commented 1 week ago

re https://github.com/eclipse-openj9/openj9/issues/20531#issuecomment-2484134526, thanks @dmitripivkine .

@annaibm please add -Xalwaysclassgc in https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/27f9ff58c3f8cbede62e1cfcd05f215774823b0d/test/jdk/java/beans/Introspector/Test5102804.java#L29 and try again.

pshipton commented 6 days ago

Copied from https://github.com/ibmruntimes/openj9-openjdk-jdk11/pull/849#issuecomment-2494493424

Dmitri said:

I'm not sure this is a solution, just a temporary workaround, which we should call out in the commit description. @dmitripivkine are you still investigating why this option is needed?

Well, I have a plan to find out exact scenario. However I don't think there is something wrong with handling. This is combination class unloading - > clearing Weak Ref. OpenJ9 does not do class unloading every time. It does it for aggressive GC to prevent OOM but it is too late to process Weak Ref. If you need this test pass without pushing class unloading every single Global GC an alternative can be to have another run of aggressive Global GC. I am not sure it is necessary.

pshipton commented 6 days ago

It just seems wrong. The GC should do everything necessary to clear memory before throwing OOM. Throwing the OOM would likely stop the app from working, but if there are classes to unload or references to clear that would prevent the OOM, it seems it should be done. Also it would apparently match Hotspot behavior.