There seems to be a bug in Twisted 10.2. If something bad happens, the system can get into the state where it isn't stopped, but both SIGTERM and SIGINT refuse to shut down because they "can't stop a reactor that isn't running".
I wasn't very worried about it, but it just happened in production, so I'm escalating the severity. The traceback looks something like this:
2011-02-11 11:21:17+0000 [-] Received SIGTERM, shutting down.
2011-02-11 11:21:17+0000 [-] Unhandled Error
Traceback (most recent call last):
File "/srv/bazaar.launchpad.net/production/launchpad-rev-12351/eggs/Twisted-10.2.0_4395fix_1-py2.6-linux-x86_64.egg/twisted/application/app.py", line 390, in startReactor self.config, oldstdout, oldstderr, self.profiler, reactor)
File "/srv/bazaar.launchpad.net/production/launchpad-rev-12351/eggs/Twisted-10.2.0_4395fix_1-py2.6-linux-x86_64.egg/twisted/application/app.py", line 311, in runReactorWithLogging reactor.run()
File "/srv/bazaar.launchpad.net/production/launchpad-rev-12351/eggs/Twisted-10.2.0_4395fix_1-py2.6-linux-x86_64.egg/twisted/internet/base.py", line 1158, in run self.mainLoop()
File "/srv/bazaar.launchpad.net/production/launchpad-rev-12351/eggs/Twisted-10.2.0_4395fix_1-py2.6-linux-x86_64.egg/twisted/internet/base.py", line 1167, in mainLoop self.runUntilCurrent()
--- <exception caught here> ---
File "/srv/bazaar.launchpad.net/production/launchpad-rev-12351/eggs/Twisted-10.2.0_4395fix_1-py2.6-linux-x86_64.egg/twisted/internet/base.py", line 762, in runUntilCurrent
f(*a, **kw)
File "/srv/bazaar.launchpad.net/production/launchpad-rev-12351/eggs/Twisted-10.2.0_4395fix_1-py2.6-linux-x86_64.egg/twisted/internet/base.py", line 570, in stop
"Can't stop reactor that isn't running.") twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running.
There seems to be a bug in Twisted 10.2. If something bad happens, the system can get into the state where it isn't stopped, but both SIGTERM and SIGINT refuse to shut down because they "can't stop a reactor that isn't running".
I wasn't very worried about it, but it just happened in production, so I'm escalating the severity. The traceback looks something like this: launchpad. net/production/ launchpad- rev-12351/ eggs/Twisted- 10.2.0_ 4395fix_ 1-py2.6- linux-x86_ 64.egg/ twisted/ application/ app.py" , line 390, in startReactor
self. config, oldstdout, oldstderr, self.profiler, reactor) launchpad. net/production/ launchpad- rev-12351/ eggs/Twisted- 10.2.0_ 4395fix_ 1-py2.6- linux-x86_ 64.egg/ twisted/ application/ app.py" , line 311, in runReactorWithL ogging
reactor. run() launchpad. net/production/ launchpad- rev-12351/ eggs/Twisted- 10.2.0_ 4395fix_ 1-py2.6- linux-x86_ 64.egg/ twisted/ internet/ base.py" , line 1158, in run
self. mainLoop( ) launchpad. net/production/ launchpad- rev-12351/ eggs/Twisted- 10.2.0_ 4395fix_ 1-py2.6- linux-x86_ 64.egg/ twisted/ internet/ base.py" , line 1167, in mainLoop
self. runUntilCurrent () launchpad. net/production/ launchpad- rev-12351/ eggs/Twisted- 10.2.0_ 4395fix_ 1-py2.6- linux-x86_ 64.egg/ twisted/ internet/ base.py" , line 762, in runUntilCurrent launchpad. net/production/ launchpad- rev-12351/ eggs/Twisted- 10.2.0_ 4395fix_ 1-py2.6- linux-x86_ 64.egg/ twisted/ internet/ base.py" , line 570, in stop
twisted. internet. error.ReactorNo tRunning: Can't stop reactor that isn't running.
2011-02-11 11:21:17+0000 [-] Received SIGTERM, shutting down.
2011-02-11 11:21:17+0000 [-] Unhandled Error
Traceback (most recent call last):
File "/srv/bazaar.
File "/srv/bazaar.
File "/srv/bazaar.
File "/srv/bazaar.
--- <exception caught here> ---
File "/srv/bazaar.
f(*a, **kw)
File "/srv/bazaar.
"Can't stop reactor that isn't running.")