← Back to team overview

launchpad-dev team mailing list archive

Re: Librarian won't start, sad panda

 

Jonathan Lange wrote:
> On Wed, Jan 19, 2011 at 11:14 AM, John Arbash Meinel
> <john@xxxxxxxxxxxxxxxxx> wrote:
> ...
> > Note that recently I've seen twistd failing to stop. Such that
> > SIGTERM/SIGINT just give a backtrace about "you can't stop a reactor
> > that isn't active". So you have to SIGKILL it.
> >
> > We were wondering if it was the upgrade to twisted 10.2, but it only
> > seemed to happen when we got other exceptions in twisted.
> >
> 
> Are you able to reliably reproduce the problem? If so, I'd be happy to
> help debug.

I can reproduce that traceback with
<lp:~spiv/launchpad/haproxy-for-twisted-services>.  If I 'make run_codehosting',
connect to the SSH port (e.g. just with telnet), then send SIGTERM to the
sftp.tac daemon twice, I see it.

The first SIGTERM starts shutting down the daemon, but that has a
twisted.application.service.Service that doesn't stop immediately.  My
suspicion is that a second attempt to start a shutdown causes the traceback,
because the reactor is in an unusual state: not running, but still has SIGTERM
etc handlers registered that will attempt to invoke reactor.stop(), but I
haven't yet made a minimal test case to confirm.

-Andrew.




Follow ups

References