-
Notifications
You must be signed in to change notification settings - Fork 729
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
Collect binaries when the JVM crashes during a Jenkins build #16426
Collect binaries when the JVM crashes during a Jenkins build #16426
Conversation
A few questions:
|
We want to be able to diagnose the problem. Anything we can collect to help with what is relevant. I'm not against collecting the class libraries in the diagnostics. Every successful build archives the libraries and binaries. Doing the wildcards seems fine. It's not very useful when a failure occurs and we can't do anything about it.
I expect so. |
OK, in that case, I'll ignore the file types and go by directory |
Chatting with Keith, with the wildcards we should exclude some things we don't need to reduce the size. The most obvious being .o and .obj files. |
Ah, I thought the object files weren't in the directories I was suggesting, at least based on my own build directories on my laptop. It still looks that way for 11 and 17, but I see that 8 does put (some) object files within |
OK, so to check which directories contain binaries that we actually run while building, I built Java 8, 11, 17, and 19 on my laptop while logging all processes with For the Java 8 build, the only Java executable within build/ that it ran was The Java 11, 17, and 19 builds ran Java executables from
Apparently none of the builds needed to run their own In all of the builds, there were some additional executables within build/ that were run - more specifically they were within
I don't think these run JVMs, but I suppose it's possible regardless that they could crash. Do we want to try to notice crashes from these and/or include these binaries? My Finally, Java 8 also ran something called My suggestion is that for the moment I think it should suffice to pick up |
That works for me. Having a problem with the other executables isn't common, and likely if they have a problem it's easily repeatable and can be recreated manually. I suspect javac isn't used because the compiler can be run by running java. |
4d544e5
to
0d0f1b7
Compare
Updated based on my previous comment and to address review feedback |
I don't believe this revision should include any object files, even though it doesn't explicitly exclude them. We can confirm in testing |
0d0f1b7
to
65336e0
Compare
Removed some clauses that Keith suggested are not useful |
As I suggested at the beginning of the comments, I'll try to test these changes by injecting bugs causing build failures into this PR branch, and then observing the behaviour of PR builds. In preparation, I've converted this PR to a draft to ensure that we don't accidentally merge any deliberately injected bug. |
Any further comments before I start testing? |
Not from me. |
Jenkins compile xlinux jdk17 |
Jenkins compile win jdk8 |
From the x86-64 Linux Java 17 crash, I can run Testing Java 8 on Windows now |
No diagnostics were collected for the Windows Java 8 failure. It seems that the crash doesn't prevent
Then the build failed when |
I've opened ibmruntimes/openj9-openjdk-jdk8#639 for cases where |
093836f
to
2f050c0
Compare
Updated test commit to crash only once. We'll see if I also noticed that because we know the exact path to the images/ directory, we don't need |
Jenkins compile aix jdk19 |
Making sure that JDK8 is still detected properly after my most recent change. Jenkins compile xlinux jdk8 |
No luck with
|
03ec063
to
ddc464a
Compare
OK, updated my test crash-once logic to use It should still be fine to look at my previous x86-64 Mac JDK11 build. The only changes since then are in the test PR and in distinguishing JDK8 from 11+. The binaries collected in this one are good. I think the symbols ( My previous x86-64 Linux JDK8 build OTOH looks like it mysteriously got stuck. I've cancelled it and I'll launch a new one to make sure that we can still properly recognize JDK8 and collect images/j2re-image instead of jdk/. |
Jenkins compile aix jdk19 |
Jenkins compile xlinux jdk8 |
ddc464a
to
57de7bc
Compare
Jenkins compile aix jdk19 |
Jenkins compile xlinux jdk8 |
@nbhuiyan got the stack trace from the Mac crash (thanks!), and the symbols in the diagnostics tarball are good. |
The AIX build failed to generate any crash data again:
It really should generate crash data, but that's a separate issue. I think for now this PR will have to proceed without verifying that the collected binaries and debug info are sufficient on AIX 🤷 I was also going to use the AIX failure as the JDK11+ case to verify that the right branch is taken (to contrast with the JDK8 failure) after the Jenkins compile xlinux jdk11 |
OK, the |
57de7bc
to
ad5ef58
Compare
Removed the JIT crash and instead injected an error into Class.java to test specifically that it doesn't cause us to collect binaries. Jenkins compile xlinux jdk17 |
No binaries collected, as expected |
ad5ef58
to
3d03415
Compare
I think this should be good to go now |
@pshipton could you please review again? |
Binaries help in analyzing the core file to debug the crash.
3d03415
to
42ce7bf
Compare
Updated based on Keith's latest review comment |
Binaries help in analyzing the core file to debug the crash.