homepage

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.

Author Neal.Becker
Recipients Neal.Becker
Date 2010年10月29日.23:16:53
SpamBayes Score 0.00010960065
Marked as misclassified No
Message-id <1288394215.77.0.548546453829.issue10239@psf.upfronthosting.co.za>
In-reply-to
Content
multiprocessing signal defect
From:
Neal Becker <ndbecker2@gmail.com>
 Date:
Friday 29 October 2010 8:12:19 am
 To:
python-list@python.org
 Groups:
gmane.comp.python.general
Tested on:
python-2.6.4-27.fc13.x86_64
linux fedora 13 x86_64
Seems multiprocessing doesn't behave well with signals:
-----------
from multiprocessing import Pool
import time
def sleep (dummy):
  time.sleep (10)
  
if __name__ == '__main__':
  pool = Pool (processes=2)
  result = pool.map (sleep, range (4))
  
-------------
start it up
$ python test_multip.py 
----------------------
ps auxf | grep python
nbecker  6605 1.6 0.1 338192 6952 pts/1  Sl+ 08:03  0:00 |    \_ 
python test_multip.py
nbecker  6606 0.0 0.1 186368 4760 pts/1  S+  08:03  0:00 |      
\_ python test_multip.py
nbecker  6607 0.0 0.1 186372 4740 pts/1  S+  08:03  0:00 |      
\_ python test_multip.py
kill 6607
 ps auxf | grep python
nbecker  6605 0.5 0.1 338192 6952 pts/1  Sl+ 08:03  0:00 |    \_ 
python test_multip.py
nbecker  6606 0.0 0.1 186368 4760 pts/1  S+  08:03  0:00 |      
\_ python test_multip.py
nbecker  6607 0.0 0.0   0   0 pts/1  Z+  08:03  0:00 |      
\_ [python] <defunct>
 kill 6606
ps auxf | grep python
nbecker  6605 0.3 0.1 338192 6952 pts/1  Sl+ 08:03  0:00 |    \_ 
python test_multip.py
nbecker  6606 0.0 0.0   0   0 pts/1  Z+  08:03  0:00 |      
\_ [python] <defunct>
nbecker  6607 0.0 0.0   0   0 pts/1  Z+  08:03  0:00 |      
\_ [python] <defunct>
Now we have 2 dead children and the parent is hung forever.
Isn't this a serious defect?
History
Date User Action Args
2010年10月29日 23:16:56Neal.Beckersetrecipients: + Neal.Becker
2010年10月29日 23:16:55Neal.Beckersetmessageid: <1288394215.77.0.548546453829.issue10239@psf.upfronthosting.co.za>
2010年10月29日 23:16:53Neal.Beckerlinkissue10239 messages
2010年10月29日 23:16:53Neal.Beckercreate

AltStyle によって変換されたページ (->オリジナル) /