[ 
https://issues.apache.org/jira/browse/SUREFIRE-1239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15787670#comment-15787670
 ] 

ASF GitHub Bot commented on SUREFIRE-1239:
------------------------------------------

Github user jsdima commented on the issue:

    https://github.com/apache/maven-surefire/pull/137
  
    @Tibor17 
    
    >I am interested in this problem because as you said the plugin hangs. Why 
the plugin hanged, do you have explanation?
    
    It depends on a size of `private final BlockingQueue<String> items` 
    in `ThreadedStreamConsumer` at the moment when Exception happens and amount 
of tests output .
    
    Surefire plugin has 3 important threads when running tests in separate 
process:
    - `StreamPumper` thread which reads input from child process and put them 
to `items`, it finishes when there is no more input from child process
    - `ThreadedStreamConsumer.Pumper`thread which takes line from `items` and 
call `ForkClient`to process it
    - `Main` thread which awaits when `StreamPumper` finishes
    
    so when exception happens `ThreadedStreamConsumer.Pumper`thread ends, but  
`StreamPumper` still reads input and put in into `items`, but when size of 
`items` becomes bigger than `ITEM_LIMIT_BEFORE_SLEEP`, this thread starts sleep 
every iteration:
    
    ```java
            if ( items.size() > ITEM_LIMIT_BEFORE_SLEEP )
            {
                try
                {
                    Thread.sleep( 100 );
                }
                catch ( InterruptedException ignore )
                {
                }
            }
    ```
    
    > Did you run the build with your patch? It means mvn -P run-its install.
    
    Yes. The result:
    ```
    [INFO] 
------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO] 
    [INFO] Apache Maven Surefire .............................. SUCCESS [ 
10.423 s]
    [INFO] SureFire Logger API ................................ SUCCESS [  
3.082 s]
    [INFO] ShadeFire JUnit3 Provider .......................... SUCCESS [  
1.926 s]
    [INFO] SureFire API ....................................... SUCCESS [  
4.787 s]
    [INFO] SureFire Booter .................................... SUCCESS [  
2.016 s]
    [INFO] Maven Surefire Test-Grouping Support ............... SUCCESS [  
1.859 s]
    [INFO] SureFire Providers ................................. SUCCESS [  
0.650 s]
    [INFO] Shared JUnit3 Provider Code ........................ SUCCESS [  
0.870 s]
    [INFO] Shared Java 5 Provider Base ........................ SUCCESS [  
1.300 s]
    [INFO] Shared JUnit4 Provider Code ........................ SUCCESS [  
1.164 s]
    [INFO] Shared JUnit48 Provider Code ....................... SUCCESS [  
2.048 s]
    [INFO] SureFire JUnit Runner .............................. SUCCESS [  
0.857 s]
    [INFO] SureFire JUnit4 Runner ............................. SUCCESS [  
1.505 s]
    [INFO] Maven Surefire Common .............................. SUCCESS [  
7.801 s]
    [INFO] SureFire JUnitCore Runner .......................... SUCCESS [ 
51.535 s]
    [INFO] SureFire TestNG Utils .............................. SUCCESS [  
1.158 s]
    [INFO] SureFire TestNG Runner ............................. SUCCESS [  
1.222 s]
    [INFO] Surefire Report Parser ............................. SUCCESS [  
1.460 s]
    [INFO] Maven Surefire Plugin .............................. SUCCESS [  
5.049 s]
    [INFO] Maven Failsafe Plugin .............................. SUCCESS [ 
47.971 s]
    [INFO] Maven Surefire Report Plugin ....................... SUCCESS [  
8.128 s]
    [INFO] Maven Surefire Integration Test Setup .............. SUCCESS [  
9.125 s]
    [INFO] Maven Surefire Integration Tests ................... SUCCESS [47:52 
min]
    [INFO] 
------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] 
------------------------------------------------------------------------
    [INFO] Total time: 50:39 min
    [INFO] Finished at: 2016-12-30T14:34:19+03:00
    [INFO] Final Memory: 79M/1118M
    [INFO] 
------------------------------------------------------------------------
    ```
    
    > The issue [1] you pointed out happens after your fix or without it?
    
    before applying the fix


> ExecutionException java.lang.RuntimeException: 
> org.apache.maven.surefire.report.ReporterException: When writing xml report 
> stdout/stderr (No such file or directory)
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1239
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1239
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.19.1
>            Reporter: Yoram Michaeli
>            Assignee: Tibor Digana
>
> Getting the following exception every few builds:
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on 
> project publisher-console: ExecutionException java.lang.RuntimeException: 
> org.apache.maven.surefire.report.ReporterException: When writing xml report 
> stdout/stderr: /tmp/stdout9186853534312229181deferred (No such file or 
> directory) -> [Help 1]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to