This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: mask signals for non-main pthreads
Type: Stage:
Components: Extension Modules Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: gvanrossum, jasonlowe
Priority: normal Keywords: patch

Created on 2001-10-05 16:58 by jasonlowe, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pthread.patch jasonlowe, 2001-10-05 16:58 pthread signal mask patch
Messages (4)
msg37786 - (view) Author: Jason Lowe (jasonlowe) Date: 2001-10-05 16:58
This patch updates Python/thread_pthread.h to mask all
signals for any thread created.  This will keep all
signals masked for any thread that isn't the initial
thread.  For Solaris and Linux, the two platforms I was
able to test it on, it solves bug #465673 (pthreads
need signal protection) and probably will solve bug
#219772 (Interactive InterPreter+ Thread -> core dump
at exit).

I'd be great if this could get some testing on other
platforms, especially HP-UX pre 11.00 and post 11.00,
as I had to make some guesses for the DCE thread case.
AIX is also a concern as I saw some mention of using
sigthreadmask() as a pthread_sigmask() equivalent, but
this patch doesn't use sigthreadmask().  I don't have
access to AIX.

Note that thread_pthread.h.orig in this patch is the
unmodified version from the Python2.1 release.

msg37787 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-10-12 21:49
Logged In: YES 
user_id=6380

As you said, the patch was out of date. Normally that would
be enough to ask you to resubmit it relative to the current
CVS, but it was too easy.

I've checked this in as thread_pthread.h rev 2.33 now, so
that it gets maximal exposure when the 2.2b1 release goes
out next week.
msg37788 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2004-05-11 14:01
Logged In: YES 
user_id=6380

This patch has caused more problems than it solves, IMO! 
Have a look at bug 756924:

http://sourceforge.net/tracker/index.php?func=detail&aid=756924&group_id=5470&atid=105470

Jason, if you're still around, would you mind looking into
an alternative fix for 465673 as suggested there?
msg37789 - (view) Author: Jason Lowe (jasonlowe) Date: 2004-05-11 19:59
Logged In: YES 
user_id=56897

I agree, the patch is very problematic, especially for
synchronous signals like SIGSEGV.  I've added more details
to the discussion in bug 756924.
History
Date User Action Args
2022-04-10 16:04:30adminsetgithub: 35286
2001-10-05 16:58:47jasonlowecreate