On 07/17/2012 05:02 AM, Michael wrote:
What I would like to happen is that a pre-abort action be triggered, for example run jstack on all the java processes.
This would be a nice enhancement for the Build Timeout plugin. For example, using [1] it is possible (on JDK 6+) to obtain rich diagnostics on Java processes being run as part of the current build (hudson.util.ProcessTree), assuming the processes are still live enough to respond to this protocol (same as jstack) and not hung in JVM native code.
[1] http://docs.oracle.com/javase/6/docs/jdk/api/attach/spec/com/sun/tools/attach/VirtualMachine.html#loadAgent(java.lang.String, java.lang.String)