Author pcdinh
Recipients pcdinh
Date 2011-02-09.08:25:48
SpamBayes Score 5.5378e-05
Marked as misclassified No
Message-id <1297239951.49.0.685866204309.issue11158@psf.upfronthosting.co.za>
In-reply-to
Content
Hi,

I was implementing a multiple process compatible logging which child processes are expected to send all messages to the parent process via a queue and then the parent process serializes and flushes them into a log file. The idea is built around multiprocessing.Queue()

The problem is the first child process is always blocked while subsequent ones can run smoothly. It seems to be blocked on semaphore_wait_signal_trap

Environment
===========
Mac OS X 10.6.5 
Python 2.6.6

Reproduction script:
====================
https://gist.github.com/818114

Command to run
====================

python log.py

Console message
===============
Dinh-Phams-MacBook-Pro:task dinhpham$ python log.py
Parent PID 90401
90403
Parent PID 90401
Parent PID 90401
90404
Parent PID 90401
90405
No child process exits
90406
Child process ID 90406
Child process ID 90404
Child process ID 90405
No child process exits
No child process exits
No child process exits
No child process exits
No child process exits
Child process PID 90404 will exits now
Child process PID 90406 will exits now
Child process PID 90405 will exits now
The child process 90406 exits
The child process 90405 exits
The child process 90404 exits
No child process exits
No child process exits
No child process exits
No child process exits
No child process exits
No child process exits
No child process exits
No child process exits
No child process exits
No child process exits
No child process exits
No child process exits
No child process exits
No child process exits
No child process exits
No child process exits
No child process exits
^C[90403]
Parent process exits
Dinh-Phams-MacBook-Pro:task dinhpham$ 
 


=========> All the process exits except the first child process one (90403)
History
Date User Action Args
2011-02-09 08:25:51pcdinhsetrecipients: + pcdinh
2011-02-09 08:25:51pcdinhsetmessageid: <1297239951.49.0.685866204309.issue11158@psf.upfronthosting.co.za>
2011-02-09 08:25:48pcdinhlinkissue11158 messages
2011-02-09 08:25:48pcdinhcreate