Sorting through my e-mail, I find 18 build failures since Aug 29 up until Oct 13 that looked something like this:
Test: testChrome
Class: org.openqa.selenium.ServerTestSuite
java.lang.IllegalThreadStateException: process hasn't exited
at java.lang.UNIXProcess.exitValue(UNIXProcess.java:172)
at org.openqa.selenium.server.browserlaunchers.AsyncExecute.waitForProcessDeath(AsyncExecute.java:108)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.close(FirefoxChromeLauncher.java:188)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:51)
at org.openqa.selenium.server.HTMLRunnerTestBase.runHTMLSuite(HTMLRunnerTestBase.java:58)
at org.openqa.selenium.server.LinuxHTMLRunnerTest.testChrome(LinuxHTMLRunnerTest.java:14)
That ain't good, because the call to waitForProcessDeath comes immediately after a call to process.destroy()! This seems to only happen on Linux, and apparently only with Firefox.
It's not obvious what we can do about this, other than adding in a facility to support killing the process more directly using "kill -9". The trouble with that is that we don't know the PID of the process in question, and "ps" syntax can vary a great deal from Unix-to-Unix. (We have a similar facility available on Windows, though we have it disabled right now because it wasn't reliable across various versions of Windows.)
Actually, there's some great tips about PID management here in this bug re: System.getPID:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4244896
The most interesting tips:
1) UnixProcess contains a private member variable that contains the pid; you just need to modify its accessibility.
2) You can use this trick to get the PID: ManagementFactory.getRuntimeMXBean().getName()
(though there's often other stuff in the runtime MX bean name, including the hostname, that you'll need to strip out)