You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2019/11/12 09:50:07 UTC

[maven-surefire] branch SUREFIRE-1631 updated (17cf2e3 -> a2f0cdb)

This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a change to branch SUREFIRE-1631
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git.


 discard 17cf2e3  [SUREFIRE-1631] Forked VM terminated without properly saying goodbye with AciveMQ
     new 854432c  [SUREFIRE-1631] Forked VM terminated without properly saying goodbye with AciveMQ
     new a2f0cdb  temporarily skippedITs

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (17cf2e3)
            \
             N -- N -- N   refs/heads/SUREFIRE-1631 (a2f0cdb)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Jenkinsfile                                                |  2 +-
 .../java/org/apache/maven/surefire/booter/PpidChecker.java | 14 +++++++++-----
 2 files changed, 10 insertions(+), 6 deletions(-)


[maven-surefire] 02/02: temporarily skippedITs

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch SUREFIRE-1631
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit a2f0cdbd3a0e3ec63eb76724f58cc41ce7b872ed
Author: tibordigana <ti...@apache.org>
AuthorDate: Tue Nov 12 10:49:26 2019 +0100

    temporarily skippedITs
---
 Jenkinsfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 1811100..8b225e2 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -35,7 +35,7 @@ final def mavens = env.BRANCH_NAME == 'master' ? ['3.6.x', '3.2.x'] : ['3.6.x']
 // all non-EOL versions and the first EA
 final def jdks = [14, 13, 11, 8, 7]
 
-final def options = ['-e', '-V', '-B', '-nsu', '-P', 'run-its']
+final def options = ['-e', '-V', '-B', '-nsu', '-P', 'run-its', '-DskipITs']
 final def goals = ['clean', 'install']
 final def goalsDepl = ['clean', 'deploy', 'jacoco:report']
 final Map stages = [:]


[maven-surefire] 01/02: [SUREFIRE-1631] Forked VM terminated without properly saying goodbye with AciveMQ

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch SUREFIRE-1631
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 854432c0e570224216eda9d6366920abddf2827c
Author: tibordigana <ti...@apache.org>
AuthorDate: Tue Nov 12 04:32:32 2019 +0100

    [SUREFIRE-1631] Forked VM terminated without properly saying goodbye with AciveMQ
---
 .../apache/maven/surefire/booter/PpidChecker.java  | 59 ++++++++++++++--------
 1 file changed, 38 insertions(+), 21 deletions(-)

diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java
index 3b5a007..c55ac36 100644
--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java
+++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java
@@ -68,6 +68,8 @@ final class PpidChecker
     private static final String RELATIVE_PATH_TO_WMIC = "System32\\Wbem";
     private static final String SYSTEM_PATH_TO_WMIC =
             "%" + WINDOWS_SYSTEM_ROOT_ENV + "%\\" + RELATIVE_PATH_TO_WMIC + "\\";
+    private static final String PS_ETIME_HEADER = "ELAPSED";
+    private static final String PS_PID_HEADER = "PID";
 
     private final Queue<Process> destroyableCommands = new ConcurrentLinkedQueue<>();
 
@@ -83,6 +85,7 @@ final class PpidChecker
 
     private volatile ProcessInfo parentProcessInfo;
     private volatile boolean stopped;
+    private volatile boolean isFirstCheckFailed;
 
     PpidChecker( @Nonnull String ppid )
     {
@@ -91,7 +94,7 @@ final class PpidChecker
 
     boolean canUse()
     {
-        if ( isStopped() )
+        if ( isStopped() || isFirstCheckFailed )
         {
             return false;
         }
@@ -121,8 +124,10 @@ final class PpidChecker
             checkProcessInfo();
 
             // let's compare creation time, should be same unless killed or PID is reused by OS into another process
-            return !parentProcessInfo.isInvalid()
+            boolean isAlive = !parentProcessInfo.isInvalid()
                     && ( previousInfo == null || parentProcessInfo.isTimeEqualTo( previousInfo ) );
+            isFirstCheckFailed = previousInfo == null && !isAlive;
+            return isAlive;
         }
         else if ( IS_OS_UNIX )
         {
@@ -130,8 +135,10 @@ final class PpidChecker
             checkProcessInfo();
 
             // let's compare elapsed time, should be greater or equal if parent process is the same and still alive
-            return !parentProcessInfo.isInvalid()
+            boolean isAlive = !parentProcessInfo.isInvalid()
                     && ( previousInfo == null || !parentProcessInfo.isTimeBefore( previousInfo ) );
+            isFirstCheckFailed = previousInfo == null && !isAlive;
+            return isAlive;
         }
         parentProcessInfo = ERR_PROCESS_INFO;
         throw new IllegalStateException( "unknown platform or you did not call canUse() before isProcessAlive()" );
@@ -168,20 +175,27 @@ final class PpidChecker
             {
                 if ( previousOutputLine.isInvalid() )
                 {
-                    Matcher matcher = UNIX_CMD_OUT_PATTERN.matcher( line );
-                    if ( matcher.matches() && ppid.equals( fromPID( matcher ) ) )
+                    if ( hasHeader )
                     {
-                        long pidUptime = fromDays( matcher )
-                                                 + fromHours( matcher )
-                                                 + fromMinutes( matcher )
-                                                 + fromSeconds( matcher );
-                        return unixProcessInfo( ppid, pidUptime );
+                        Matcher matcher = UNIX_CMD_OUT_PATTERN.matcher( line );
+                        if ( matcher.matches() && ppid.equals( fromPID( matcher ) ) )
+                        {
+                            long pidUptime = fromDays( matcher )
+                                                     + fromHours( matcher )
+                                                     + fromMinutes( matcher )
+                                                     + fromSeconds( matcher );
+                            return unixProcessInfo( ppid, pidUptime );
+                        }
+                        matcher = BUSYBOX_CMD_OUT_PATTERN.matcher( line );
+                        if ( matcher.matches() && ppid.equals( fromBusyboxPID( matcher ) ) )
+                        {
+                            long pidUptime = fromBusyboxHours( matcher ) + fromBusyboxMinutes( matcher );
+                            return unixProcessInfo( ppid, pidUptime );
+                        }
                     }
-                    matcher = BUSYBOX_CMD_OUT_PATTERN.matcher( line );
-                    if ( matcher.matches() && ppid.equals( fromBusyboxPID( matcher ) ) )
+                    else
                     {
-                        long pidUptime = fromBusyboxHours( matcher ) + fromBusyboxMinutes( matcher );
-                        return unixProcessInfo( ppid, pidUptime );
+                        hasHeader = line.contains( PS_ETIME_HEADER ) && line.contains( PS_PID_HEADER );
                     }
                 }
                 return previousOutputLine;
@@ -195,8 +209,6 @@ final class PpidChecker
     {
         ProcessInfoConsumer reader = new ProcessInfoConsumer( "US-ASCII" )
         {
-            private boolean hasHeader;
-
             @Override
             @Nonnull
             ProcessInfo consumeLine( String line, ProcessInfo previousProcessInfo ) throws Exception
@@ -372,6 +384,8 @@ final class PpidChecker
     {
         private final String charset;
 
+        boolean hasHeader;
+
         ProcessInfoConsumer( String charset )
         {
             this.charset = charset;
@@ -409,15 +423,18 @@ final class PpidChecker
                     DumpErrorSingleton.getSingleton()
                             .dumpText( out.toString() );
                 }
-                return isStopped() ? ERR_PROCESS_INFO : exitCode == 0 ? processInfo : INVALID_PROCESS_INFO;
+                return isStopped() ? ERR_PROCESS_INFO : ( exitCode == 0 ? processInfo : INVALID_PROCESS_INFO );
             }
             catch ( Exception e )
             {
-                DumpErrorSingleton.getSingleton()
-                        .dumpText( out.toString() );
+                if ( !( e instanceof InterruptedException ) && !( e.getCause() instanceof InterruptedException ) )
+                {
+                    DumpErrorSingleton.getSingleton()
+                            .dumpText( out.toString() );
 
-                DumpErrorSingleton.getSingleton()
-                        .dumpException( e );
+                    DumpErrorSingleton.getSingleton()
+                            .dumpException( e );
+                }
 
                 return ERR_PROCESS_INFO;
             }