[Buildbot-devel] canceling a build?

Greg Ward gerg.ward+buildbot at gmail.com
Fri Feb 1 16:41:03 UTC 2008


On Jan 31, 2008 5:40 PM, john gale <john at smadness.com> wrote:
> I could have sworn that I saw somewhere a feature that allowed you to
> "cancel" a build step, or a builder in general.  But greping google
> and the manuals, I don't see anything obvious.
>
> Is there a way to allow canceling a buildstep?

The feature is there (at least with the patch in ticket #114), but it
does not work too well for complex builds on Linux.  (This seems to
depend on the particular signal semantics provided by the OS, so I
cannot speak for BSD or Solaris or what-have-you; I have only used
Buildbot on Linux and Windows.)

In particular, it appears to me that Buildbot only kills its immediate
child process; all of *its* children in turn keep running.  So if you
have a long-running build with lots of recursive "make" invocations,
such that your process tree looks like this:

  buildbot[pid 5322]
    make[pid 6436]
      make[pid 6537]
        make[pid 6539]
          make[pid 6542]
            gcc[pid 6543]

then when you "stop" a build, Buildbot only kills process 6436.  The
others keep running.

So far, the only reliable way I have found to kill a build running on
Linux is to kill the process group parented by Buildbot.  So in the
above case, you would login the slave host and run

  $ kill -TERM -5322

Note that negative process ID: that means kill every process in the
process group 5322.  (I believe that's System V signal semantics,
which Linux implements.  No clue what modern BSD systems do.)

Greg




More information about the devel mailing list