[buildd-tools-devel] Bug#477936: [Buildd-tools-devel] Bug#477936: does not clean up sessions when interrupted

Roger Leigh rleigh at codelibre.net
Sun Oct 31 22:19:23 UTC 2010


On Fri, Apr 25, 2008 at 07:26:48PM +0400, martin f krafft wrote:
> If an sbuild gets interrupted, the session is not ended as no
> signals are trapped. sbuild should ensure that it cleans up any
> schroot sessions on exit, if it can in any way (as is the case for
> SIGINT).

The current sbuild (0.60.0/0.60.1) will end the session associated
with the current job, so from this POV the bug is now fixed.  It
also rm -rf's the build directory.

Now, while the bug (as reported) is not present in current sbuild's
it's open to debate whether the current signal handling is
adequate.  While we clean up the build dir and end the session,
we don't make /any/ attempt to leave the build chroot in a
consistent state.  We don't remove the build dependencies, and
we don't do any other cleanup, e.g. srcdep-lock removal.

If using snapshot-based schroot chroots, this is a non-issue:
the cleanup occured when the session ended.  For other types,
manual cleanup with e.g. debfoster is needed.  The chroot could
be broken if interrupting at other critical moments, e.g.
when running apt-get/dpkg.

So the question is: if the user requested termination, do we
terminate immediately, or do we do the cleanup necessary to
leave everything ready for a new build?  The cleanup could be
expensive and take a long time, especially on slow systems
where this might be part of the shutdown process.

In the common case of terminating during a build, I think we
cope fairly well, bar not removing the build-deps.  At other
points, termination is not a good plan.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20101031/6b7859f1/attachment.pgp>


More information about the Buildd-tools-devel mailing list