[New-bugs-announce] [issue31150] [EASY] test_thread: Warning -- reap_children() reaped child process
STINNER Victor
report at bugs.python.org
Tue Aug 8 20:35:38 EDT 2017
New submission from STINNER Victor:
It seems like an unit test of test_thread leaks a process. A bisection found the following 2 tests are enough to get the warning:
* test.test_thread.TestForkInThread.test_forkinthread
* test.test_thread.LockTests.test_acquire_contended
I bet that test_forkinthread() doesn't wait correctly for the child process (fork) completion using os.waitpid() or something like that.
Example 1 (from Refleak buildbot):
haypo at selma$ ./python -m test -R 3:3 test_thread
Run tests sequentially
0:00:00 load avg: 0.55 [1/1] test_thread
beginning 6 repetitions
123456
Warning -- reap_children() reaped child process 6984
.Warning -- reap_children() reaped child process 7054
.Warning -- reap_children() reaped child process 7125
.Warning -- reap_children() reaped child process 7195
.Warning -- reap_children() reaped child process 7266
.Warning -- reap_children() reaped child process 7336
.
1 test OK.
Total duration: 5 sec
Tests result: SUCCESS
Example 2 (only run the 2 methods):
haypo at selma$ ./python -m test -m test.test_thread.TestForkInThread.test_forkinthread -m test.test_thread.LockTests.test_acquire_contended -v test_thread test_thread
0:00:00 load avg: 0.27 [1/2] test_thread
test_acquire_contended (test.test_thread.LockTests) ... ok
test_forkinthread (test.test_thread.TestForkInThread) ... ok
----------------------------------------------------------------------
Ran 2 tests in 0.037s
OK
0:00:00 load avg: 0.27 [2/2] test_thread
test_acquire_contended (test.test_thread.LockTests) ... Warning -- reap_children() reaped child process 10613
ok
test_forkinthread (test.test_thread.TestForkInThread) ... ok
----------------------------------------------------------------------
Ran 2 tests in 0.036s
OK
test_thread failed (env changed)
----------
keywords: easy
messages: 299958
nosy: haypo
priority: normal
severity: normal
status: open
title: [EASY] test_thread: Warning -- reap_children() reaped child process
versions: Python 3.6, Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31150>
_______________________________________
More information about the New-bugs-announce
mailing list