You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Olivier Grisel (JIRA)" <ji...@apache.org> on 2011/02/14 12:08:57 UTC

[jira] Created: (STANBOL-84) The integration test harness is leaking running JVM processes

The integration test harness is leaking running JVM processes
-------------------------------------------------------------

                 Key: STANBOL-84
                 URL: https://issues.apache.org/jira/browse/STANBOL-84
             Project: Stanbol
          Issue Type: Bug
            Reporter: Olivier Grisel
            Priority: Critical


At least on my machine, after a successful run of "mvn clean install" from the top-level stanbol folder I get:

    $ ps aux | grep integration-tests | grep -v grep
    ogrisel  10603 11.5  6.0 1108056 481348 pts/1  Sl   12:03   0:18 java -Xmx512m -jar /home/ogrisel/coding/stanbol-svn/enhancer/integration-tests/target/dependency/org.apache.stanbol.enhancer.launchers.full-0.9-SNAPSHOT.jar -p 51738


This is an inconvenience for the individual developers to have to kill the JVMs manually but would also be a major service disruption if this is happening on the ASF Hudson slaves, hence the critical level. If for whatever reason this is not happening on the Hudson slaves, we can downgrade this issue to minor.

I don't seem to have the rights to ssh into the slave to check myself.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (STANBOL-84) The integration test harness is leaking running JVM processes

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994275#comment-12994275 ] 

Bertrand Delacretaz commented on STANBOL-84:
--------------------------------------------

Cannot reproduce on my macosx system, but it looks like the child process' output was not read.

Can you try again with revision 1070468 ? Rebuilding commons/testing/jarexec and enhancer/integration-tests should be sufficient.

> The integration test harness is leaking running JVM processes
> -------------------------------------------------------------
>
>                 Key: STANBOL-84
>                 URL: https://issues.apache.org/jira/browse/STANBOL-84
>             Project: Stanbol
>          Issue Type: Bug
>            Reporter: Olivier Grisel
>            Priority: Critical
>
> At least on my machine, after a successful run of "mvn clean install" from the top-level stanbol folder I get:
>     $ ps aux | grep integration-tests | grep -v grep
>     ogrisel  10603 11.5  6.0 1108056 481348 pts/1  Sl   12:03   0:18 java -Xmx512m -jar /home/ogrisel/coding/stanbol-svn/enhancer/integration-tests/target/dependency/org.apache.stanbol.enhancer.launchers.full-0.9-SNAPSHOT.jar -p 51738
> This is an inconvenience for the individual developers to have to kill the JVMs manually but would also be a major service disruption if this is happening on the ASF Hudson slaves, hence the critical level. If for whatever reason this is not happening on the Hudson slaves, we can downgrade this issue to minor.
> I don't seem to have the rights to ssh into the slave to check myself.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (STANBOL-84) The integration test harness is leaking running JVM processes

Posted by "Olivier Grisel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994329#comment-12994329 ] 

Olivier Grisel commented on STANBOL-84:
---------------------------------------

FYI:

$ mvn --version
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_22
Java home: /usr/lib/jvm/java-6-sun-1.6.0.22/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.35-25-generic" arch: "amd64" Family: "unix"


> The integration test harness is leaking running JVM processes
> -------------------------------------------------------------
>
>                 Key: STANBOL-84
>                 URL: https://issues.apache.org/jira/browse/STANBOL-84
>             Project: Stanbol
>          Issue Type: Bug
>            Reporter: Olivier Grisel
>            Priority: Critical
>
> At least on my machine, after a successful run of "mvn clean install" from the top-level stanbol folder I get:
>     $ ps aux | grep integration-tests | grep -v grep
>     ogrisel  10603 11.5  6.0 1108056 481348 pts/1  Sl   12:03   0:18 java -Xmx512m -jar /home/ogrisel/coding/stanbol-svn/enhancer/integration-tests/target/dependency/org.apache.stanbol.enhancer.launchers.full-0.9-SNAPSHOT.jar -p 51738
> This is an inconvenience for the individual developers to have to kill the JVMs manually but would also be a major service disruption if this is happening on the ASF Hudson slaves, hence the critical level. If for whatever reason this is not happening on the Hudson slaves, we can downgrade this issue to minor.
> I don't seem to have the rights to ssh into the slave to check myself.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (STANBOL-84) The integration test harness is leaking running JVM processes

Posted by "Olivier Grisel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STANBOL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Grisel resolved STANBOL-84.
-----------------------------------

    Resolution: Fixed
      Assignee: Olivier Grisel

I abandon the idea of Shutting down the subprocess in a @AfterClass call on the abstract base class since this would implying stopping an restarting new instances of stanbol for each subclass of StanbolTestBase. This would slow increase the overall tests duration a lot for very little additional value.

> The integration test harness is leaking running JVM processes
> -------------------------------------------------------------
>
>                 Key: STANBOL-84
>                 URL: https://issues.apache.org/jira/browse/STANBOL-84
>             Project: Stanbol
>          Issue Type: Bug
>            Reporter: Olivier Grisel
>            Assignee: Olivier Grisel
>            Priority: Minor
>
> At least on my machine, after a successful run of "mvn clean install" from the top-level stanbol folder I get:
>     $ ps aux | grep integration-tests | grep -v grep
>     ogrisel  10603 11.5  6.0 1108056 481348 pts/1  Sl   12:03   0:18 java -Xmx512m -jar /home/ogrisel/coding/stanbol-svn/enhancer/integration-tests/target/dependency/org.apache.stanbol.enhancer.launchers.full-0.9-SNAPSHOT.jar -p 51738
> This is an inconvenience for the individual developers to have to kill the JVMs manually but would also be a major service disruption if this is happening on the ASF Hudson slaves, hence the critical level. If for whatever reason this is not happening on the Hudson slaves, we can downgrade this issue to minor.
> I don't seem to have the rights to ssh into the slave to check myself.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (STANBOL-84) The integration test harness is leaking running JVM processes

Posted by "Olivier Grisel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994332#comment-12994332 ] 

Olivier Grisel commented on STANBOL-84:
---------------------------------------

Also I am reading the StanbolTestBase code and I think it would be cleaner to stop the subprocess in a @AfterClass annotated static method. That would mean we would have to store the executor instance as static field of the base class and hence we would have to make sure that all the deriving classes of this base class are not run in concurrent threads in the same JVM.

> The integration test harness is leaking running JVM processes
> -------------------------------------------------------------
>
>                 Key: STANBOL-84
>                 URL: https://issues.apache.org/jira/browse/STANBOL-84
>             Project: Stanbol
>          Issue Type: Bug
>            Reporter: Olivier Grisel
>            Priority: Critical
>
> At least on my machine, after a successful run of "mvn clean install" from the top-level stanbol folder I get:
>     $ ps aux | grep integration-tests | grep -v grep
>     ogrisel  10603 11.5  6.0 1108056 481348 pts/1  Sl   12:03   0:18 java -Xmx512m -jar /home/ogrisel/coding/stanbol-svn/enhancer/integration-tests/target/dependency/org.apache.stanbol.enhancer.launchers.full-0.9-SNAPSHOT.jar -p 51738
> This is an inconvenience for the individual developers to have to kill the JVMs manually but would also be a major service disruption if this is happening on the ASF Hudson slaves, hence the critical level. If for whatever reason this is not happening on the Hudson slaves, we can downgrade this issue to minor.
> I don't seem to have the rights to ssh into the slave to check myself.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (STANBOL-84) The integration test harness is leaking running JVM processes

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994301#comment-12994301 ] 

Bertrand Delacretaz commented on STANBOL-84:
--------------------------------------------

I don't have shell access to the ubuntu1 and 2 build nodes, I have informed builds@apache.org of this issue.

> The integration test harness is leaking running JVM processes
> -------------------------------------------------------------
>
>                 Key: STANBOL-84
>                 URL: https://issues.apache.org/jira/browse/STANBOL-84
>             Project: Stanbol
>          Issue Type: Bug
>            Reporter: Olivier Grisel
>            Priority: Critical
>
> At least on my machine, after a successful run of "mvn clean install" from the top-level stanbol folder I get:
>     $ ps aux | grep integration-tests | grep -v grep
>     ogrisel  10603 11.5  6.0 1108056 481348 pts/1  Sl   12:03   0:18 java -Xmx512m -jar /home/ogrisel/coding/stanbol-svn/enhancer/integration-tests/target/dependency/org.apache.stanbol.enhancer.launchers.full-0.9-SNAPSHOT.jar -p 51738
> This is an inconvenience for the individual developers to have to kill the JVMs manually but would also be a major service disruption if this is happening on the ASF Hudson slaves, hence the critical level. If for whatever reason this is not happening on the Hudson slaves, we can downgrade this issue to minor.
> I don't seem to have the rights to ssh into the slave to check myself.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (STANBOL-84) The integration test harness is leaking running JVM processes

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994351#comment-12994351 ] 

Bertrand Delacretaz commented on STANBOL-84:
--------------------------------------------

I don't get the above exception, I get


Tests run: 5, Failures: 0, Errors: 0, Skipped: 0

14416 [Thread-7] ERROR org.apache.stanbol.commons.testing.jarexec.JarExecutor - Process execution failed:org.apache.commons.exec.ExecuteException: Process exited with an error: 143 (Exit value: 143)
...

Which is correct AFAIU, 143 means the process received a SIGTERM.

Anyway the problem might be related to a timing issue, so your proposal of adding a stop() method to JarExecutor and calling it explicitly from StanbolTestBase looks like a good idea.

> The integration test harness is leaking running JVM processes
> -------------------------------------------------------------
>
>                 Key: STANBOL-84
>                 URL: https://issues.apache.org/jira/browse/STANBOL-84
>             Project: Stanbol
>          Issue Type: Bug
>            Reporter: Olivier Grisel
>            Priority: Critical
>
> At least on my machine, after a successful run of "mvn clean install" from the top-level stanbol folder I get:
>     $ ps aux | grep integration-tests | grep -v grep
>     ogrisel  10603 11.5  6.0 1108056 481348 pts/1  Sl   12:03   0:18 java -Xmx512m -jar /home/ogrisel/coding/stanbol-svn/enhancer/integration-tests/target/dependency/org.apache.stanbol.enhancer.launchers.full-0.9-SNAPSHOT.jar -p 51738
> This is an inconvenience for the individual developers to have to kill the JVMs manually but would also be a major service disruption if this is happening on the ASF Hudson slaves, hence the critical level. If for whatever reason this is not happening on the Hudson slaves, we can downgrade this issue to minor.
> I don't seem to have the rights to ssh into the slave to check myself.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (STANBOL-84) The integration test harness is leaking running JVM processes

Posted by "Olivier Grisel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994353#comment-12994353 ] 

Olivier Grisel commented on STANBOL-84:
---------------------------------------

I am currently experimenting using the sl4j log that displays the thread ids and removing static fields (turning them into instance fields). This might be the cause of the problem: the tests seem to be run concurrently on my machine (at least with maven, not in eclipse).

> The integration test harness is leaking running JVM processes
> -------------------------------------------------------------
>
>                 Key: STANBOL-84
>                 URL: https://issues.apache.org/jira/browse/STANBOL-84
>             Project: Stanbol
>          Issue Type: Bug
>            Reporter: Olivier Grisel
>            Priority: Critical
>
> At least on my machine, after a successful run of "mvn clean install" from the top-level stanbol folder I get:
>     $ ps aux | grep integration-tests | grep -v grep
>     ogrisel  10603 11.5  6.0 1108056 481348 pts/1  Sl   12:03   0:18 java -Xmx512m -jar /home/ogrisel/coding/stanbol-svn/enhancer/integration-tests/target/dependency/org.apache.stanbol.enhancer.launchers.full-0.9-SNAPSHOT.jar -p 51738
> This is an inconvenience for the individual developers to have to kill the JVMs manually but would also be a major service disruption if this is happening on the ASF Hudson slaves, hence the critical level. If for whatever reason this is not happening on the Hudson slaves, we can downgrade this issue to minor.
> I don't seem to have the rights to ssh into the slave to check myself.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (STANBOL-84) The integration test harness is leaking running JVM processes

Posted by "Olivier Grisel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994283#comment-12994283 ] 

Olivier Grisel commented on STANBOL-84:
---------------------------------------

I confirm that I still have the issue with 1070468 . I will try to investigate further. Can you check that this is not happening on Hudson nodes?

> The integration test harness is leaking running JVM processes
> -------------------------------------------------------------
>
>                 Key: STANBOL-84
>                 URL: https://issues.apache.org/jira/browse/STANBOL-84
>             Project: Stanbol
>          Issue Type: Bug
>            Reporter: Olivier Grisel
>            Priority: Critical
>
> At least on my machine, after a successful run of "mvn clean install" from the top-level stanbol folder I get:
>     $ ps aux | grep integration-tests | grep -v grep
>     ogrisel  10603 11.5  6.0 1108056 481348 pts/1  Sl   12:03   0:18 java -Xmx512m -jar /home/ogrisel/coding/stanbol-svn/enhancer/integration-tests/target/dependency/org.apache.stanbol.enhancer.launchers.full-0.9-SNAPSHOT.jar -p 51738
> This is an inconvenience for the individual developers to have to kill the JVMs manually but would also be a major service disruption if this is happening on the ASF Hudson slaves, hence the critical level. If for whatever reason this is not happening on the Hudson slaves, we can downgrade this issue to minor.
> I don't seem to have the rights to ssh into the slave to check myself.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (STANBOL-84) The integration test harness is leaking running JVM processes

Posted by "Olivier Grisel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994332#comment-12994332 ] 

Olivier Grisel edited comment on STANBOL-84 at 2/14/11 3:08 PM:
----------------------------------------------------------------

Also I am reading the StanbolTestBase code and I think it would be cleaner to stop the subprocess in a @AfterClass annotated static method. That would mean we would have to store the executor instance as static field of the base class and hence we would have to make sure that all the deriving classes of this base class are not run in concurrent threads in the same JVM.

WDYT?

      was (Author: ogrisel):
    Also I am reading the StanbolTestBase code and I think it would be cleaner to stop the subprocess in a @AfterClass annotated static method. That would mean we would have to store the executor instance as static field of the base class and hence we would have to make sure that all the deriving classes of this base class are not run in concurrent threads in the same JVM.
  
> The integration test harness is leaking running JVM processes
> -------------------------------------------------------------
>
>                 Key: STANBOL-84
>                 URL: https://issues.apache.org/jira/browse/STANBOL-84
>             Project: Stanbol
>          Issue Type: Bug
>            Reporter: Olivier Grisel
>            Priority: Critical
>
> At least on my machine, after a successful run of "mvn clean install" from the top-level stanbol folder I get:
>     $ ps aux | grep integration-tests | grep -v grep
>     ogrisel  10603 11.5  6.0 1108056 481348 pts/1  Sl   12:03   0:18 java -Xmx512m -jar /home/ogrisel/coding/stanbol-svn/enhancer/integration-tests/target/dependency/org.apache.stanbol.enhancer.launchers.full-0.9-SNAPSHOT.jar -p 51738
> This is an inconvenience for the individual developers to have to kill the JVMs manually but would also be a major service disruption if this is happening on the ASF Hudson slaves, hence the critical level. If for whatever reason this is not happening on the Hudson slaves, we can downgrade this issue to minor.
> I don't seem to have the rights to ssh into the slave to check myself.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (STANBOL-84) The integration test harness is leaking running JVM processes

Posted by "Olivier Grisel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STANBOL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Grisel updated STANBOL-84:
----------------------------------

    Priority: Minor  (was: Critical)

By protecting the StanbolTestCase init against concurrent classloading it seems that I no longer get leaked processes. Hence I downgrade the level to minor. I will try to further implement the early subprocess stopping in @AfterClass if not too complicated to implement.

> The integration test harness is leaking running JVM processes
> -------------------------------------------------------------
>
>                 Key: STANBOL-84
>                 URL: https://issues.apache.org/jira/browse/STANBOL-84
>             Project: Stanbol
>          Issue Type: Bug
>            Reporter: Olivier Grisel
>            Priority: Minor
>
> At least on my machine, after a successful run of "mvn clean install" from the top-level stanbol folder I get:
>     $ ps aux | grep integration-tests | grep -v grep
>     ogrisel  10603 11.5  6.0 1108056 481348 pts/1  Sl   12:03   0:18 java -Xmx512m -jar /home/ogrisel/coding/stanbol-svn/enhancer/integration-tests/target/dependency/org.apache.stanbol.enhancer.launchers.full-0.9-SNAPSHOT.jar -p 51738
> This is an inconvenience for the individual developers to have to kill the JVMs manually but would also be a major service disruption if this is happening on the ASF Hudson slaves, hence the critical level. If for whatever reason this is not happening on the Hudson slaves, we can downgrade this issue to minor.
> I don't seem to have the rights to ssh into the slave to check myself.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (STANBOL-84) The integration test harness is leaking running JVM processes

Posted by "Olivier Grisel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994328#comment-12994328 ] 

Olivier Grisel commented on STANBOL-84:
---------------------------------------

I have made the JarExecutor log the exception when trying to shutdown the subprocess. Here is what I get when running "mvn clean install" in the stanbol/enhancer/integrations-tests source folder:

21147 [Thread-7] ERROR org.apache.stanbol.commons.testing.jarexec.JarExecutor - Process execution failed:org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.lang.IllegalStateException: Shutdown in progress)
org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.lang.IllegalStateException: Shutdown in progress)
	at org.apache.commons.exec.DefaultExecutor$1.run(DefaultExecutor.java:193)
Caused by: java.lang.IllegalStateException: Shutdown in progress
	at java.lang.ApplicationShutdownHooks.add(ApplicationShutdownHooks.java:39)
	at java.lang.Runtime.addShutdownHook(Runtime.java:192)
	at org.apache.commons.exec.ShutdownHookProcessDestroyer.addShutdownHook(ShutdownHookProcessDestroyer.java:82)
	at org.apache.commons.exec.ShutdownHookProcessDestroyer.add(ShutdownHookProcessDestroyer.java:141)
	at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:336)
	at org.apache.commons.exec.DefaultExecutor.access$200(DefaultExecutor.java:46)
	at org.apache.commons.exec.DefaultExecutor$1.run(DefaultExecutor.java:188)
[INFO] [jar:jar {execution: default-jar}]

Even though the the build is marked as SUCCESSFUL later. Can't you reproduce this behavior?


> The integration test harness is leaking running JVM processes
> -------------------------------------------------------------
>
>                 Key: STANBOL-84
>                 URL: https://issues.apache.org/jira/browse/STANBOL-84
>             Project: Stanbol
>          Issue Type: Bug
>            Reporter: Olivier Grisel
>            Priority: Critical
>
> At least on my machine, after a successful run of "mvn clean install" from the top-level stanbol folder I get:
>     $ ps aux | grep integration-tests | grep -v grep
>     ogrisel  10603 11.5  6.0 1108056 481348 pts/1  Sl   12:03   0:18 java -Xmx512m -jar /home/ogrisel/coding/stanbol-svn/enhancer/integration-tests/target/dependency/org.apache.stanbol.enhancer.launchers.full-0.9-SNAPSHOT.jar -p 51738
> This is an inconvenience for the individual developers to have to kill the JVMs manually but would also be a major service disruption if this is happening on the ASF Hudson slaves, hence the critical level. If for whatever reason this is not happening on the Hudson slaves, we can downgrade this issue to minor.
> I don't seem to have the rights to ssh into the slave to check myself.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira