You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #16426 I have been testing some changes to build.groovy that detect when the VM has crashed during the build and collect the relevant binaries into the diagnostics tarball. To test it, I introduced a commit that intentionally fails an assertion in the JIT compiler as soon as it tries to generate IL for any method. Here's my most recent revision of that commit:
commit 57de7bcf28b817ca2c4444f338e3f8292938c947
Author: Devin Papineau <devin@ajdmp.ca>
Date: Mon Dec 12 15:15:40 2022 -0500
X intentionally crash the JVM in every compilation
In particular, it should crash during builds in Jenkins.
diff --git runtime/compiler/ilgen/Walker.cpp runtime/compiler/ilgen/Walker.cpp
index d56238f8b..485ef9764 100644
--- runtime/compiler/ilgen/Walker.cpp+++ runtime/compiler/ilgen/Walker.cpp@@ -50,6 +50,8 @@
#include "infra/Bit.hpp" //for trailingZeroes
#include "env/JSR292Methods.h"
+#include "AtomicSupport.hpp"+
#if defined(J9VM_OPT_JITSERVER)
#include "env/j9methodServer.hpp"
#endif
@@ -186,6 +188,18 @@ static TR::ILOpCodes getCallOpForType(TR::DataType type)
TR::Block * TR_J9ByteCodeIlGenerator::walker(TR::Block * prevBlock)
{
+ static const bool crash = feGetEnv("TR_dontCrash") == NULL;+ if (crash)+ {+ // Set the flag to 1. If the previous value was 0, we won the race and+ // this is the compilation that should crash.+ static volatile uintptr_t flag = 0;+ if (VM_AtomicSupport::lockExchange(&flag, 1) == 0)+ {+ TR_ASSERT_FATAL(false, "oh no, the JVM crashed!");+ }+ }+
int32_t i, lastIndex = _bcIndex, firstIndex = _bcIndex;
if (comp()->getOption(TR_TraceILGen))
But when testing on AIX, the resulting crashes during the build did not produce any crash data, i.e. core, javacore, snap trace, jitdump. See these comments:
I'm not sure how specific this issue is to Jenkins or to the JIT compiler. For example, this might also happen outside of Jenkins, and it might also happen for crashes elsewhere in the VM - I haven't checked. If the issue turns out to be a bit more general, we can edit the title of this issue accordingly.
The text was updated successfully, but these errors were encountered:
In #16426 I have been testing some changes to build.groovy that detect when the VM has crashed during the build and collect the relevant binaries into the diagnostics tarball. To test it, I introduced a commit that intentionally fails an assertion in the JIT compiler as soon as it tries to generate IL for any method. Here's my most recent revision of that commit:
But when testing on AIX, the resulting crashes during the build did not produce any crash data, i.e. core, javacore, snap trace, jitdump. See these comments:
I'm not sure how specific this issue is to Jenkins or to the JIT compiler. For example, this might also happen outside of Jenkins, and it might also happen for crashes elsewhere in the VM - I haven't checked. If the issue turns out to be a bit more general, we can edit the title of this issue accordingly.
The text was updated successfully, but these errors were encountered: