Ok so no need to push it on trunk then ;). BTW we should get in touch with infra to get thread stack in such a case instead of hacking it if we find time
Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-07-22 10:35 GMT+02:00 Andy Gumbrecht <[email protected]>: > Yes, was more of an experiment to see if this test would go further. Can > only do it on the buildbot, as I can't replicate it here. > > Andy. > > > On 22/07/2014 07:29, Romain Manni-Bucau wrote: > >> Sorry but -1000 >> >> Best way to leak processes and kill a CI machine (we did it) >> >> It is good to hang in this case since it shows explicitely the issue if >> there is one >> ---------- Message transféré ---------- >> De : <[email protected]> >> Date : 22 juil. 2014 00:45 >> Objet : svn commit: r1612434 - in /tomee/tomee/branches/tomee-1.7.x: >> container/openejb-core/src/main/java/org/apache/openejb/config/ maven/ >> maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/ >> maven/tomee-maven-plugin/src/test/java/org/apach... >> À : <[email protected]> >> >> Author: andygumbrecht >> Date: Mon Jul 21 23:45:28 2014 >> New Revision: 1612434 >> >> URL: http://svn.apache.org/r1612434 >> Log: >> Shutdown RemoteServer, but don't wait forever. >> >> Modified: >> >> tomee/tomee/branches/tomee-1.7.x/container/openejb-core/ >> src/main/java/org/apache/openejb/config/RemoteServer.java >> tomee/tomee/branches/tomee-1.7.x/maven/pom.xml >> >> tomee/tomee/branches/tomee-1.7.x/maven/tomee-maven-plugin/ >> src/main/java/org/apache/openejb/maven/plugin/AbstractTomEEMojo.java >> >> tomee/tomee/branches/tomee-1.7.x/maven/tomee-maven-plugin/ >> src/test/java/org/apache/openejb/maven/plugin/test/ >> TomEEMavenPluginTest.java >> >> Modified: >> tomee/tomee/branches/tomee-1.7.x/container/openejb-core/ >> src/main/java/org/apache/openejb/config/RemoteServer.java >> URL: >> http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1. >> 7.x/container/openejb-core/src/main/java/org/apache/ >> openejb/config/RemoteServer.java?rev=1612434&r1=1612433& >> r2=1612434&view=diff >> ============================================================ >> ================== >> --- >> tomee/tomee/branches/tomee-1.7.x/container/openejb-core/ >> src/main/java/org/apache/openejb/config/RemoteServer.java >> (original) >> +++ >> tomee/tomee/branches/tomee-1.7.x/container/openejb-core/ >> src/main/java/org/apache/openejb/config/RemoteServer.java >> Mon Jul 21 23:45:28 2014 >> @@ -24,7 +24,6 @@ import org.apache.openejb.util.Join; >> import org.apache.openejb.util.Pipe; >> >> import java.io.File; >> -import java.io.IOException; >> import java.io.OutputStream; >> import java.lang.reflect.Field; >> import java.net.InetSocketAddress; >> @@ -53,7 +52,7 @@ public class RemoteServer { >> public static final String START = "start"; >> public static final String STOP = "stop"; >> >> - private boolean debug = options.get(OPENEJB_SERVER_DEBUG, false); >> + private final boolean debug = options.get(OPENEJB_SERVER_DEBUG, >> false); >> private final boolean profile = options.get("openejb.server. >> profile", >> false); >> private final boolean tomcat; >> private final String javaOpts = System.getProperty("java.opts"); >> @@ -126,12 +125,29 @@ public class RemoteServer { >> } >> >> public void destroy() { >> + >> stop(); >> + >> if (server != null) { >> + final Process sp = server; >> + final Thread t = new Thread(new Runnable() { >> + @Override >> + public void run() { >> + try { >> + sp.waitFor(); >> + } catch (final InterruptedException e) { >> + // no-op >> + } >> + } >> + }, "RemoteServer-destroy"); >> + >> + t.start(); >> try { >> - server.waitFor(); >> + t.join(15000); >> } catch (final InterruptedException e) { >> - // no-op >> + //Ignore >> + } finally { >> + server.destroy(); >> } >> } >> } >> @@ -435,13 +451,11 @@ public class RemoteServer { >> } >> >> public void stop() { >> - if (!serverHasAlreadyBeenStarted) { >> - try { >> - shutdown(); >> - } catch (final Exception e) { >> - if (verbose) { >> - e.printStackTrace(System.err); >> - } >> + try { >> + shutdown(); >> + } catch (final Exception e) { >> + if (verbose && !serverHasAlreadyBeenStarted) { >> + e.printStackTrace(System.err); >> } >> } >> } >> @@ -487,7 +501,7 @@ public class RemoteServer { >> if (socket != null) { >> try { >> socket.close(); >> - } catch (final IOException e) { >> + } catch (final Exception e) { >> // Ignore >> } >> } >> >> Modified: tomee/tomee/branches/tomee-1.7.x/maven/pom.xml >> URL: >> http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1. >> 7.x/maven/pom.xml?rev=1612434&r1=1612433&r2=1612434&view=diff >> ============================================================ >> ================== >> --- tomee/tomee/branches/tomee-1.7.x/maven/pom.xml (original) >> +++ tomee/tomee/branches/tomee-1.7.x/maven/pom.xml Mon Jul 21 23:45:28 >> 2014 >> @@ -46,12 +46,12 @@ >> <dependency> >> <groupId>org.apache.maven.plugin-tools</groupId> >> <artifactId>maven-plugin-annotations</artifactId> >> - <version>3.1</version> >> + <version>3.3</version> >> </dependency> >> <dependency> >> <groupId>org.codehaus.plexus</groupId> >> <artifactId>plexus-utils</artifactId> >> - <version>3.0.1</version> >> + <version>3.0.17</version> >> </dependency> >> <dependency> >> <groupId>org.apache.maven</groupId> >> >> Modified: >> tomee/tomee/branches/tomee-1.7.x/maven/tomee-maven-plugin/ >> src/main/java/org/apache/openejb/maven/plugin/AbstractTomEEMojo.java >> URL: >> http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1. >> 7.x/maven/tomee-maven-plugin/src/main/java/org/apache/ >> openejb/maven/plugin/AbstractTomEEMojo.java?rev= >> 1612434&r1=1612433&r2=1612434&view=diff >> ============================================================ >> ================== >> --- >> tomee/tomee/branches/tomee-1.7.x/maven/tomee-maven-plugin/ >> src/main/java/org/apache/openejb/maven/plugin/AbstractTomEEMojo.java >> (original) >> +++ >> tomee/tomee/branches/tomee-1.7.x/maven/tomee-maven-plugin/ >> src/main/java/org/apache/openejb/maven/plugin/AbstractTomEEMojo.java >> Mon Jul 21 23:45:28 2014 >> @@ -652,7 +652,9 @@ public abstract class AbstractTomEEMojo >> + " <Connector port=\"" + tomeeHttpsPort + "\" >> protocol=\"HTTP/1.1\" SSLEnabled=\"true\"\n" + >> " scheme=\"https\" secure=\"true\"\n" + >> " clientAuth=\"false\" >> sslProtocol=\"TLS\" >> keystoreFile=\"" + keystoreFilePath + "\" />\n"); >> - } else if (tomeeHttpsPort == null) { >> + } >> + >> + if (tomeeHttpsPort == null) { >> // avoid NPE >> tomeeHttpsPort = 8443; >> } >> >> Modified: >> tomee/tomee/branches/tomee-1.7.x/maven/tomee-maven-plugin/ >> src/test/java/org/apache/openejb/maven/plugin/test/ >> TomEEMavenPluginTest.java >> URL: >> http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1. >> 7.x/maven/tomee-maven-plugin/src/test/java/org/apache/ >> openejb/maven/plugin/test/TomEEMavenPluginTest.java?rev= >> 1612434&r1=1612433&r2=1612434&view=diff >> ============================================================ >> ================== >> --- >> tomee/tomee/branches/tomee-1.7.x/maven/tomee-maven-plugin/ >> src/test/java/org/apache/openejb/maven/plugin/test/ >> TomEEMavenPluginTest.java >> (original) >> +++ >> tomee/tomee/branches/tomee-1.7.x/maven/tomee-maven-plugin/ >> src/test/java/org/apache/openejb/maven/plugin/test/ >> TomEEMavenPluginTest.java >> Mon Jul 21 23:45:28 2014 >> @@ -19,7 +19,6 @@ package org.apache.openejb.maven.plugin. >> import org.apache.openejb.loader.IO; >> import org.apache.openejb.maven.plugin.TomEEMavenPluginRule; >> import org.apache.openejb.maven.plugin.Url; >> -import org.junit.Ignore; >> import org.junit.Rule; >> import org.junit.Test; >> >> @@ -28,7 +27,6 @@ import java.net.URL; >> import static org.hamcrest.CoreMatchers.containsString; >> import static org.junit.Assert.assertThat; >> >> -@Ignore >> public class TomEEMavenPluginTest { >> @Rule >> public TomEEMavenPluginRule TMPRule = new TomEEMavenPluginRule(); >> >> > -- > Andy Gumbrecht > > http://www.tomitribe.com > [email protected] > https://twitter.com/AndyGeeDe > > TomEE treibt Tomitribe! | http://tomee.apache.org > >
