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

StackWalkerTest testGetCallerClass caller class wrong #18961

Closed
pshipton opened this issue Feb 15, 2024 · 6 comments · Fixed by #18967
Closed

StackWalkerTest testGetCallerClass caller class wrong #18961

pshipton opened this issue Feb 15, 2024 · 6 comments · Fixed by #18967

Comments

@pshipton
Copy link
Member

https://openj9-jenkins.osuosl.org/job/Pipeline-Build-Test-JDK11/742/ - all tested platforms

https://openj9-jenkins.osuosl.org/job/Test_openjdk11_j9_extended.functional_aarch64_linux_Nightly_testList_0/604
StackWalkerTest_1 -Xjit:count=0

23:24:51  FAILED: testGetCallerClass
23:24:51  java.lang.AssertionError: caller class wrong expected [class org.openj9.test.stackWalker.StackWalkerTest] but found [class java.lang.StackWalker]
23:24:51  	at org.testng.Assert.fail(Assert.java:96)
23:24:51  	at org.testng.Assert.failNotEquals(Assert.java:776)
23:24:51  	at org.testng.Assert.assertEqualsImpl(Assert.java:137)
23:24:51  	at org.testng.Assert.assertEquals(Assert.java:118)
23:24:51  	at org.openj9.test.stackWalker.StackWalkerTest.testGetCallerClass(StackWalkerTest.java:92)

Changes from previous build
1690101...70b540e
eclipse-openj9/openj9-omr@3f8a0e7...0966eb3

Tested by reverting #18926 to confirm this is the cause.
Failure on nightly build https://openj9-jenkins.osuosl.org/view/Test/job/Grinder/3308/
Passing with 18926 reverted https://openj9-jenkins.osuosl.org/view/Test/job/Grinder/3309/

I'm going to revert the change.

@keithc-ca @fengxue-IS

@pshipton
Copy link
Member Author

pshipton commented Feb 15, 2024

There are many failures in sanity.openjdk which are likely caused by the same change.
I ran the first set of failures with the change reverted and they passed.

tools/pack200/Pack200Props.java.Pack200Props
tools/pack200/Pack200Props.java.Pack200Props
tools/pack200/T7007157.java.T7007157
tools/pack200/T7007157.java.T7007157
java/lang/StackWalker/AcrossThreads.java.AcrossThreads
java/lang/StackWalker/GetCallerClassTest.java.GetCallerClassTest
java/lang/StackWalker/HiddenFrames.java.HiddenFrames
java/lang/StackWalker/NativeMethod.java.NativeMethod
java/lang/StackWalker/StackWalkTest.java.StackWalkTest
java/lang/StackWalker/TestBCI.java.TestBCI
java/lang/StackWalker/WalkFunction.java.WalkFunction
java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.java.BootstrapLoggerTest
java/lang/System/LoggerFinder/internal/SimpleConsoleLoggerTest/SimpleConsoleLoggerTest.java.SimpleConsoleLoggerTest
java/lang/System/LoggerFinder/internal/api/LoggerFinderAPITest.java.LoggerFinderAPITest

java/lang/StackWalker/AcrossThreads.java.AcrossThreads
java/lang/StackWalker/GetCallerClassTest.java.GetCallerClassTest
java/lang/StackWalker/HiddenFrames.java.HiddenFrames
java/lang/StackWalker/NativeMethod.java.NativeMethod
java/lang/StackWalker/StackWalkTest.java.StackWalkTest
java/lang/StackWalker/TestBCI.java.TestBCI
java/lang/StackWalker/WalkFunction.java.WalkFunction
java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.java.BootstrapLoggerTest
java/lang/System/LoggerFinder/internal/SimpleConsoleLoggerTest/SimpleConsoleLoggerTest.java.SimpleConsoleLoggerTest
java/lang/System/LoggerFinder/internal/api/LoggerFinderAPITest.java.LoggerFinderAPITest
java/util/logging/FileHandlerLongLimit.java.FileHandlerLongLimit
java/util/logging/HigherResolutionTimeStamps/LogRecordWithNanos.java.LogRecordWithNanos
java/util/logging/HigherResolutionTimeStamps/LogRecordWithNanosAPI.java.LogRecordWithNanosAPI
java/util/logging/LogManager/Configuration/ParentLoggerWithHandlerGC.java.ParentLoggerWithHandlerGC
java/util/logging/LogManager/Configuration/rootLoggerHandlers/BadRootLoggerHandlers.java.BadRootLoggerHandlers
java/util/logging/LogManager/Configuration/rootLoggerHandlers/RootLoggerHandlers.java.RootLoggerHandlers
java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexResetUpdate.java.HandlersOnComplexResetUpdate
java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexUpdate.java.HandlersOnComplexUpdate
java/util/logging/LogManager/Configuration/updateConfiguration/UpdateConfigurationTest.java.UpdateConfigurationTest
java/util/logging/Logger/getGlobal/TestGetGlobal.java.TestGetGlobal
java/util/logging/Logger/getGlobal/TestGetGlobalByName.java.TestGetGlobalByName
java/util/logging/Logger/getGlobal/TestGetGlobalConcurrent.java.TestGetGlobalConcurrent
java/util/logging/Logger/setResourceBundle/TestSetResourceBundle.java.TestSetResourceBundle
java/util/logging/LoggerSubclass.java.LoggerSubclass
java/util/logging/TestMainAppContext.java.TestMainAppContext

java/util/logging/FileHandlerLongLimit.java.FileHandlerLongLimit
java/util/logging/HigherResolutionTimeStamps/LogRecordWithNanos.java.LogRecordWithNanos
java/util/logging/HigherResolutionTimeStamps/LogRecordWithNanosAPI.java.LogRecordWithNanosAPI
java/util/logging/LogManager/Configuration/ParentLoggerWithHandlerGC.java.ParentLoggerWithHandlerGC
java/util/logging/LogManager/Configuration/rootLoggerHandlers/BadRootLoggerHandlers.java.BadRootLoggerHandlers
java/util/logging/LogManager/Configuration/rootLoggerHandlers/RootLoggerHandlers.java.RootLoggerHandlers
java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexResetUpdate.java.HandlersOnComplexResetUpdate
java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexUpdate.java.HandlersOnComplexUpdate
java/util/logging/LogManager/Configuration/updateConfiguration/UpdateConfigurationTest.java.UpdateConfigurationTest
java/util/logging/Logger/getGlobal/TestGetGlobal.java.TestGetGlobal
java/util/logging/Logger/getGlobal/TestGetGlobalByName.java.TestGetGlobalByName
java/util/logging/Logger/getGlobal/TestGetGlobalConcurrent.java.TestGetGlobalConcurrent
java/util/logging/Logger/setResourceBundle/TestSetResourceBundle.java.TestSetResourceBundle
java/util/logging/LoggerSubclass.java.LoggerSubclass
java/util/logging/TestMainAppContext.java.TestMainAppContext

@pshipton
Copy link
Member Author

pshipton commented Feb 15, 2024

SC_Softmx_JitAot also passed with the change reverted so this extended.system test failure appears to also have the same cause.
SC_Softmx_JitAot_0
SC_Softmx_JitAot_1
SC_Softmx_JitAot_Linux_0
SC_Softmx_JitAot_Linux_1

@pshipton
Copy link
Member Author

In jdk17+, StackWalkerTest hangs.

Also spotted these related failures, some of there where the GEN process times out. This could affect other system tests.

DaaLoadTest_all_CS_5m_0
MiniMix_5m_0
TestIBMJlmLocal_0
SharedClasses.SCM23.SingleCL_1

MathLoadTest_bigdecimal_CS_5m_0
CpMpModJar_1
CpMpModJar2_1
AutoMod1_1
TestJlmRemoteClassNoAuth_1
DaaLoadTest_daa2_5m_0
MauveMultiThrdLoad_5m_1

SharedClassesAPI_0
SharedClassesAPI_1

@pshipton
Copy link
Member Author

Not sure if this is related, probably.

https://openj9-jenkins.osuosl.org/job/Test_openjdk21_j9_sanity.system_ppc64le_linux_Nightly_testList_2/153
PatModImg_Unex_0

19:46:07  OT3 1) testOverrideUsingAppModuleAndNewPackage(net.adoptopenjdk.test.modularity.junit.TestOverrideUsingAppModuleAndNewPackage)
19:46:07  OT3 java.lang.IllegalAccessException: class net.adoptopenjdk.test.modularity.junit.TestOverrideUsingAppModuleAndNewPackage (in module com.test) cannot access class adoptopenjdk.test.modularity.hellonew.HelloNew (in module com.hello) because module com.hello does not export adoptopenjdk.test.modularity.hellonew to module com.test
19:46:07  OT3 	at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:394)
19:46:07  OT3 	at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:714)
19:46:07  OT3 	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:495)
19:46:07  OT3 	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
19:46:07  OT3 	at com.test/net.adoptopenjdk.test.modularity.junit.TestOverrideUsingAppModuleAndNewPackage.testOverrideUsingAppModuleAndNewPackage(TestOverrideUsingAppModuleAndNewPackage.java:31

@fengxue-IS
Copy link
Contributor

Looks like the failure occurred in StackWalkerTest_1 -Xjit:count=0 is a conflicting use of vmThread->stackWalkState updated in #18926, I will rework the solution to avoid this issue.

@pshipton
Copy link
Member Author

Since the change was reverted I'll close this.

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

Successfully merging a pull request may close this issue.

2 participants