Author vstinner
Recipients davin, martin.panter, pitrou, serhiy.storchaka, vstinner
Date 2017-07-24.11:00:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1500894019.7.0.017904580443.issue26762@psf.upfronthosting.co.za>
In-reply-to
Content
With PR 2841 + PR 2842, there is still at least one test which leaks processes:

---
$ ./python -m test --match=test_notify_all -v test_multiprocessing_spawn
== CPython 3.7.0a0 (heads/master:b364d9f, Jul 24 2017, 11:06:33) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]
== Linux-4.11.9-200.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five little-endian
== hash algorithm: siphash24 64bit
== cwd: /home/haypo/prog/python/master/build/test_python_28469
== CPU count: 4
== encodings: locale=UTF-8, FS=utf-8
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
Run tests sequentially
0:00:00 load avg: 0.44 [1/1] test_multiprocessing_spawn
test_notify_all (test.test_multiprocessing_spawn.WithManagerTestCondition) ... ok
test_notify_all (test.test_multiprocessing_spawn.WithProcessesTestCondition) ... ok
Warning -- reap_children() reaped child process 28553
Warning -- reap_children() reaped child process 28557
Warning -- reap_children() reaped child process 28559
Warning -- reap_children() reaped child process 28561
test_notify_all (test.test_multiprocessing_spawn.WithThreadsTestCondition) ... ok
Dangling processes: {<Process(Process-11, started daemon)>, <Process(Process-12, started daemon)>, <Process(Process-13, started daemon)>, <Process(Process-9, started daemon)>}

----------------------------------------------------------------------
Ran 3 tests in 3.772s

OK
Warning -- multiprocessing.process._dangling was modified by test_multiprocessing_spawn
  Before: <_weakrefset.WeakSet object at 0x7f2385200400>
  After:  <_weakrefset.WeakSet object at 0x7f238a8ff260> 
test_multiprocessing_spawn failed (env changed)

1 test altered the execution environment:
    test_multiprocessing_spawn

Total duration: 4 sec
Tests result: SUCCESS
---

I looked at the code of the test: it's full of "p.daemon = True" and "t.daemon = True", whereas these processes and threads are not tracked in a list to be cleared manually, so I'm not surprised of the warnings.
History
Date User Action Args
2017-07-24 11:00:19vstinnersetrecipients: + vstinner, pitrou, martin.panter, serhiy.storchaka, davin
2017-07-24 11:00:19vstinnersetmessageid: <1500894019.7.0.017904580443.issue26762@psf.upfronthosting.co.za>
2017-07-24 11:00:19vstinnerlinkissue26762 messages
2017-07-24 11:00:19vstinnercreate