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

Enabled AOT cache at server by default #19584

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

cjjdespres
Copy link
Contributor

This change makes the option -XX:+JITServerUseAOTCache unnecessary at the server; note that clients are still required to set that option to opt-in to the use of the AOT cache. The -XX:-JITServerUseAOTCache option may still be used at the server to disable the AOT cache as before.

This change also has the effect of making ROM class sharing at the server the default.

@cjjdespres cjjdespres requested a review from dsouzai as a code owner May 30, 2024 20:14
@cjjdespres
Copy link
Contributor Author

Attn @mpirvu

Copy link
Contributor

@mpirvu mpirvu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mpirvu mpirvu self-assigned this May 30, 2024
@mpirvu mpirvu added the comp:jitserver Artifacts related to JIT-as-a-Service project label May 30, 2024
@mpirvu
Copy link
Contributor

mpirvu commented May 30, 2024

jenkins test sanity xlinuxjit,zlinuxjit jdk21

@mpirvu
Copy link
Contributor

mpirvu commented May 31, 2024

zlinux had a timeout on

cmdLineTester_jvmtitests_1 Start Time: Thu May 30 22:01:32 2024 Epoch Time (ms): 1717117292202
21:01:32  variation: Mode148
21:01:32  JVM_OPTIONS: -XX:+UseJITServer -Xjit -Xgcpolicy:gencon -Xshareclasses:name=bcienabled,enableBCI -Xnocompressedrefs 

Testing: gaste001
21:01:38  Test start time: 2024/05/30 22:01:38 Atlantic Standard Time
21:01:38  Running command: "/home/jenkins/workspace/Test_openjdk21_j9_sanity.functional_x86-64_linux_jit_Personal_testList_0/jdkbinary/j2sdk-image/bin/java" -XX:+UseJITServer -Xjit -Xgcpolicy:gencon -Xshareclasses:name=bcienabled,enableBCI -Xnocompressedrefs  -Xdump    -Xjit:count=0 -agentlib:jvmtitest=test:gaste001 -cp "/home/jenkins/workspace/Test_openjdk21_j9_sanity.functional_x86-64_linux_jit_Personal_testList_0/aqa-tests/TKG/../../jvmtest/functional/cmdLineTests/jvmtitests/jvmtitest.jar" com.ibm.jvmti.tests.util.TestRunner
21:01:38  Time spent starting: 7 milliseconds
21:05:49  ***[TEST INFO 2024/05/30 22:05:38] ProcessKiller detected a timeout after 240000 milliseconds!***

Given that this is noCompressedrefs the JITServer should not have compiled anything.

There is also:

Running test testJitserverArguments_0 ...
20:35:49  Testing: Test SSL success condition
20:35:49  Test start time: 2024/05/30 21:35:49 Atlantic Standard Time
20:35:49  Running command: bash /home/jenkins/workspace/Test_openjdk21_j9_sanity.functional_x86-64_linux_jit_Personal_testList_1/aqa-tests/TKG/../../jvmtest/functional/cmdLineTests/jitserver/jitserverScript.sh /home/jenkins/workspace/Test_openjdk21_j9_sanity.functional_x86-64_linux_jit_Personal_testList_1/aqa-tests/TKG/../../jvmtest/functional/cmdLineTests/jitserver /home/jenkins/workspace/Test_openjdk21_j9_sanity.functional_x86-64_linux_jit_Personal_testList_1/jdkbinary/j2sdk-image/bin "-Xjit" "-XX:+UseJITServer -Xjit:count=0,verbose={JITServer},verbose={JITServerConns},verbose={compilePerformance} -XX:-JITServerLocalSyncCompiles -XX:JITServerSSLRootCerts=cert.pem" false false
20:35:49  Time spent starting: 5 milliseconds
20:35:56  Time spent executing: 6044 milliseconds
20:35:56  Test result: FAILED
....
Required condition was not found: [Output match: JITServer Client Mode.]

@cjjdespres
Copy link
Contributor Author

It looks like there were quite a lot of segfaults on Z:

        Unhandled exception
        Type=Segmentation error vmState=0x00040000
        J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000001
        Handler1=000003FFA344A360 Handler2=000003FFA3331A60 InaccessibleAddress=0000000000000000
        gpr0=0000000000000000 gpr1=0000000000000000 gpr2=FFFFFFFF04E81260 gpr3=000000000000001F
        gpr4=0000000000000030 gpr5=0000000000000000 gpr6=000003FFA317D958 gpr7=000003FEA8008700
        gpr8=000003FF9C0286A0 gpr9=000003FF9C0DC1F0 gpr10=000003FEA8008F70 gpr11=0000000000000001
        gpr12=000003FFA2481000 gpr13=000003FFA21EE448 gpr14=000003FFA172CE28 gpr15=000003FFA317D608
        psw=000003FFA17EB4B0 mask=0705100180000000 fpc=00080000 bea=000003FFA41133B6
        fpr0=000003ff9c7dc600 (f: 2625488384.000000, d: 2.172099e-311)
        fpr1=48e127c0a317bdc0 (f: 2736242176.000000, d: 1.195549e+43)
        fpr2=000003ffa317dcc0 (f: 2736250112.000000, d: 2.172154e-311)
        fpr3=3f336e21dbeabbfe (f: 3689593856.000000, d: 2.964814e-04)
        fpr4=0000000100000018 (f: 24.000000, d: 2.121996e-314)
        fpr5=0000000000000000 (f: 0.000000, d: 0.000000e+00)
        fpr6=0000000000000014 (f: 20.000000, d: 9.881313e-323)
        fpr7=0000000000000000 (f: 0.000000, d: 0.000000e+00)
        fpr8=0000000000000000 (f: 0.000000, d: 0.000000e+00)
        fpr9=000002aa05512850 (f: 89204816.000000, d: 1.447245e-311)
        fpr10=000003ffa313f000 (f: 2735992832.000000, d: 2.172153e-311)
        fpr11=000003ffeb977e90 (f: 3952574208.000000, d: 2.172755e-311)
        fpr12=000619b56f8b31bd (f: 1871393152.000000, d: 8.483685e-309)
        fpr13=000002aa04aa2938 (f: 78260536.000000, d: 1.447240e-311)
        fpr14=000003ffc3d75684 (f: 3285669632.000000, d: 2.172425e-311)
        fpr15=0000000000000000 (f: 0.000000, d: 0.000000e+00)
        Module=/home/jenkins/workspace/Test_openjdk21_j9_sanity.functional_s390x_linux_jit_Personal_testList_0/jdkbinary/j2sdk-image/lib/default/libj9jit29.so
        Module_base_address=000003FFA1580000
        Target=2_90_20240530_11 (Linux 5.4.0-181-generic)
        CPU=s390x (4 logical CPUs) (0x1f58f2000 RAM)
        ----------- Stack Backtrace -----------
        _ZN2J914PersistentInfo20getPersistentCHTableEv+0x80 (0x000003FFA17EB4B0 [libj9jit29.so+0x26b4b0])
        jitClassesRedefined+0xb68 (0x000003FFA172CE28 [libj9jit29.so+0x1ace28])
        jitClassRedefineEvent+0x38 (0x000003FFA1045E90 [libj9jvmti29.so+0x45e90])
        redefineClassesCommon.constprop.0+0xa9a (0x000003FFA1009A52 [libj9jvmti29.so+0x9a52])
        jvmtiRedefineClasses+0x17c (0x000003FFA100C634 [libj9jvmti29.so+0xc634])
        Java_com_ibm_jvmti_tests_redefineClasses_rc001_redefineClass+0xa0 (0x000003FF0209D860 [libjvmtitest.so+0x1d860])
        ffi_call_SYSV+0x98 (0x000003FFA36A08C0 [libj9vm29.so+0x2a08c0])
        ffi_call+0xa2 (0x000003FFA36A02D2 [libj9vm29.so+0x2a02d2])
        _ZN31VM_DebugBytecodeInterpreterFull3runEP10J9VMThread+0x279f8 (0x000003FFA35850C8 [libj9vm29.so+0x1850c8])
        debugBytecodeLoopFull+0xf2 (0x000003FFA355D6C2 [libj9vm29.so+0x15d6c2])
        c_cInterpreter+0x64 (0x000003FFA3618FFC [libj9vm29.so+0x218ffc])

        SharedCPEntryInvokerTests_0_FAILED

and

        Type=Segmentation error vmState=0x00000000
        J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000001
        Handler1=000003FF9E5CA360 Handler2=000003FF9E4B1A60 InaccessibleAddress=0000000000000000
        gpr0=0000000000000000 gpr1=000003FF7AF7D900 gpr2=0000000000000000 gpr3=0000000000000050
        gpr4=000003FF9C91015A gpr5=0000000000000000 gpr6=000003FF9C892E60 gpr7=000003FF9F2ECB2F
        gpr8=0000000000000050 gpr9=0000000000000050 gpr10=0000000000000000 gpr11=0000000000000000
        gpr12=000003FF9D601000 gpr13=000003FF9D378158 gpr14=000003FF9C910188 gpr15=000003FF7AF7C208
        psw=000003FF9CCC5B96 mask=0705100180000000 fpc=00080000 bea=000003FF9C910182
        fpr0=0000000000000001 (f: 1.000000, d: 4.940656e-324)
        fpr1=000003ff9d36a0c8 (f: 2637603072.000000, d: 2.172105e-311)
        fpr2=000003ff9801f2b4 (f: 2550264576.000000, d: 2.172062e-311)
        fpr3=0000000000000002 (f: 2.000000, d: 9.881313e-324)
        fpr4=000003ff9f2ec3c8 (f: 2670642176.000000, d: 2.172121e-311)
        fpr5=000003ff9f2ec160 (f: 2670641408.000000, d: 2.172121e-311)
        fpr6=000003ff9f2eca90 (f: 2670643968.000000, d: 2.172121e-311)
        fpr7=00000000000000ff (f: 255.000000, d: 1.259867e-321)
        fpr8=0000000000101000 (f: 1052672.000000, d: 5.200891e-318)
        fpr9=000002aa2fb1c3c0 (f: 800179136.000000, d: 1.447596e-311)
        fpr10=000003ff7ae7d000 (f: 2062012416.000000, d: 2.171820e-311)
        fpr11=000003ffffc78020 (f: 4291264512.000000, d: 2.172922e-311)
        fpr12=000619b573246eb0 (f: 1931767424.000000, d: 8.483685e-309)
        fpr13=000002aa2e822938 (f: 780282176.000000, d: 1.447587e-311)
        fpr14=000003ffef3f5b24 (f: 4013906688.000000, d: 2.172785e-311)
        fpr15=0000000000000000 (f: 0.000000, d: 0.000000e+00)
        Module=/home/jenkins/workspace/Test_openjdk21_j9_sanity.functional_s390x_linux_jit_Personal_testList_0/jdkbinary/j2sdk-image/lib/default/libj9jit29.so
        Module_base_address=000003FF9C700000
        Target=2_90_20240530_11 (Linux 5.4.0-181-generic)
        CPU=s390x (4 logical CPUs) (0x1f58f2000 RAM)
        ----------- Stack Backtrace -----------
        _ZN9JITServer19CommunicationStream11readMessageERNS_7MessageE+0x2e (0x000003FF9CCC5B96 [libj9jit29.so+0x5c5b96])
        _ZN2TR30CompilationInfoPerThreadRemote12processEntryER21TR_MethodToBeCompiledRN2J917J9SegmentProviderE+0x110 (0x000003FF9C910188 [libj9jit29.so+0x210188])
        _ZN2TR24CompilationInfoPerThread14processEntriesEv+0x3ee (0x000003FF9C892956 [libj9jit29.so+0x192956])
        _ZN2TR24CompilationInfoPerThread3runEv+0xac (0x000003FF9C892E5C [libj9jit29.so+0x192e5c])
        _Z30protectedCompilationThreadProcP13J9PortLibraryPN2TR24CompilationInfoPerThreadE+0x94 (0x000003FF9C892EF4 [libj9jit29.so+0x192ef4])
        omrsig_protect+0x3d8 (0x000003FF9E4B2BB0 [libj9prt29.so+0x32bb0])
        _Z21compilationThreadProcPv+0x196 (0x000003FF9C893336 [libj9jit29.so+0x193336])
        thread_wrapper+0xf6 (0x000003FF9E408A46 [libj9thr29.so+0x8a46])
        start_thread+0xd6 (0x000003FF9F087E66 [libpthread.so.0+0x7e66])
         (0x000003FF9EEFCD46 [libc.so.6+0xfcd46])
         (0x0000000000000000 [<unknown>+0x0])

        UnsafeTests_2_FAILED

are examples.

@mpirvu
Copy link
Contributor

mpirvu commented May 31, 2024

Let's see how JDK17 behaves:

jenkins test sanity xlinuxjit,zlinuxjit jdk17

@cjjdespres cjjdespres force-pushed the server-aot-cache-default branch 2 times, most recently from 55ddb1d to 5a11342 Compare June 3, 2024 18:12
@cjjdespres
Copy link
Contributor Author

The issue is that I wrote J9::PersistentInfo::_remoteCompilationMode = JITServer::SERVER in a condition - note the single = instead of ==. I've pushed a fix for that, so the tests can be re-run now.

There was apparently also some trailing whitespace elsewhere in that file that needed to be removed.

@cjjdespres
Copy link
Contributor Author

Wait, that whitespace might have been introduced by me accidentally. I'll fix that.

This change makes the option -XX:+JITServerUseAOTCache unnecessary at
the server; note that clients are still required to set that option to
opt-in to the use of the AOT cache. The -XX:-JITServerUseAOTCache option
may still be used at the server to disable the AOT cache as before.

This change also has the effect of making ROM class sharing at the
server the default.

Signed-off-by: Christian Despres <[email protected]>
@cjjdespres
Copy link
Contributor Author

That should be correct.

@mpirvu
Copy link
Contributor

mpirvu commented Jun 3, 2024

jenkins test sanity xlinuxjit,zlinuxjit jdk21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jitserver Artifacts related to JIT-as-a-Service project
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants