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.

Title: Crash and error message from Python VM
Type: crash Stage: resolved
Components: Interpreter Core, macOS Versions: Python 2.6
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: ned.deily, neologix, pcdinh, ronaldoussoren
Priority: normal Keywords:

Created on 2011-02-08 10:19 by pcdinh, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg128168 - (view) Author: Pham Cong Dinh (pcdinh) Date: 2011-02-08 10:19
Quite often, I got the following message printed out the console while I run my Python script

pthread_cond_signal: Undefined error: 0

Or it crashed

Tested with Python 2.6.1 and 2.6.6 (Mac)

What I am trying to do is to set up a logging component that collects all messages sent from child processes to a pipe created by the parent process. The logging component is controlled by a thread created by parent process
msg128177 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2011-02-08 13:25
Can you provide a script that shows the problem? Without such a script it will be hard to reproduce, and fix, this problem.
msg128264 - (view) Author: Pham Cong Dinh (pcdinh) Date: 2011-02-10 05:05
I just simplified my script into a smaller one that can be easier to understand and find out what happens

msg128280 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2011-02-10 11:03
I think this issue is related to, which is in turn related to (Locks in python standard library should be sanitized on fork).

When  a mutex created by a parent process is used from within a child process, this can lead not only to a deadlock, but also to SIGSEGV.

To understand the purpose of pthread_atfork, recall that fork duplicates the whole memory space, including mutexes in their current locking state, but only the calling thread: other threads are not running in the child process. The mutexes are not usable after the fork and must be initialized with pthread_mutex_init in the child process. This is a limitation of the current implementation and might or might not be present in future versions.

They must be initialized.

Suggesting to close both #11148 and #11158 as dupe of #6721.
msg130863 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2011-03-14 17:32
I agree this is a duplicate of #6721. I'm therefore closing this issue.
Date User Action Args
2022-04-11 14:57:12adminsetgithub: 55357
2011-03-14 17:32:10ronaldoussorensetstatus: open -> closed
nosy: ronaldoussoren, ned.deily, neologix, pcdinh
messages: + msg130863

resolution: duplicate
stage: resolved
2011-02-10 11:03:47neologixsetnosy: + neologix
messages: + msg128280
2011-02-10 05:05:32pcdinhsetnosy: ronaldoussoren, ned.deily, pcdinh
messages: + msg128264
2011-02-08 13:25:52ronaldoussorensetnosy: ronaldoussoren, ned.deily, pcdinh
messages: + msg128177
2011-02-08 13:22:02pitrousetnosy: + ronaldoussoren, ned.deily

components: + macOS
assignee: ronaldoussoren
2011-02-08 10:19:28pcdinhcreate