question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashes the surefire JVM

See original GitHub issue

Im using maven-surefire-plugion:3.0.0-M5 and junit 5.8.2

In a project I simply add the dependency and it crashes the JVM.

      <dependency>
        <groupId>org.junit-pioneer</groupId>
        <artifactId>junit-pioneer</artifactId>
        <version>1.4.0</version>
      </dependency>

I was fine with 1.3.8

[ERROR] TestEngine with ID 'junit-jupiter' failed to discover tests
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR] TestEngine with ID 'junit-jupiter' failed to discover tests
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:733)
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)
[ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)
[ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)
[ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)
[ERROR]         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR]         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR]         at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:196)
[ERROR]         at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:186)
[ERROR]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[ERROR]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[ERROR]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[ERROR]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[ERROR]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[ERROR]         at java.base/java.lang.Thread.run(Thread.java:829)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
delanymcommented, Mar 12, 2022

It was API incompat - solved using junit-bom.

I came here because a unit test is now failing building under JDK11. The JVM loads locale providers in a different order. I wanted to switch the test off if the locale was something different from what it was expecting, but the @DefaultLocale annotation sets the locale rather than filtering the test based on the locale.

In the end I just used @DisableOnJre(JRE.JAVA_11)

0reactions
nipafxcommented, Mar 11, 2022

This demo project uses JUnit 5.8.2, Pioneer 1.5.0 (time to update) and Surefire 3.0.0-M5. If it’s indeed Pioneer that causes the crash, then maybe there’s a specific feature or configuration that causes this? A minimal reproducible example would be really great!

Read more comments on GitHub >

github_iconTop Results From Across the Web

The forked VM terminated without saying properly goodbye ...
Problem is with maven plugin maven-surefire-plugin only in version 2.20.1 and ... Look for the classical "hs_err*" files indicating VM crashes or examine ......
Read more >
Maven Surefire Plugin – Frequently Asked Questions
Crashed Surefire or Failsafe plugin must indicate crashed tests. After a forked JVM has crashed the console of forked JVM prints Crashed ......
Read more >
[jira] [Created] (SUREFIRE-1927) JVM exit with Process Exit ...
VM crash or System.exit called? [ERROR] Command was /bin/sh -c cd /services/util/json && /usr/lib/jvm/java-1.8-openjdk/jre/bin/java ...
Read more >
[jira] [Created] (SUREFIRE-1541) SurefireBooterForkException
Summary: SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? Key: SUREFIRE-1541. URL: https ...
Read more >
[JIRA] (CDAP-19265) PreviewDataPipelineTest dies sometimes
PreviewDataPipelineTest Error: org.apache.maven.surefire.booter. ... '/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java' '-Xmx3500m' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found