WARNING : Minion exited abnormally due to RUN_ERROR / Error while watching child process
While running PIT in a JDK 21 project the following stack trace is generated (which asks me to report it, so here goes):
1:27:47 PM PIT >> WARNING : Minion exited abnormally due to RUN_ERROR
1:27:56 PM PIT >> WARNING : Error while watching child process
java.util.concurrent.ExecutionException: org.pitest.util.PitError: null
Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Eclipse Adoptium
Version : 21.0.2+13-LTS
Uptime : 49264
Input ->
1 : -Dclassworlds.conf=/home/me/.sdkman/candidates/maven/current/bin/m2.conf
2 : -Dmaven.home=/home/me/.sdkman/candidates/maven/current
3 : -Dlibrary.jansi.path=/home/me/.sdkman/candidates/maven/current/lib/jansi-native
4 : -Dmaven.multiModuleProjectDirectory=/home/me/<project>
BootClassPathSupported : false
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205)
at org.pitest.util.CommunicationThread.waitToFinish(CommunicationThread.java:62)
at org.pitest.mutationtest.execute.MutationTestProcess.waitToDie(MutationTestProcess.java:61)
at org.pitest.mutationtest.build.MutationTestUnit.waitForMinionToDie(MutationTestUnit.java:98)
at org.pitest.mutationtest.build.MutationTestUnit.runTestInSeperateProcessForMutationRange(MutationTestUnit.java:85)
at org.pitest.mutationtest.build.MutationTestUnit.runTestsInSeperateProcess(MutationTestUnit.java:68)
at org.pitest.mutationtest.build.MutationTestUnit.call(MutationTestUnit.java:55)
at org.pitest.mutationtest.build.MutationTestUnit.call(MutationTestUnit.java:33)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.pitest.util.PitError: null
Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Eclipse Adoptium
Version : 21.0.2+13-LTS
Uptime : 49264
Input ->
1 : -Dclassworlds.conf=/home/me/.sdkman/candidates/maven/current/bin/m2.conf
2 : -Dmaven.home=/home/me/.sdkman/candidates/maven/current
3 : -Dlibrary.jansi.path=/home/me/.sdkman/candidates/maven/current/lib/jansi-native
4 : -Dmaven.multiModuleProjectDirectory=/home/me/<project>
BootClassPathSupported : false
at org.pitest.util.Unchecked.translateCheckedException(Unchecked.java:20)
at org.pitest.util.SafeDataInputStream.readByte(SafeDataInputStream.java:78)
at org.pitest.util.SocketReadingCallable.receiveResults(SocketReadingCallable.java:57)
at org.pitest.util.SocketReadingCallable.call(SocketReadingCallable.java:34)
at org.pitest.util.SocketReadingCallable.call(SocketReadingCallable.java:11)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
... 1 more
Caused by: java.io.EOFException
at java.base/java.io.DataInputStream.readUnsignedByte(DataInputStream.java:297)
at java.base/java.io.DataInputStream.readByte(DataInputStream.java:275)
at org.pitest.util.SafeDataInputStream.readByte(SafeDataInputStream.java:76)
... 5 more
The corresponding Maven pom.xml plugin configuration is as follows:
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.16.1</version>
<dependencies>
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>1.2.1</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>pitest</id>
<goals>
<goal>mutationCoverage</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
<configuration>
<excludedTestClasses>
<param>*IT</param>
</excludedTestClasses>
<mutationThreshold>80</mutationThreshold>
<coverageThreshold>80</coverageThreshold>
<timeoutConstant>5000</timeoutConstant>
<features>
<feature>+auto_threads</feature>
</features>
</configuration>
</plugin>
FWIW: the problem can be reproduced with the latest JDK 21 for Eclipse Temurin: 21.0.4+7-LTS as well.
If you can post a minimal project that reproduces the issue, I can take a look.
Unfortunately it does not look very straightforward to extract a minimal self contained example (it's an existing proprietary code base with a fair number of internal dependencies), but when I interrupt the Mavan command with Ctrl + C I do see a hs_err_pid<pid>.log file appearing. A possibly relevant excerpt (stacktrace):
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f39c5ffe8fa, pid=57546, tid=57894
#
# JRE version: OpenJDK Runtime Environment Temurin-21.0.4+7 (21.0.4+7) (build 21.0.4+7-LTS)
# Java VM: OpenJDK 64-Bit Server VM Temurin-21.0.4+7 (21.0.4+7-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0xf208fa] Symbol::as_unicode(int&) const+0x1a
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# https://github.com/adoptium/adoptium-support/issues
#
--------------- S U M M A R Y ------------
Command Line: -javaagent:/tmp/1722430518762088352084627845234222500404154410381.jar -ea -Djava.awt.headless=true -Dclassworlds.conf=/home/me/.sdkman/candidates/maven/current/bin/m2.conf -Dmaven.home=/home/me/.sdkman/candidates/maven/current -Dlibrary.jansi.path=/home/me/.sdkman/candidates/maven/current/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/me/projects/<project> org.pitest.mutationtest.execute.MutationTestMinion 42003
Host: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz, 8 cores, 27G, Debian GNU/Linux bookworm/sid
Time: Wed Jul 31 14:56:05 2024 CEST elapsed time: 11.541374 seconds (0d 0h 0m 11s)
--------------- T H R E A D ---------------
Current thread (0x00007f39c01026e0): JavaThread "mutationTestThread" daemon [_thread_in_vm, id=57894, stack(0x00007f39469d8000,0x00007f3946ad8000) (1024K)]
Stack: [0x00007f39469d8000,0x00007f3946ad8000], sp=0x00007f3946ad3560, free space=1005k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0xf208fa] Symbol::as_unicode(int&) const+0x1a
V [libjvm.so+0xe98c57] StringTable::intern(Symbol*, JavaThread*)+0x47
V [libjvm.so+0xd91a8c] Reflection::new_field(fieldDescriptor*, JavaThread*)+0x3c
V [libjvm.so+0x9fa87e] JVM_GetClassDeclaredFields+0x68e
j java.lang.Class.getDeclaredFields0(Z)[Ljava/lang/reflect/Field;+0 [email protected]
J 2143 c1 java.lang.Class.privateGetDeclaredFields(Z)[Ljava/lang/reflect/Field; [email protected] (64 bytes) @ 0x00007f39a8ca7c54 [0x00007f39a8ca7ac0+0x0000000000000194]
J 2149 c1 java.lang.Class.getDeclaredFields()[Ljava/lang/reflect/Field; [email protected] (27 bytes) @ 0x00007f39a8caa884 [0x00007f39a8caa760+0x0000000000000124]
j nl.jqno.equalsverifier.internal.reflection.FieldIterable.addFieldsFor(Ljava/lang/Class;)Ljava/util/List;+17
j nl.jqno.equalsverifier.internal.reflection.FieldIterable.createFieldList()Ljava/util/List;+14
J 2166 c1 nl.jqno.equalsverifier.internal.reflection.FieldIterable.iterator()Ljava/util/Iterator; (10 bytes) @ 0x00007f39a8cb28bc [0x00007f39a8cb2840+0x000000000000007c]
j nl.jqno.equalsverifier.internal.util.FieldNameExtractor.extractFieldNames(Ljava/lang/Class;)Ljava/util/Set;+12
j nl.jqno.equalsverifier.api.SingleTypeEqualsVerifierApi.<init>(Ljava/lang/Class;)V+124
j nl.jqno.equalsverifier.EqualsVerifier.forClass(Ljava/lang/Class;)Lnl/jqno/equalsverifier/api/SingleTypeEqualsVerifierApi;+5