[Twisted-Python] Weird, apparently platform-dependent bug that hoses reactor
Help! This is a bug that I discovered after I had just completed a change of name for one of the packages in my app, from "common" (bad name) to "enterprise" (sounds too broad but is actually appropriate in this case). Yes, I am using t.enterprise modules (adbapi) and yes, I've made sure that all our imports of that and of our module by that name (pangalactic.enterprise :^) are fully-qualified. The traceback we're getting is: Traceback (most recent call last): File "test_pger_get.py", line 37, in ? reactor.run() # start the main loop File "/usr/lib/python2.2/site-packages/twisted/internet/default.py", line 121, in run self.startRunning(installSignalHandlers=installSignalHandlers) File "/usr/lib/python2.2/site-packages/twisted/internet/default.py", line 115, in startRunning self._handleSignals() File "/usr/lib/python2.2/site-packages/twisted/internet/default.py", line 87, in _handleSignals signal.signal(signal.SIGINT, self.sigInt) SystemError: error return without exception set -------------------------------------------------------------- This is coming from a pretty simple test script that initializes some things and does a reactor.run() and prints the result or the error. (There's too much context to include all the code in this message, but I'll send it off-list to anyone who's interested.) The platform-dependent aspect is that we have run the exact same code on Debian (unstable) have *not* seen this traceback there. We get the traceback on a Red Hat 9 (2.4.20-18.9) machine. Basically curious if anyone else has seen anything like this. (We are still in the process of trying to narrow the differences between the code that ran -- before the module name change [big time sed script job] and after ... will post if we have a breakthrough.) Thanks! Steve
On Thu, 26 Jun 2003 22:10:06 -0400 Steve Waterbury <golux@comcast.net> wrote:
The platform-dependent aspect is that we have run the exact same code on Debian (unstable) have *not* seen this traceback there. We get the traceback on a Red Hat 9 (2.4.20-18.9) machine.
We had one other report, Redhat 7.3. Are you using Redhat Python RPMs? Can you reproduce the bug without depending on Twisted? If doing signal.signal(...etc..) by itself causes this problem, it's obviously not a Twisted problem. Are you doing reactor.run() in a thread? -- Itamar Shtull-Trauring http://itamarst.org/ http://www.zoteca.com -- Python & Twisted consulting
Itamar Shtull-Trauring wrote:
On Thu, 26 Jun 2003 22:10:06 -0400 Steve Waterbury <golux@comcast.net> wrote:
The platform-dependent aspect is that we have run the exact same code on Debian (unstable) have *not* seen this traceback there. We get the traceback on a Red Hat 9 (2.4.20-18.9) machine.
We had one other report, Redhat 7.3.
Aha. I wonder what version of Python.
Are you using Redhat Python RPMs?
Sort of -- not the one that comes with the RH distro, but this one from python.org: python-2.2.3-26.src.rpm (Red Hat 9 updated Source RPM, 7007263 bytes)
Can you reproduce the bug without depending on Twisted? If doing signal.signal(...etc..) by itself causes this problem, it's obviously not a Twisted problem.
signal.signal by itself seems to be okay: [waterbug@golux test]$ python Python 2.2.3 (#1, Jun 25 2003, 22:41:47) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import signal signal.signal(signal.SIGINT, signal.SIG_DFL) <built-in function default_int_handler>
Are you doing reactor.run() in a thread
Nope, not invoking any threads at all in my code. Thanks for the suggestions, Itamar. Cheers, Steve.
participants (2)
-
Itamar Shtull-Trauring
-
Steve Waterbury