[issue17395] Wait for live children in test_multiprocessing

2013-03-11 Thread Ezio Melotti

Ezio Melotti added the comment:

I added a comment and committed the patch.  Thanks for the reviews!

--
assignee:  -> ezio.melotti
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17395] Wait for live children in test_multiprocessing

2013-03-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2966e5a55396 by Ezio Melotti in branch 'default':
#17395: wait for live children in test_multiprocessing.
http://hg.python.org/cpython/rev/2966e5a55396

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17395] Wait for live children in test_multiprocessing

2013-03-11 Thread Richard Oudkerk

Richard Oudkerk added the comment:

> Why > 1? This should be commented.

The manager process will always be included in active_children().

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17395] Wait for live children in test_multiprocessing

2013-03-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Why > 1? This should be commented.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17395] Wait for live children in test_multiprocessing

2013-03-11 Thread Richard Oudkerk

Richard Oudkerk added the comment:

LGTM (although the warning is actually harmless).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17395] Wait for live children in test_multiprocessing

2013-03-10 Thread Ezio Melotti

New submission from Ezio Melotti:

While running test_multiprocessing I get:
[...]
test_wait_return (test.test_multiprocessing.WithManagerTestBarrier) ... ok
Shared objects which still exist at manager shutdown:
  b6b802d4:   refcount=1

  b6b80ea4:   refcount=1

  b6b83264:   refcount=1
[True, True, True, True]
  b6b836fc:   refcount=1
[16092, 16094, 16091, 16096]
  b6b89884:   refcount=2

  b6b89ea4:   refcount=1
[]
  b6b8b7dc:   refcount=1

  b6b8bc3c:   refcount=1
[16092, 16094, 16096, 16091]
test_notify (test.test_multiprocessing.WithManagerTestCondition) ... ok
[...]
test_event (test.test_multiprocessing.WithManagerTestEvent) ... ok
Shared objects which still exist at manager shutdown:
  b6dcc7a4:   refcount=1

test_lock (test.test_multiprocessing.WithManagerTestLock) ... ok
[...]

This seems to be caused by the fact that when multiprocessing.active_children() 
is called in test_multiprocessing.ManagerMixin.tearDownClass(), some of them 
are still marked as active.
I tried to add a sleep before the active_children() call and the output 
disappeared.  On my machine it takes about half second.

The attached patch checks in loop that there no active children left, waiting 
up to 5s in increasing time intervals starting from 0.01s (so in the best case 
scenario it won't wait at all, and in the worst it will wait ~5s and possibly 
report the shared objects that still exists).

--
components: Tests
files: slowmulti.diff
keywords: patch
messages: 183935
nosy: ezio.melotti, jnoller, pitrou, sbt, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Wait for live children in test_multiprocessing
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file29372/slowmulti.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com