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.28k stars 722 forks source link

JTReg test fail : java/rmi/dgc/dgcAckFailure/DGCAckFailure.java #3347

Open ben-walsh opened 6 years ago

ben-walsh commented 6 years ago

Test https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/openj9/test/jdk/java/rmi/dgc/dgcAckFailure/DGCAckFailure.java fails with ....

test socket factory set
remote object exported; stub = DGCAckFailure_Stub[UnicastRef [liveRef: [endpoint:[9.20.66.82:40708](local),objID:[7bc7a025:16687393a1f:-7fff, -3900062484527079453]]]]
java.rmi.NoSuchObjectException: no such object in table
    at java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:283)
    at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:260)
    at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
    at DGCAckFailure_Stub.returnRemote(DGCAckFailure_Stub.java:56)
    at DGCAckFailure.main(DGCAckFailure.java:87)
    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:566)
    at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
    at java.base/java.lang.Thread.run(Thread.java:825)

Test passes against Hotspot.

There is only a single line in the source code which throws such an exception - https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/openj9/src/java.rmi/share/classes/sun/rmi/transport/Transport.java#L177

Having imported the test into Eclipse I get the same failure with "Run As - Java Application". Unfortunately, with "Debug As - Java Application" (with a suitable breakpoint set at the identified line in the Transport class) there is no such failure and the test runs through to completion and passes.

Log archive : DGCAckFailProb.tar.gz

ben-walsh commented 6 years ago

Consistently getting same failure with test java/rmi/server/UnicastRemoteObject/serialFilter/FilterUROTest.java

ben-walsh commented 6 years ago

Consistently getting same failure with test java/rmi/server/UnicastServerRef/serialFilter/FilterUSRTest.java

pdbain-ibm commented 5 years ago

Will investigate.

pdbain-ibm commented 5 years ago

Pausing this...

adam-thorpe commented 5 years ago

More debug from java/rmi/server/UnicastServerRef/serialFilter/FilterUSRTest.java Fails on all platforms JDK11+ j9:

16:04:37  STDOUT:
16:04:37  [TestNG] Running:
16:04:37    java/rmi/server/UnicastServerRef/serialFilter/FilterUSRTest.java
16:04:37  
16:04:37  test FilterUSRTest.UnicastServerRef("SimpleString", "SimpleString", 0): failure
16:04:37  java.lang.AssertionError: unexpected remote exception
16:04:37    at org.testng.Assert.fail(Assert.java:83)
16:04:37    at FilterUSRTest.UnicastServerRef(FilterUSRTest.java:96)
16:04:37    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:04:37    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:04:37    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:04:37    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
16:04:37    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
16:04:37    at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
16:04:37    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
16:04:37    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
16:04:37    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
16:04:37    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
16:04:37    at org.testng.TestRunner.privateRun(TestRunner.java:773)
16:04:37    at org.testng.TestRunner.run(TestRunner.java:623)
16:04:37    at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
16:04:37    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
16:04:37    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
16:04:37    at org.testng.SuiteRunner.run(SuiteRunner.java:259)
16:04:37    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
16:04:37    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
16:04:37    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
16:04:37    at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
16:04:37    at org.testng.TestNG.run(TestNG.java:1018)
16:04:37    at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
16:04:37    at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
16:04:37    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:04:37    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:04:37    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:04:37    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
16:04:37    at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
16:04:37    at java.base/java.lang.Thread.run(Thread.java:832)
16:04:37  Caused by: java.rmi.NoSuchObjectException: no such object in table
16:04:37    at java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:283)
16:04:37    at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:260)
16:04:37    at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
16:04:37    at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:209)
16:04:37    at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:161)
16:04:37    at $Proxy4.filterCount(Unknown Source)
16:04:37    at FilterUSRTest.UnicastServerRef(FilterUSRTest.java:86)
16:04:37    ... 29 more
16:04:37  count: 1, obj: FilterUSRTest$XX@55f1dd43//now is the time
16:04:37  test FilterUSRTest.UnicastServerRef("String", FilterUSRTest$XX@55f1dd43, 1): success
16:04:37  count: 3, obj: FilterUSRTest$XX@d2e4c8b0//[Ljava.lang.String;@96d3bceb
16:04:37  test FilterUSRTest.UnicastServerRef("String[]", FilterUSRTest$XX@d2e4c8b0, 3): success
16:04:37  count: 3, obj: FilterUSRTest$XX@ba543006//[Ljava.lang.Long;@210f4409
16:04:37  test FilterUSRTest.UnicastServerRef("Long[4]", FilterUSRTest$XX@ba543006, 3): success
16:04:37  test FilterUSRTest.UnicastServerRef("RejectME", FilterUSRTest$XX@e73e183f, -1): success
16:04:37  count: 0, obj: SimpleString
16:04:37  test FilterUSRTest.UnicastServerRef2("SimpleString", "SimpleString", 0): success
16:04:37  count: 1, obj: FilterUSRTest$XX@c11ee740//now is the time
16:04:37  test FilterUSRTest.UnicastServerRef2("String", FilterUSRTest$XX@c11ee740, 1): success
16:04:37  count: 3, obj: FilterUSRTest$XX@940b59d8//[Ljava.lang.String;@bb76af38
16:04:37  test FilterUSRTest.UnicastServerRef2("String[]", FilterUSRTest$XX@940b59d8, 3): success
16:04:37  count: 3, obj: FilterUSRTest$XX@f4d4c1fc//[Ljava.lang.Long;@7ea10443
16:04:37  test FilterUSRTest.UnicastServerRef2("Long[4]", FilterUSRTest$XX@f4d4c1fc, 3): success
16:04:37  test FilterUSRTest.UnicastServerRef2("RejectME", FilterUSRTest$XX@a72649eb, -1): success
16:04:37  
16:04:37  ===============================================
16:04:37  java/rmi/server/UnicastServerRef/serialFilter/FilterUSRTest.java
16:04:37  Total tests run: 10, Failures: 1, Skips: 0
16:04:37  ===============================================
16:04:37  
16:04:37  STDERR:
16:04:37  java.rmi.NoSuchObjectException: no such object in table
16:04:37    at java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:283)
16:04:37    at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:260)
16:04:37    at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
16:04:37    at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:209)
16:04:37    at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:161)
16:04:37    at $Proxy4.filterCount(Unknown Source)
16:04:37    at FilterUSRTest.UnicastServerRef(FilterUSRTest.java:86)
16:04:37    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:04:37    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:04:37    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:04:37    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
16:04:37    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
16:04:37    at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
16:04:37    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
16:04:37    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
16:04:37    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
16:04:37    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
16:04:37    at org.testng.TestRunner.privateRun(TestRunner.java:773)
16:04:37    at org.testng.TestRunner.run(TestRunner.java:623)
16:04:37    at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
16:04:37    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
16:04:37    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
16:04:37    at org.testng.SuiteRunner.run(SuiteRunner.java:259)
16:04:37    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
16:04:37    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
16:04:37    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
16:04:37    at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
16:04:37    at org.testng.TestNG.run(TestNG.java:1018)
16:04:37    at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
16:04:37    at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
16:04:37    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:04:37    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:04:37    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:04:37    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
16:04:37    at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
16:04:37    at java.base/java.lang.Thread.run(Thread.java:832)
16:04:37  java.lang.Exception: failures: 1
16:04:37    at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96)
16:04:37    at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
16:04:37    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:04:37    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:04:37    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:04:37    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
16:04:37    at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
16:04:37    at java.base/java.lang.Thread.run(Thread.java:832)

I believe this could be a proxy issue. The test creates a proxy class of the FilterUSRTest.RemoteImpl Class and fails when it is invoked. Furthermore, if you remove the "SimpleString" test case from the data provider, the second test case will fail. So whichever test is ran first always fails.