Archive compilation core dumps on compile failure - #7645
Conversation
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
|
One other thing : - |
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. |
|
@annaibm @mahdipub |
|
@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 |
There was a problem hiding this comment.
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/. |
There was a problem hiding this comment.
Pls use "core/javacore/jitdump/Snap" to reflect the actual names.
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
falseto 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