[Tim Petere]
There's a patch that squashes the specific symptom you have in mind, but at the cost of other breakage -- the original patch was added for a reason too.
[Dieter Maurer]
I verified that
<http://sourceforge.net/tracker/index.php?func=detail&aid=949332&group_id=54 70&atid=305470>
indeed fixes the problem.
It fixes a problem, yes, and let's be clear that it does do by avoiding provoking a bug in LinuxThreads. If LinuxThreads had a POSIX-compliant implementation of signals, this discussion wouldn't be happening.
It might introduce other subtle problems but at least none that are revealed by Python's regression test suite...
The comments on the bug report are extensive: [ 756924 ] SIGSEGV causes hung threads (Linux) http://www.python.org/sf/756924 Guido applied Jason Lowe's original signal-blocking patch because he was persuaded it fixed significant thread problems at the time. Everyone (including Jason) now agrees that patch was too extreme, but the platform problems it intended to address still exist. It's certainly true that Python's test suite doesn't cover all endcase threading+signal interaction behaviors across dozens of incompatible thread implementations, and many such problems are exposed by GNU readline, which is plain difficult to test except interactively. So it goes.
Moreover, I doubt that such problems will be significant in practise:
As above, the original signal-blocking patch was added for reasons "in practice" that appeared sufficient at the time. If you want to argue that, the right (helpful) place to do so is in a comment attached to the bug report. ...
As an automatic restart after a crash is vital for our productive Zope2 installations, we will probably bite the bullet and maintain our own Python version.
The 2.3.4 release manager rejected any change in this area for 2.3.4, and Guido agreed with that decision. 2.3.4 is just days away now, and there are several issues on several quite different platforms that need to be addressed simultaneously. Talking to them (via the Python bug report) may change their minds, but (a) I doubt it, and (b) nobody on zope-dev can change this. Adding comments to the bug report will still help to get it resolved for 2.3.5. An alternative to maintaining your own Python, and/or your own Linux, is to move to the current Linux thread implementation (NPTL), which doesn't have the LinuxThread signal bug that's the deeper cause of Zope's problems (on Linux boxes using LinuxThreads).