[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16125636#comment-16125636 ] Tibor Digana commented on SUREFIRE-1302: Thx Valentin. The issue SUREFIRE-1264 is reopened. On Mon, Aug 14, 2017 at 1:00 PM, Valentin Baranov (JIRA) > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16125539#comment-16125539 ] Valentin Baranov commented on SUREFIRE-1302: I think the best way is to reopen 1264 because it is not completely done and can't be delivered right now. I'll try to find time after work to fix it. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16125531#comment-16125531 ] Tibor Digana commented on SUREFIRE-1302: Exactly, the regression was found in SUREFIRE-1264 regarding failed test and not passed tests as the initial fix in 1264 was proposed to fix. We have two options. I can reopen 1264 or create a new one. Maybe reopening it is better. WDYT? On Mon, Aug 14, 2017 at 12:40 PM, Valentin Baranov (JIRA) > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16125517#comment-16125517 ] Valentin Baranov commented on SUREFIRE-1302: [~tibor17], the ticket you're talking about is closed. As far as I can understand the situation is like the following: 1. There was an issue SUREFIRE-1264. 2. It was "fixed" and closed 3. After that, some kind of regression was found, but issue itself wasn't reopened. Am I right? > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16125488#comment-16125488 ] Tibor Digana commented on SUREFIRE-1302: There are 4 pending issues to fix. One of them has to be fixed now because the issue has been introduced recently. It is a bug regarding @Parameterized in JUnit when tests fail. This is very important because this was fine in 2.20 and I do not want to deliver 2.20.1 with such issue for junit provider. If you have time please look at it. See the last comment in https://issues.apache.org/jira/browse/SUREFIRE-1264. There is the last comment saying which commit introduced the issue. This tells you what change caused this and should be kept but fixed. Of course IT tests are needed. On Mon, Aug 14, 2017 at 11:31 AM, Valentin Baranov (JIRA) > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16125459#comment-16125459 ] Valentin Baranov commented on SUREFIRE-1302: [~tibor17], when can we expect this fix to be delivered within new plugin version? It is very critical for us. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16102553#comment-16102553 ] Hudson commented on SUREFIRE-1302: -- SUCCESS: Integrated in Jenkins build maven-surefire-dev #19 (See [https://builds.apache.org/job/maven-surefire-dev/19/]) [SUREFIRE-1302] Surefire does not wait long enough for the forked VM and (tibor17: [http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git&a=commit&h=fec3dfedc359ae57c5928f98a7b1c43bad89bc5a]) * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java * (add) surefire-api/src/test/java/org/apache/maven/surefire/util/ReflectionUtilsTest.java * (edit) maven-failsafe-plugin/pom.xml * (edit) surefire-api/pom.xml * (edit) maven-surefire-plugin/pom.xml * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java * (edit) surefire-booter/src/test/java/org/apache/maven/surefire/booter/JUnit4SuiteTest.java * (edit) surefire-api/src/test/java/org/apache/maven/JUnit4SuiteTest.java * (edit) surefire-booter/pom.xml * (edit) pom.xml * (add) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/Platform.java * (edit) surefire-api/src/main/java/org/apache/maven/surefire/util/ReflectionUtils.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterConstants.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java * (edit) maven-surefire-plugin/src/site/apt/examples/shutdown.apt.vm * (delete) surefire-api/src/test/java/org/apache/maven/surefire/util/internal/SystemUtilsTest.java * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProcessInfo.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/PropertiesWrapper.java * (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/CommandReader.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java * (edit) maven-surefire-common/pom.xml * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/SystemUtils.java * (add) surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java * (delete) surefire-api/src/main/java/org/apache/maven/surefire/util/internal/SystemUtils.java * (add) surefire-booter/src/test/java/org/apache/maven/surefire/booter/PpidCheckerTest.java * (edit) surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerProviderConfigurationTest.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactoryTest.java * (edit) maven-surefire-report-plugin/pom.xml * (edit) surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1295AttributeJvmCrashesToTestsIT.java > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static Sch
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16101259#comment-16101259 ] Hudson commented on SUREFIRE-1302: -- SUCCESS: Integrated in Jenkins build maven-surefire #1722 (See [https://builds.apache.org/job/maven-surefire/1722/]) [SUREFIRE-1302] Surefire does not wait long enough for the forked VM and (tibor17: [http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git&a=commit&h=f1f4718e519bdee7ab53b91b34714adce3e39c34]) * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java * (edit) maven-surefire-common/pom.xml * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java * (delete) surefire-api/src/main/java/org/apache/maven/surefire/util/internal/SystemUtils.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProcessInfo.java * (edit) maven-surefire-plugin/pom.xml * (edit) surefire-api/pom.xml * (add) surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/SystemUtils.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerProviderConfigurationTest.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java * (edit) pom.xml * (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/CommandReader.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java * (edit) surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1295AttributeJvmCrashesToTestsIT.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java * (edit) surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java * (edit) maven-surefire-report-plugin/pom.xml * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java * (add) surefire-api/src/test/java/org/apache/maven/surefire/util/ReflectionUtilsTest.java * (delete) surefire-api/src/test/java/org/apache/maven/surefire/util/internal/SystemUtilsTest.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/PropertiesWrapper.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactoryTest.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java * (edit) surefire-booter/pom.xml * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java * (edit) surefire-api/src/main/java/org/apache/maven/surefire/util/ReflectionUtils.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java * (add) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/Platform.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterConstants.java * (add) surefire-booter/src/test/java/org/apache/maven/surefire/booter/PpidCheckerTest.java * (edit) maven-failsafe-plugin/pom.xml * (edit) maven-surefire-plugin/src/site/apt/examples/shutdown.apt.vm * (edit) surefire-api/src/test/java/org/apache/maven/JUnit4SuiteTest.java * (edit) surefire-booter/src/test/java/org/apache/maven/surefire/booter/JUnit4SuiteTest.java > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static Schedul
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16101118#comment-16101118 ] Hudson commented on SUREFIRE-1302: -- SUCCESS: Integrated in Jenkins build maven-surefire #1720 (See [https://builds.apache.org/job/maven-surefire/1720/]) Revert "[SUREFIRE-1302] Surefire does not wait long enough for the (tibor17: [http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git&a=commit&h=58a4dad81b02dba8ccc0f3fe511e31bfaa914d43]) * (edit) surefire-api/pom.xml * (edit) pom.xml * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java * (edit) maven-surefire-plugin/src/site/apt/examples/shutdown.apt.vm * (edit) maven-surefire-common/pom.xml * (edit) surefire-booter/src/test/java/org/apache/maven/surefire/booter/JUnit4SuiteTest.java * (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/CommandReader.java * (delete) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProcessInfo.java * (edit) maven-surefire-plugin/pom.xml * (edit) surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1295AttributeJvmCrashesToTestsIT.java * (edit) maven-surefire-report-plugin/pom.xml * (edit) surefire-booter/pom.xml * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java * (delete) surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java * (edit) maven-failsafe-plugin/pom.xml * (delete) surefire-booter/src/test/java/org/apache/maven/surefire/booter/PpidCheckerTest.java > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16099526#comment-16099526 ] Hudson commented on SUREFIRE-1302: -- SUCCESS: Integrated in Jenkins build maven-surefire-dev #15 (See [https://builds.apache.org/job/maven-surefire-dev/15/]) [SUREFIRE-1302] Surefire does not wait long enough for the forked VM and (tibor17: [http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git&a=commit&h=493cc8b5713ff32346d4703e0b9593f461a10ca4]) * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactoryTest.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterConstants.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java * (edit) surefire-api/pom.xml * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java * (add) surefire-api/src/test/java/org/apache/maven/surefire/util/ReflectionUtilsTest.java * (edit) pom.xml * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/SystemUtils.java * (edit) surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerProviderConfigurationTest.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProcessInfo.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java * (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/CommandReader.java * (delete) surefire-api/src/main/java/org/apache/maven/surefire/util/internal/SystemUtils.java * (add) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/Platform.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java * (add) surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java * (add) surefire-booter/src/test/java/org/apache/maven/surefire/booter/PpidCheckerTest.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/PropertiesWrapper.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java * (edit) surefire-api/src/main/java/org/apache/maven/surefire/util/ReflectionUtils.java * (edit) maven-surefire-common/pom.xml * (delete) surefire-api/src/test/java/org/apache/maven/surefire/util/internal/SystemUtilsTest.java * (edit) maven-surefire-plugin/src/site/apt/examples/shutdown.apt.vm * (edit) maven-failsafe-plugin/pom.xml * (edit) surefire-booter/src/test/java/org/apache/maven/surefire/booter/JUnit4SuiteTest.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java * (edit) surefire-booter/pom.xml * (edit) surefire-api/src/test/java/org/apache/maven/JUnit4SuiteTest.java * (edit) maven-surefire-report-plugin/pom.xml * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java * (edit) maven-surefire-plugin/pom.xml * (edit) surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1295AttributeJvmCrashesToTestsIT.java > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static Sch
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16097914#comment-16097914 ] Hudson commented on SUREFIRE-1302: -- SUCCESS: Integrated in Jenkins build maven-surefire-dev #13 (See [https://builds.apache.org/job/maven-surefire-dev/13/]) [SUREFIRE-1302] Surefire does not wait long enough for the forked VM and (tibor17: [http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git&a=commit&h=5cbdc7a4c12d77f42270735a742038581c6bac4a]) * (edit) maven-surefire-report-plugin/pom.xml * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactoryTest.java * (edit) maven-surefire-plugin/src/site/apt/examples/shutdown.apt.vm * (edit) pom.xml * (add) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/Platform.java * (edit) surefire-api/pom.xml * (edit) surefire-api/src/main/java/org/apache/maven/surefire/util/ReflectionUtils.java * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProcessInfo.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java * (edit) surefire-booter/src/test/java/org/apache/maven/surefire/booter/JUnit4SuiteTest.java * (edit) surefire-booter/pom.xml * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerProviderConfigurationTest.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java * (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/CommandReader.java * (add) surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java * (edit) surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1295AttributeJvmCrashesToTestsIT.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/PropertiesWrapper.java * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/SystemUtils.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterConstants.java * (edit) maven-surefire-common/pom.xml * (add) surefire-api/src/test/java/org/apache/maven/surefire/util/ReflectionUtilsTest.java * (add) surefire-booter/src/test/java/org/apache/maven/surefire/booter/PpidCheckerTest.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java * (edit) surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java * (delete) surefire-api/src/main/java/org/apache/maven/surefire/util/internal/SystemUtils.java * (edit) maven-failsafe-plugin/pom.xml * (edit) maven-surefire-plugin/pom.xml * (delete) surefire-api/src/test/java/org/apache/maven/surefire/util/internal/SystemUtilsTest.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java * (edit) surefire-api/src/test/java/org/apache/maven/JUnit4SuiteTest.java > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static Sch
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16096378#comment-16096378 ] Hudson commented on SUREFIRE-1302: -- SUCCESS: Integrated in Jenkins build maven-surefire-dev #10 (See [https://builds.apache.org/job/maven-surefire-dev/10/]) SUREFIRE-1302_4 (tibor17: [http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git&a=commit&h=c7e0582bbc181b2d63901367f4d12613640352a7]) * (add) surefire-api/src/test/java/org/apache/maven/surefire/util/ReflectionUtilsTest.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/PropertiesWrapper.java * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/SystemUtils.java * (edit) maven-failsafe-plugin/pom.xml * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java * (edit) surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1295AttributeJvmCrashesToTestsIT.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java * (edit) surefire-api/src/main/java/org/apache/maven/surefire/util/ReflectionUtils.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterConstants.java * (edit) pom.xml * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProcessInfo.java * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java * (edit) surefire-booter/src/test/java/org/apache/maven/surefire/booter/JUnit4SuiteTest.java * (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/CommandReader.java * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java * (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerProviderConfigurationTest.java * (edit) surefire-api/pom.xml * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java * (edit) surefire-api/src/test/java/org/apache/maven/JUnit4SuiteTest.java * (edit) maven-surefire-plugin/pom.xml * (edit) maven-surefire-plugin/src/site/apt/examples/shutdown.apt.vm * (delete) surefire-api/src/test/java/org/apache/maven/surefire/util/internal/SystemUtilsTest.java * (edit) surefire-booter/pom.xml * (add) surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java * (edit) maven-surefire-common/pom.xml * (edit) maven-surefire-report-plugin/pom.xml * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java * (add) surefire-booter/src/test/java/org/apache/maven/surefire/booter/PpidCheckerTest.java * (delete) surefire-api/src/main/java/org/apache/maven/surefire/util/internal/SystemUtils.java > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16078700#comment-16078700 ] Hudson commented on SUREFIRE-1302: -- UNSTABLE: Integrated in Jenkins build maven-surefire #1717 (See [https://builds.apache.org/job/maven-surefire/1717/]) [SUREFIRE-1302] Surefire does not wait long enough for the forked VM and (tibor17: [http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git&a=commit&h=c343cc412b986fd9da839696c709542d03679d68]) * (edit) surefire-booter/src/test/java/org/apache/maven/surefire/booter/JUnit4SuiteTest.java * (edit) surefire-booter/pom.xml * (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java * (edit) maven-surefire-report-plugin/pom.xml * (edit) maven-surefire-common/pom.xml * (edit) maven-surefire-plugin/pom.xml * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProcessInfo.java * (edit) maven-failsafe-plugin/pom.xml * (add) surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java * (add) surefire-booter/src/test/java/org/apache/maven/surefire/booter/PpidCheckerTest.java * (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java * (edit) surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1295AttributeJvmCrashesToTestsIT.java * (edit) maven-surefire-plugin/src/site/apt/examples/shutdown.apt.vm * (edit) surefire-api/pom.xml * (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/CommandReader.java * (edit) pom.xml > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16045455#comment-16045455 ] Tibor Digana commented on SUREFIRE-1302: [~elecharny] [~opeyrusse] [~xeagle] [~michael-o] I have pushed a branch. https://git-wip-us.apache.org/repos/asf?p=maven-surefire.git;a=shortlog;h=refs/heads/SUREFIRE-1302_2 Pls put your comments in the code if you want to change something. It is only a prototype. The class {{PpdiChecker}} will recognize etime of PPID. If it is longer or the same like uptime of current PID, the parent process is still alive. This way the the fork JVM does not need to have any timeout like PING. If the commands throw exception or another than Unix/Windows platform, we fallback to the old mechanism. I want to split version 2.20.1, release it on Friday and include this issue. Other big issues like JDK 9 should go to 2.20.2. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16034169#comment-16034169 ] Tibor Digana commented on SUREFIRE-1302: [~elecharny] I have pushed a fix, please see my comment in SUREFIRE-1374. Thx. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16033799#comment-16033799 ] Emmanuel Lecharny commented on SUREFIRE-1302: - Hi Tibor, you are right, this is more likely to be related to SUREFIRE-1374. However, I do think it's also time related (the 20 s it takes to run the module). OTOH, it only fails when cutting a release, so there must be something else... > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16032589#comment-16032589 ] Emmanuel Lecharny commented on SUREFIRE-1302: - Same pb with 2.19.1. All the tests went through without error : {noformat} [INFO] Results : [INFO] [INFO] Tests run: 50, Failures: 0, Errors: 0, Skipped: 0 [INFO] {noformat} Same thing in the surefire-reports. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16030725#comment-16030725 ] Emmanuel Lecharny commented on SUREFIRE-1302: - Thanks Tibor ! I'll give 2.19.1 a try today (it might take some time because I would need to bump up a sub-project, and it requires a 4h notice to the team). Sadly, I don't have anymore the reports, because I ran the tests in isolation after the failure, but I'll have them back as soon as I will have run the release again. The process is a bit messy because it's a release, and it takes a while (around 40 ins) to run and require quite a lot of manual interaction if it fails (remove the svn tag, rollback the release, and re-run it with all the uploads - not to mention I'm in vacatio with my young kid and wife, so ;-) I'll keep you posted. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16030617#comment-16030617 ] Tibor Digana commented on SUREFIRE-1302: [~elecharny] When you open logs from every test, e.g. {{surefire-reports}}, do you see that every test method went through? I think the JVM sends 0x04 by ASCII when terminating, {{End of Transmission}}. Please do not use version {{2.18.1}}. I removed the call {{CommandReader#stop()}} in 2.20 when JVM is going to finish in {{ForkedBooter}}. Please confirm that version {{2.19.1}} works. I found that stopping reader thread is useless due to JVM stops it on exit but I could not imaging the stream would be corrupted this way. The change was done in da7ff6aa25a72094705c24981afbf8294ac4b1dc on 28.03.2017. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16030507#comment-16030507 ] Tibor Digana commented on SUREFIRE-1302: [~elecharny] Your problem refers to another issue {{SUREFIRE-1376}}. We do not understand the root cause yet. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16029804#comment-16029804 ] Emmanuel Lecharny commented on SUREFIRE-1302: - Hi guys, I think I'm stuck with a similar pb in the Apache Directory LDAP API project : trying to cut a release ends up with this error : {noformat} [INFO] [SUREFIRE] std/in stream corrupted [INFO] java.io.IOException: Command NOOP unexpectedly read Void data with length 4. [INFO] at org.apache.maven.surefire.booter.MasterProcessCommand.decode(MasterProcessCommand.java:139) [INFO] at org.apache.maven.surefire.booter.CommandReader$CommandRunnable.run(CommandReader.java:360) [INFO] at java.lang.Thread.run(Thread.java:745) ... [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project api-integ-osgi: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? [INFO] [ERROR] Command was /bin/sh -c cd /Users/elecharny/apacheds/trunks/shared/target/checkout/integ-osgi && /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/bin/java -Xmx1024m -jar /Users/elecharny/apacheds/trunks/shared/target/checkout/integ-osgi/target/surefire/surefirebooter3370697464825684132.jar /Users/elecharny/apacheds/trunks/shared/target/checkout/integ-osgi/target/surefire/surefire2251022129393537760tmp /Users/elecharny/apacheds/trunks/shared/target/checkout/integ-osgi/target/surefire/surefire_158862987326254246739tmp heds/trunks/shared/target/checkout/integ-osgi/target/surefire/surefirebooter3370697464825684132.jar /Users/elecharny/apacheds/trunks/shared/target/checkout/integ-osgi/target/surefire/surefire2251022129393537760tmp /Users/elecharny/apacheds/trunks/shared/target/checkout/integ-osgi/target/surefire/surefire_158862987326254246739tmp {noformat} The weird thing is that the exact same test work perfectly well when I run {{mvn test}} in the module, or when I do a release dry-run or a release prepare, it's really when I do the {{mvn release:perform}} that it fails. The test itself can take a bit of time. Here is the output, for instance : {noformat} [INFO] --- [INFO] T E S T S [INFO] --- [INFO] Running org.apache.directory.api.osgi.ApiAsn1ApiOsgiTest [INFO] [INFO] [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.375 sec - in org.apache.directory.api.osgi.ApiAsn1ApiOsgiTest [INFO] Running org.apache.directory.api.osgi.ApiAsn1BerOsgiTest [INFO] [INFO] [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.303 sec - in org.apache.directory.api.osgi.ApiAsn1BerOsgiTest [INFO] Running org.apache.directory.api.osgi.ApiDsmlEngineOsgiTest [INFO] [INFO] [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.44 sec - in org.apache.directory.api.osgi.ApiDsmlEngineOsgiTest [INFO] Running org.apache.directory.api.osgi.ApiDsmlParserOsgiTest [INFO] [INFO] [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.185 sec - in org.apache.directory.api.osgi.ApiDsmlParserOsgiTest [INFO] Running org.apache.directory.api.osgi.ApiI18nOsgiTest [INFO] [INFO] [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.237 sec - in org.apache.directory.api.osgi.ApiI18nOsgiTest [INFO] Running org.apache.directory.api.osgi.ApiLdapClientApiOsgiTest [INFO] [INFO] [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.315 sec - in org.apache.directory.api.osgi.ApiLdapClientApiOsgiTest [INFO] Running org.apache.directory.api.osgi.ApiLdapCodecCoreOsgiTest [INFO] [INFO] [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.224 sec - in org.apache.directory.api.osgi.ApiLdapCodecCoreOsgiTest [INFO] Running org.apache.directory.api.osgi.ApiLdapExtrasAciOsgiTest [INFO] [INFO] [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.19 sec - in org.apache.directory.api.osgi.ApiLdapExtrasAciOsgiTest [INFO] Running org.apache.directory.api.osgi.ApiLdapExtrasCodecApiOsgiTest [INFO] [INFO] [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.154 sec - in org.apache.directory.api.osgi.ApiLdapExtrasCodecApiOsgiTest [INFO] Running org.apache.directory.api.osgi.ApiLdapExtrasCodecOsgiTest [INFO] [INFO] [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.193 sec - in org.apache.directory.api.osgi.ApiLdapExtrasCodecOsgiTest [INFO] Running org.apache.directory.api.osgi.ApiLdapExtrasSpOsgiTest [INFO] [INFO] [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.094 sec - in org.apache.directory.api.osgi.ApiLdapExtrasSpOsgiTest [INFO] Running org.apache.di
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16019227#comment-16019227 ] Olivier Peyrusse commented on SUREFIRE-1302: Good job [~tibor17]. Looking at PPID sounds good to me. Tell me if you want me to run some tests. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16018633#comment-16018633 ] Tibor Digana commented on SUREFIRE-1302: [~opeyrusse] [~xeagle] I found the problem but since the Maven process can run modules in parallel {{e.g. -T 2C}} then considering GC may complicate everything. I would rather observe {{PPID}} and check if the process is every second. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-gclog.log, surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16017086#comment-16017086 ] Olivier Peyrusse commented on SUREFIRE-1302: Hello [~tibor17], I will try adding more details about the logs and printing the ping times. However, I am still not confortable with your heuristics as it depends a lot on the GC configuration, the size of your eden, survivor and old gen spaces, because when your memory starts to be full, it will take much more time to find some space in the heap. I remain on my position that we should make the timer waits for 1 minute without a ping, and then kill the machine, as we are dealing with tests here, not a real-time application with needs for fast-recovery. Best regards > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16016136#comment-16016136 ] Tibor Digana commented on SUREFIRE-1302: [~opeyrusse] I guess this this 1GB of committed memory: 888M->820M(1024M) According to my equation 1GB should be 17 seconds. But 12 is less than 17. So the ping should be tolerant. Could you please print a log in the ping thread? It should print a message every second. In other words the ping of 10 seconds should turn to 17 seconds when committed memory is 1 GB. Debugging the code would be hard but putting more logs, according to your preference, may help. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16015668#comment-16015668 ] Olivier Peyrusse commented on SUREFIRE-1302: Hello Tibor, running surefire 2.21-SNAPSHOT, I got once again the VM shutdown. I attached to the issue the maven logs. My personal logs seems to show that a small thread supposed to print a message every 250 ms was not scheduled during 12s. GC logs available as error in jvmRun1 show that a pause of ~12s, confirming my diagnostic. {quote} # Created on 2017-05-18T05:50:30.395 Corrupted stdin stream in forked JVM 1. Stream '[GC pause (G1 Evacuation Pause) (young)-- 888M->820M(1024M), 11.8820911 secs]'. {quote} So the current adaptive ping seems not to be enough. Tell me if you want me to test something else. Best regards > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: 2017-05-18T05-48-08_685-jvmRun1.dumpstream, > surefire-logs, > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16015374#comment-16015374 ] Olivier Peyrusse commented on SUREFIRE-1302: Hello Tibor, I did not manage to reproduce the issue on my machine. I am trying on a bigger one. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16010206#comment-16010206 ] Olivier Peyrusse commented on SUREFIRE-1302: Hello Tibor, new surefire built and I am starting the tests. Although, it is hard to reproduce ... > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16009419#comment-16009419 ] Tibor Digana commented on SUREFIRE-1302: [~opeyrusse] Can you pls build {{SUREFIRE-1302}} branch {{mvn -DskipTests install}} and test it with your project? I will override the branch and add parameter soon and then I want to change the documentation. Yet the ping timeout is adaptive. Adding parameter takes time because several classes and reflection has to be changed. https://git-wip-us.apache.org/repos/asf?p=maven-surefire.git;a=shortlog;h=refs/heads/SUREFIRE-1302 > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16002439#comment-16002439 ] Olivier Peyrusse commented on SUREFIRE-1302: Seems good to me. Since you let a way to change that value, it should meet all needs. You may consider increasing the time limit to 30s, or even a minute. As this is a safe guard and the machine is not supposed to die, we could wait a longer time to detect that issue. With such an increased timeout, you will likely avoid suffering from long GCs. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16002287#comment-16002287 ] Olivier Peyrusse commented on SUREFIRE-1302: Yes, why not. It is not easy to reproduce our issue because we must trigger a huge GC at the right time. But, yes, I am willing. What should I expect in the snapshot ? > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16002216#comment-16002216 ] Olivier Peyrusse commented on SUREFIRE-1302: Hello [~tibor17], I will surely won't have time to code something for Surefire, but I will try again to run my failing test with version {{2.20}}. Sorry that I did not understand correctly your previous comment. I though you meant that in a future version, the GC logs would be in TEST-null.txt. I post the logs as soon as I got them. Regards > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16001258#comment-16001258 ] Tibor Digana commented on SUREFIRE-1302: [~xeagle] [~opeyrusse] Please let me know if you still have this issue with new version {{2.20}} of Surefire. If you could measure the GC pauses {{via -verbose:gc}} I would really appreciate your help. Thx. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: 2.20.1 > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15975587#comment-15975587 ] Tibor Digana commented on SUREFIRE-1302: [~opeyrusse] Sooner or later we will use sockets and not these standard output and input streams. We have to provide the users with fallback. Then this dump file would not contain GC logs because it will be found in {{target/surefire-reports/TEST-null.txt}}. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: Backlog > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15974378#comment-15974378 ] Olivier Peyrusse commented on SUREFIRE-1302: Hello Tibor, quick note about {{-verbose:gc}}. I did not activate that option since it triggered a lot of errors in surefire, and the results were useless. All GC stats are received by the CommandReader, which fails to decode them - logical since it is not supposed to be decoded. {noformat} output: # Created on 2017-04-19T11:22:13.163 Corrupted stdin stream in forked JVM 1. Stream '[GC pause (System.gc()) (young) (initial-mark) 43M->5994K(1024M), 0.0059696 secs]'. # Created on 2017-04-19T11:22:13.166 Corrupted stdin stream in forked JVM 1. Stream '[GC concurrent-root-region-scan-start]'. java.lang.IllegalArgumentException: Stream stdin corrupted. Expected comma after third character in command '[GC concurrent-root-region-scan-start]'. at org.apache.maven.plugin.surefire.booterclient.output.ForkClient$OperationalData.(ForkClient.java:469) at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.processLine(ForkClient.java:191) at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:158) at org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:87) at java.lang.Thread.run(Thread.java:745) # Created on 2017-04-19T11:22:13.166 Corrupted stdin stream in forked JVM 1. Stream '[GC concurrent-root-region-scan-end, 0.0024680 secs]'. {noformat} > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: Backlog > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15974328#comment-15974328 ] Olivier Peyrusse commented on SUREFIRE-1302: Hello Tibor, I will add the option for verbose GC. As soon as we hit the issue, I will forward you the GC times. So far, I had a small thread logging a time at a regular pace. I saw pauses in that print around 10 secs, suggesting GCs of that duration. I am not at all familiar with surefire project. As Yuriy suggested, is that ok if I make the ping timeout configurable in surefire config ? If yes, where can I start to make it - just point me 1 or 2 base classes, and I will start from there. I cannot guarantee you I will have time to make the change, but I will try. Regards > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: Backlog > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15969571#comment-15969571 ] Tibor Digana commented on SUREFIRE-1302: [~opeyrusse] Can you help us and fix this issue in class {{ForkedBooter}}? I am working on three other issues and we want to make release in April and support JDK9. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: Backlog > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15969508#comment-15969508 ] Tibor Digana commented on SUREFIRE-1302: [~opeyrusse] I think we can use JMX {{GarbageCollectorMXBean}} and prolong the ping period by the delay caused by GC. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: Backlog > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15969259#comment-15969259 ] Tibor Digana commented on SUREFIRE-1302: [~opeyrusse] Can you enable {{-verbose:gc}} and tell me how slow the GC is? Ping should be received within 20 seconds. Please test your project with new version {{2.20}} which was released yesterday. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: Backlog > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15969177#comment-15969177 ] Olivier Peyrusse commented on SUREFIRE-1302: Hello everyone, I'd like to add my case to the one of [~xeagle]. In my case, we are developing an in-memory database for huge volume of data. Given that, it is common that we fill the JVM with a lot of objects during our tests, implying a lot of huge GCs after that. As you may know, GCs imply a stop-of-the-world at the JVM level, preventing it from sending its command expected by the ping. If the GC is too long, the VM is assumed to be dead and is killed by the {{ForkedBooter}}. As Yuriy, having the possibility to configure the ping period is enough to fix this issue. Side note: is it possible to add a log or something stating that the VM was killed by ForkedBooter since it was not responding ? bq. The forked VM terminated without properly saying goodbye. VM crash or System.exit called? This is not really explicit. We first assumed that it was our code or in a third plugin. Directly knowing would have spare investigation hours :) Thanks and regards > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: Backlog > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15961793#comment-15961793 ] Tibor Digana commented on SUREFIRE-1302: [~xeagle] I used version 2.20 and found out that forked jvm received corrupted data in stdin (java.lang.System#in). Some library uses stdin in your tests. # Created on 2017-04-08T13:28:55.139 [SUREFIRE] std/in stream corrupted java.io.IOException: Command NOOP unexpectedly read Void data with length 4. at org.apache.maven.surefire.booter.MasterProcessCommand.decode(MasterProcessCommand.java:130) at org.apache.maven.surefire.booter.CommandReader$CommandRunnable.run(CommandReader.java:386) at java.lang.Thread.run(Thread.java:745) > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: Backlog > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15831779#comment-15831779 ] Yuriy Zaplavnov commented on SUREFIRE-1302: --- [~tibor17] is the issue from recently attached project reproducible for you? > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: Backlog > > Attachments: > surefire-tests-terminated-master-aa9330316038f6b46316ce36ff40714ffc7cf299.zip, > tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15715085#comment-15715085 ] Tibor Digana commented on SUREFIRE-1302: [~xeagle] Can you attach a project I can reproduce? > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: Backlog > > Attachments: tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15701283#comment-15701283 ] Yuriy Zaplavnov commented on SUREFIRE-1302: --- Sorry for delay, was a bit in hurry with other things, give me please some time and I will take it to prepare a project to let you reproduce it on your own. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: Backlog > > Attachments: tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15700195#comment-15700195 ] Tibor Digana commented on SUREFIRE-1302: [~xeagle] What config of Surefire you use in this issue?It would be useful if you uploaded your project or a link in github where I can reproduce it. I want to release Version 2.19.2 soon. You can help me with that if you confirm the PING command dispatched from ForkStarter has stopped right after last test started. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov >Assignee: Tibor Digana > Fix For: Backlog > > Attachments: tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15671591#comment-15671591 ] Tibor Digana commented on SUREFIRE-1302: Good job! The report {{tests_log_02.txt}} contains two forks? How much time each test takes? Does this execution time interleave with 20 seconds period? Maybe the ping is stopped right after the last test has started in testset. This is currently my guess. This can be simulated with sample project running the tests with {{sleep(21_000L)}}. Please try that and provide your project in Jira to reproduce it. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov > Attachments: tests_log_01.txt, tests_log_02.txt > > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15658051#comment-15658051 ] Tibor Digana commented on SUREFIRE-1302: [~xeagle] Please see this issue SUREFIRE-1222 and GitHub links there what it means when Arquillian affected the stream. The same happens with native libraries. Simply print the logs that master process sends PING and slave receives it with certain timestamps. This would be the first thing to make analysis unlike adding config parameter which we are yet not sure that it helps to you and many other users. We must have the proofs. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15658028#comment-15658028 ] Tibor Digana commented on SUREFIRE-1302: [~xeagle] But this does not need PR. The PING is lost only if your application corrupted std/out which is used to send this command. We are detecting the Maven was killed and forked surefire jvms should be killed afterwards. I do not trust that the CPU is overloaded for 20 seconds so much the none of our Threads are notified. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15656967#comment-15656967 ] Michael Osipov commented on SUREFIRE-1302: -- Not exactly how I expected. This issue stays as bug. Create a new issue as improvement with the new configuration param. This will make it quite clear. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SUREFIRE-1302) Surefire does not wait long enough for the forked VM and assumes it to be dead
[ https://issues.apache.org/jira/browse/SUREFIRE-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15656928#comment-15656928 ] Yuriy Zaplavnov commented on SUREFIRE-1302: --- Thanks for your assistance! Just renamed the issue and changed the type of the issue. > Surefire does not wait long enough for the forked VM and assumes it to be dead > -- > > Key: SUREFIRE-1302 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1302 > Project: Maven Surefire > Issue Type: Request > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Yuriy Zaplavnov > > This issue happens because surefire kills the forked container if it times > out waiting for the 'ping'. > In org.apache.maven.surefire.booter.ForkedBooter class there is hardcoded > constant PING_TIMEOUT_IN_SECONDS = 20 which is used in the following method: > {code} > private static ScheduledFuture listenToShutdownCommands( CommandReader > reader ) > { > reader.addShutdownListener( createExitHandler( reader ) ); > AtomicBoolean pingDone = new AtomicBoolean( true ); > reader.addNoopListener( createPingHandler( pingDone ) ); > return JVM_TERMINATOR.scheduleAtFixedRate( createPingJob( pingDone, > reader ), >0,PING_TIMEOUT_IN_SECONDS, > SECONDS ); > } > {code} > to create ScheduledFuture. > In some of the cases the forked container might respond a bit later than it's > expected and surefire kills it > {code} > private static Runnable createPingJob( final AtomicBoolean pingDone, final > CommandReader reader ) > { > return new Runnable() > { > public void run() > { > boolean hasPing = pingDone.getAndSet( false ); > if ( !hasPing ) > { > exit( 1, KILL, reader, true ); > } > } > }; > } > {code} > As long as we need to terminate it anyway, It would be really helpful if the > problem could be solved making the PING_TIMEOUT_IN_SECONDS configurable with > the ability to specify the value from maven-surefire-plugin. > It would help to configure this timeout based on needs and factors of the > projects where surefire runs. -- This message was sent by Atlassian JIRA (v6.3.4#6332)