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

Avoid compilation interruptions when generating jitdump #9522

Closed
fjeremic opened this issue May 11, 2020 · 0 comments · Fixed by #11825
Closed

Avoid compilation interruptions when generating jitdump #9522

fjeremic opened this issue May 11, 2020 · 0 comments · Fixed by #11825
Labels

Comments

@fjeremic
Copy link
Contributor

The following command will force a crash to happen during compilation which will produce a jitdump:

bin/java -Xjit:'{openj9/internal/tools/attach/target/FileLock.unlockFileImpl(J)I}(crashDuringCompile)' -version

You may have to run the command a few times to see the crash because we are not guaranteed to trigger a compilation, but we almost always do. The unfortunate thing that happens in the above scenario is that this method compilation gets triggered so late into the JVM lifespan that the JVM will want to shut down before the jitdump compilation ever completes. This results in a truncated jitdump which typically looks like this:

<?xml version="1.0" standalone="no"?>
<jitDump>
#INFO: Crashed in compilation thread 000003FD78002400.
<currentIL>

        +------------- Byte Code Index
        |  +-------------------- OpCode
        |  |                        +------------- First Field
        |  |                        |     +------------- Branch Target
        |  |                        |     |      +------- Const Pool Index
        |  |                        |     |      |    +------------- Constant
        |  |                        |     |      |    |
        V  V                        V     V      V    V

        0, JBaconstnull
        1, JBiconst3
        2, JBiconst5


This method is cold
<trees
    title="Trees"
    method="openj9/internal/tools/attach/target/FileLock.unlockFileImpl(J)I"
    hotness="cold">

Trees: for openj9/internal/tools/attach/target/FileLock.unlockFileImpl(J)I

------------------------------------------------------------------------------------------------------------------------------------------------------------------------
n1n       BBStart <block_2> (freq 10000)                                                      [     0x3fd7dc5c3e0] bci=[-1,0,-] rc=0 vc=0 vn=- li=- udi=- nc=0
n5n       treetop                                                                             [     0x3fd7dc5c520] bci=[-1,0,-] rc=0 vc=0 vn=- li=- udi=- nc=1
n6n
=== EXCEPTION THROWN (JIT Shutdown) ===

We want to avoid such compilation interruptions from the VM and try to complete the jitdump compilation so we can get the diagnostic data we need to investigate the issue. This means we must alter the interruption logic and bypass it for jitdump compilations.

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

Successfully merging a pull request may close this issue.

1 participant