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

JVMTI test failures on AArch64 macOS #14390

Closed
knn-k opened this issue Jan 28, 2022 · 15 comments
Closed

JVMTI test failures on AArch64 macOS #14390

knn-k opened this issue Jan 28, 2022 · 15 comments

Comments

@knn-k
Copy link
Contributor

knn-k commented Jan 28, 2022

I see segmentation faults in cmdLineTester_jvmtitests_1 and other jvmtitests on AArch64 macOS.
Here is an example.

Testing: gaste001
Test start time: 2022/01/28 15:33:40 Japan Standard Time
Running command: "/Users/openj9/openj9-openjdk-jdk11/build/macosx-aarch64-normal-server-release/images/jdk/bin/java"  -Xjit -Xgcpolicy:gencon -Xshareclasses:name=bcienabled,enableBCI -Xnocompressedrefs  -Xdump    -Xjit:count=0 -agentlib:jvmtitest=test:gaste001 -cp "/Users/openj9/openj9-openjdk-jdk18/openj9/test/TKG/../../jvmtest/functional/cmdLineTests/jvmtitests/jvmtitest.jar" com.ibm.jvmti.tests.util.TestRunner
Time spent starting: 5 milliseconds
Time spent executing: 60339 milliseconds
Test result: FAILED
Output from test:
 [OUT] *** Testing [1/1]:       testGetAllStackTracesExtended
 [ERR] Unhandled exception
 [ERR] Type=Segmentation error vmState=0x00040000
 [ERR] J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000002
 [ERR] Handler1=00000001008EBFC0 Handler2=0000000100AB026C InaccessibleAddress=0000000000000003
 [ERR] x0=000000014E07E700 x1=0000000000000000 x2=0000000000000000 x3=000000014E082A1B
 [ERR] x4=000000016F6E1980 x5=0000000000000000 x6=000000000000006D x7=00000001009E6ADC
 [ERR] x8=0000007000000020 x9=1A5BE8F094C800CC x10=0000000000000C7D x11=0000000000000019
 [ERR] x12=000000014DE351A0 x13=000000000002CA6A x14=00000000AC0DADAE x15=000000000000B750
 [ERR] x16=000000019C042940 x17=000000020A635648 x18=000000037FF6CCE0 x19=0000000100FB5490
 [ERR] x20=00000000000062DC x21=000000EA09DA62E0 x22=000000014E813420 x23=000000000001A200
 [ERR] x24=000000014E078468 x25=0000000000000016 x26=0000000000000000 x27=000000014E07E700
 [ERR] x28=0000000000000003 x29(FP)=000000016F6E1D70 x30(LR)=0000000100F742AC x31(SP)=000000016F6E1A20
 [ERR] PC=0000000100F73FF8 SP=000000016F6E1A20
 [ERR] v0 1080000010800000 (f: 276824064.000000, d: 3.297868e-229)
 (... lines omitted ...)
 [ERR] v31 0000000000000000 (f: 0.000000, d: 0.000000e+00)
 [ERR] Module=/Users/openj9/openj9-openjdk-jdk11/build/macosx-aarch64-normal-server-release/images/jdk/lib/default/libj9jvmti29.dylib
 [ERR] Module_base_address=0000000100F68000 Symbol=jvmtiGetAllStackTracesExtended
 [ERR] Symbol_address=0000000100F73F58
 [ERR] Target=2_90_20220128_000000 (Mac OS X 11.6.2)
 [ERR] CPU=aarch64 (8 logical CPUs) (0x400000000 RAM)

Other segmentation faults include:

  • Symbol=jvmtiGetHeapFreeMemory in ghftm001
  • Symbol=jvmtiGetMethodAndClassNames in gmcpn001
  • Symbol=jvmtiGetJ9method in gj9m001

Summary output from cmdLineTester_jvmtitests_1:

---TEST RESULTS---
Number of PASSED tests: 44 out of 60
Number of FAILED tests: 16 out of 60
@knn-k
Copy link
Contributor Author

knn-k commented Jan 28, 2022

stack_info_ptr is broken (x28=0000000000000003) in the gaste001 case above.

@knn-k
Copy link
Contributor Author

knn-k commented Feb 22, 2022

I resolved ABI problems around JNI on AArch64 macOS, but I still see these failures with JVMTI tests.

@knn-k
Copy link
Contributor Author

knn-k commented Feb 24, 2022

There is a JVMTI-related failure in testSCCacheManagement_0: testSharedCacheJvmtiAPI. I am going to disable it.
https://openj9-jenkins.osuosl.org/job/Test_openjdk18_j9_extended.functional_aarch64_mac_Release/1/

1) testSharedCacheJvmtiAPI(tests.sharedclasses.options.junit.TestOptionsDefault)tests.sharedclasses.TestFailedException: iterateSharedCacheFunction failed with dir null
	at tests.sharedclasses.TestUtils.fail(TestUtils.java:598)
	at tests.sharedclasses.options.TestSharedCacheJvmtiAPI.main(TestSharedCacheJvmtiAPI.java:63)
	at tests.sharedclasses.options.junit.TestOptionsBase.testSharedCacheJvmtiAPI(TestOptionsBase.java:119)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)

@knn-k
Copy link
Contributor Author

knn-k commented Feb 24, 2022

DefaultLocGrpAccessJVMTI in SharedClassesAPI_0 is also a JVMTI-related failure.
https://openj9-jenkins.osuosl.org/job/Test_openjdk18_j9_extended.system_aarch64_mac_Release/1/

STF 12:10:17.345 - Monitoring Report Summary:
STF 12:10:17.345 -   o Process JVMT ended with the expected exit code (0)
**FAILED** at step 65 (Verify Classes Caches using JVMTI). Expected return value=0 Actual=1 at /Users/jenkins/workspace/Test_openjdk18_j9_extended.system_aarch64_mac_Release_testList_0/aqa-tests/TKG/../TKG/output_16456637617157/SharedClassesAPI_0/20220224-120946-SharedClassesAPI/execute.pl line 2200.
STF 12:10:17.533 - **FAILED** execute script failed. Expected return value=0 Actual=1

@knn-k
Copy link
Contributor Author

knn-k commented Feb 24, 2022

I opened #14591 for excluding testSCCacheManagement_0.

@knn-k
Copy link
Contributor Author

knn-k commented Feb 24, 2022

I opened adoptium/aqa-tests#3376 for excluding SharedClassesAPI_0.

@knn-k
Copy link
Contributor Author

knn-k commented Feb 25, 2022

I opened adoptium/openj9-systemtest#141 that supersedes adoptium/aqa-tests#3376 .

@knn-k
Copy link
Contributor Author

knn-k commented Feb 28, 2022

I reproduced the failure with SharedClassesAPI_0 locally.

JVMT Mon Feb 28 11:58:00 2022
JVMT Querying all caches in directory (null)
JVMT Mon Feb 28 11:58:00 2022
JVMT iterateSharedCacheFunction: invalid flags field test failed
JVMT
JVMT Mon Feb 28 11:58:00 2022
JVMT Iterating over caches: ERROR

iterateSharedCacheFunction() returns JVMTI_ERROR_UNSUPPORTED_VERSION (68) instead of JVMTI_ERROR_ILLEGAL_ARGUMENT (103) here:
https://github.com/eclipse-openj9/openj9-systemtest/blob/1338a44e1ca12ebfbfa32855bad674957081dc77/openj9.test.sharedClasses.jvmti/src/native/sharedClasses.c#L363-L369

@knn-k
Copy link
Contributor Author

knn-k commented Feb 28, 2022

I opened Issue #14609. It explains why many JVMTI tests fail on AArch64 macOS.

@knn-k
Copy link
Contributor Author

knn-k commented Mar 1, 2022

The failures with cmdLineTester_jvmtitests_1 are also caused by #14609.

@knn-k
Copy link
Contributor Author

knn-k commented Mar 1, 2022

I can pass testSCCacheManagement_0 with my change for #14609, too.

@knn-k
Copy link
Contributor Author

knn-k commented Mar 7, 2022

PR #14622 resolved the failures related to JVMTI extension functions in the master branch. Functional tests are enabled back again.
SharedClassesAPI_0 is not enabled yet.

@knn-k
Copy link
Contributor Author

knn-k commented Mar 10, 2022

I am going to open a PR for re-enabling JVMTI tests in SharedClassesAPI_0 after the release of v0.31.0.
I keep this issue open until then.

@knn-k
Copy link
Contributor Author

knn-k commented May 9, 2022

JVMTI tests in SharedClassesAPI_0 have been enabled again.
See https://openj9-jenkins.osuosl.org/job/Test_openjdk18_j9_extended.system_aarch64_mac_Nightly/50/tapResults/

Closing this issue now.

@knn-k knn-k closed this as completed May 9, 2022
@babsingh
Copy link
Contributor

Removing the test excluded label since the tests have been re-enabled.

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

No branches or pull requests

3 participants