views:

673

answers:

1

We have an automated build, managed by Hudson (1.312), that's got a few layers. On the slaves:

  • codewarrior cc/ld and other tools (some in-house), run by
  • a few recursive Cygwin GNU make 3.81 instances, run by
  • Hudson "execute windows batch command" (so cmd.exe running a batch file that hudson creates, as near as I can tell), run by
  • Hudson service, running as a domain user (not LocalService), started on
  • a Windows XP (32-bit) machine

The master is an OSX machine running a stock Tomcat.

The problem: the "cancel build" button (little red X that leads to a "stop" URL) doesn't take out make or any of its subprocesses. As far as the Hudson UI is concerned, the job stopped successfully, but there are still make.exe and cc/ld processes running. This can cause serious problems if the build starts again in the same workspace.

Is there a "best practice" for getting all of these processes to shut down?

(Before anyone suggests a less Frankensteinian build management framework like ant, jam, maven, etc -- we're migrating to jam, somewhat successfully! While we're getting the kinks sorted out, we need to have builds killable on the current system, though.)

+5  A: 

This is likely a bug, and we need to diagnosis this problem. Can you file this in the issue tracker please?

Kohsuke Kawaguchi
Sure thing. I'll work something up tomorrow hopefully; I have some Sysinternals procexp and procmon info that may be useful to include.
leander
Kohsuke, I'm working on a bazaar scm plugin for hudson, and I have a similar problem. Is there no way to listen for the cancel event? There by allowing the plugin to do some clean up work. Maybe and addListener method to the SCM class?
Craig
Your plugin gets a InterruptedException if the user cancels a build. Use that as a cue to do some clean up work.
Kohsuke Kawaguchi
Of course I can't get it to repro anymore; may have been the update from 1.312 to 1.315. I'll keep in touch and use the issue tracker if it pops up again -- thank you very much for responding!
leander
Kohsuke, thanks will make use of that.
Craig