Re: Strange segfault in Python threads and linux kernel 2.6
Derrick Hudson <[email protected]>
| Newsgroups | gmane.comp.web.zope.coders |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jan 19, 2005 at 04:16:09PM +1100, Donovan Baarda wrote:
[...]
| After googling around, I found references to recent attempts to resolve
| some signal handling problems in Python threads. There was one post that
| mentioned subtle differences between how Linux 2.4 and Linux 2.6 did
| signals to threads.
|
| So it seems this is a problem with Python threads and Linux kernel 2.6.
Maybe this information will help you :
http://marc.theaimsgroup.com/?l=vim-dev&;m=100827301719235&w=2
http://marc.theaimsgroup.com/?l=vim-dev&;m=100803941216634&w=2
http://lists.debian.org/debian-user/2002/12/msg03171.html
Quoting the last paragraph of section 6.6 of "Programming with
POSIX Threads" by David R. Butenhof:
It is always best to avoid using signals in conjunction
with threads. At the same time, it is often not possible or
practical to keep them separate. When signals and threads
meet, beware. If at all possible, use only pthread_sigmask
to mask signals in the main thread, and sigwait to handle
signals synchronously within a single thread dedicated to
that purpose. If you must use sigaction (or equivalent) to
handle synchronous signals (such as SIGSEGV) within threads,
be especially cautious. Do as little work as possible within
the signal-catching function.
Good luck!
-D
--
\begin{humor}
Disclaimer:
If I receive a message from you, you are agreeing that:
1. I am by definition, "the intended recipient"
2. All information in the email is mine to do with as I see fit and make
such financial profit, political mileage, or good joke as it lends
itself to. In particular, I may quote it on USENET or the WWW.
3. I may take the contents as representing the views of your company.
4. This overrides any disclaimer or statement of confidentiality that may
be included on your message
\end{humor}
www: http://dman13.dyndns.org/~dman/ jabber: [email protected]
_______________________________________________
Zope-Coders mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zope-coders
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFB7qlsiB6vp1xAVUARAjYxAJ0ds0Px/cd0KAhpsYecucvAkXJg4gCgnpp/ cdST1pMmj1e2V+1LUB8kMMQ= =obh5 -----END PGP SIGNATURE-----