Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Hudson » Can't really kill a job
Can't really kill a job [message #1389209] Fri, 27 June 2014 13:44 Go to next message
Fabrizio Giudici is currently offline Fabrizio GiudiciFriend
Messages: 21
Registered: May 2013
Location: Italy
Junior Member
Dear all,

a customer of mine would like to use Hudson to start/stop a simple application used for testing. The application generates some random traffic to exercise a webapp under test. It is basically a main() which sets up some java.util.Timer's. The application is normally launched from the command line and runs forever, until it is stopped with Ctrl^C.

We configured a Hudson job to run it, with the idea that pressing the red stop button would quit the test. But this just doesn't happen. The application is run by means of Maven exec plugin. I first tried exec:java, then exec:exec, to be sure that a new JVM is spawned independently of Maven. But the end result doesn't change: Hudson declares that the job is stopped, but I can still see it running in the list of active processes, and it needs to be manually killed. I frankly don't understand what's happening... We even installed a shutdownhook to explicitly kill the timers (even though I wouldn't understand why this is needed), but the hook is never called.

The thing happens on Windows 2008 R2, JDK 1.7.0_45. Maven is launched by means of the embedded support in Hudson.

Thanks.


Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."

[Updated on: Fri, 27 June 2014 13:45]

Report message to a moderator

Re: Can't really kill a job [message #1389371 is a reply to message #1389209] Fri, 27 June 2014 18:09 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 496
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Are you using maven3 plugin and "invoke Maven 3" in the builders list. If not I would recommend that. Using advanced settings you can do more flexible things.

When a build is stopped, Hudson gathers all the native processes started for a particular build (both in the master and slave) and kills them using native method calls.

Windows is notorious for holding on to processes. Is it possible to use Process Explorer to get details of what is holding on to the process.



Winston Prakash
Eclipse Hudson team
Re: Can't really kill a job [message #1403190 is a reply to message #1389371] Tue, 22 July 2014 09:36 Go to previous message
Fabrizio Giudici is currently offline Fabrizio GiudiciFriend
Messages: 21
Registered: May 2013
Location: Italy
Junior Member
Quick follow-up, with some delay. The problem indeed seems to be related to the Maven 3 integration plugin, or Maven itself. I worked around it by selecting the option of running a Window script, and explicitly launched the Java application with all the options and required arguments. Now it works, in the sense that can be killed cleanly. I have to retry with a variant, by explicitly launch Java but running Maven instead of the application (I would benefit from the options and arguments that are defined in the POM).

Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."
Previous Topic:Review and accept pull request for subversion-plugin
Next Topic:Writing to Test-Result from REST-Assured-Log
Goto Forum:
  


Current Time: Wed Jul 01 13:07:22 GMT 2015

Powered by FUDForum. Page generated in 0.01912 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software