Skip to content

Archive compilation core dumps on compile failure - #7645

Open
mahdipub wants to merge 1 commit into
adoptium:masterfrom
mahdipub:fix/archive-compilation-coredumps
Open

Archive compilation core dumps on compile failure#7645
mahdipub wants to merge 1 commit into
adoptium:masterfrom
mahdipub:fix/archive-compilation-coredumps

Conversation

@mahdipub

Copy link
Copy Markdown
Contributor

When a JVM crash occurs during test compilation (e.g. an AOT relocation crash as seen in eclipse-openj9/openj9#24627), moveDmp.pl moves dump files to output_compilation/ then calls false to abort make. This causes the Jenkins shell step in makeCompileTest() to throw before env.jobStatus is updated from its initial SUCCESS value, so the FAILURE branch in post() is never reached and the dumps are wiped by cleanWs.

Wrap the compile sh step in a try/catch: archive *.dmp and *.trc from output_compilation/ in the catch block, then re-throw so the build still fails as expected.

Fixes: eclipse-openj9/openj9#24627

Signed-off-by: mahdi@ibm.com

When a JVM crash occurs during test compilation (e.g. an AOT relocation
crash as seen in eclipse-openj9/openj9#24627), moveDmp.pl moves dump
files to output_compilation/ then calls `false` to abort make. This
causes the Jenkins shell step in makeCompileTest() to throw before
env.jobStatus is updated from its initial SUCCESS value, so the FAILURE
branch in post() is never reached and the dumps are wiped by cleanWs.

Wrap the compile sh step in a try/catch: archive *.dmp and *.trc from
output_compilation/ in the catch block, then re-throw so the build
still fails as expected.

Fixes: eclipse-openj9/openj9#24627

Signed-off-by: mahdi@ibm.com

@annaibm annaibm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@annaibm

annaibm commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

One other thing : -
Since this crash is intermittent (needed 50 grinder iterations to reproduce), have you run the patched Jenkinsfile against a repro — either Kavin's grinder job or a forced failure — and confirmed the .dmp/.trc files actually show up as archived artifacts on the build page, not just that the build failed as expected?

@mahdipub

Copy link
Copy Markdown
Contributor Author

One other thing : - Since this crash is intermittent (needed 50 grinder iterations to reproduce), have you run the patched Jenkinsfile against a repro — either Kavin's grinder job or a forced failure — and confirmed the .dmp/.trc files actually show up as archived artifacts on the build page, not just that the build failed as expected?

No I didn't. But I will ask in issue to see if they can test it on my fork and force a failure to prove it work.

@KavinSatheeskumar

Copy link
Copy Markdown

@annaibm @mahdipub
Here is that test you wanted
https://openj9-jenkins.osuosl.org/job/Grinder/5388/

@annaibm

annaibm commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@pshipton Kindly review

// moveDmp.pl exits `false` after moving core/JIT/snap dumps to output_compilation/.
// At this point env.jobStatus is still SUCCESS so the FAILURE branch in post() is
// never reached, and cleanWs would wipe the dumps. Archive them here before re-throwing.
archiveArtifacts artifacts: "aqa-tests/TKG/output_compilation/**/*.dmp,aqa-tests/TKG/output_compilation/**/*.trc", allowEmptyArchive: true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should capture the javacore file as well, javacore*.txt.

sh "$makeTestCmd";
}
} catch (e) {
// moveDmp.pl exits `false` after moving core/JIT/snap dumps to output_compilation/.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Pls use "core/javacore/jitdump/Snap" to reflect the actual names.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

x86 macOS JDK8 AOT relocation crash building tests

4 participants