When running my test with gradle I started getting output below on the console. This output is coming from the JVM not my code. Kotlin DSL is used to configure my gradle build.
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message transform method call failed at line: 873
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message transform method call failed at line: 873
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message transform method call failed at line: 873
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message transform method call failed at line: 873
This is happening on Java 11
java --version
openjdk 11.0.6 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
This output is not from my code, it seems to be from the JVM. There is no filename listed previous versions of Java seemed to have a bug related to this https://bugs.openjdk.java.net/browse/JDK-8061621
JPLISAgent.c line 873 might be what is generating the message.
UPDATE:
I went through all my CI logs to pin down the commit that introduced this issue. Tracked it down to this code in a unit test, of a Json formatter utility based on Jackson.
// try with a circular dependencies
Node a = new Node("a");
Node b = new Node("b");
a.setChild(b);
b.setParent(a);
assertThatExceptionOfType(JsonUtilsException.class).isThrownBy(() -> JsonUtils.toJson(a));
In particular the circular dependency triggers the JVM output. I guess Jackson really gets tripped up by circular dependency but I don't understand why that causes a JVM assertion error.
Questions: - What is the meaning of this warning/error? - What is the typical cause of this error, assertion failure in the JVM?