[wpt-sync] Sync PR 27175 - [manifest] Explicitly context-manage the Pool
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox86 fixed)
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Attachments
(1 file)
Sync web-platform-tests PR 27175 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/27175
Details from upstream follow.
b'Stephen McGruer <smcgruer@chromium.org>' wrote:
[manifest] Explicitly context-manage the Pool
Python requires that a Pool object be context managed
(https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool):Warning: multiprocessing.pool objects have internal resources that need to be properly managed (like any other resource) by using the pool as a context manager or by calling close() and terminate() manually. Failure to do this can lead to the process hanging on finalization. Note that is not correct to rely on the garbage colletor to destroy the pool as CPython does not assure that the finalizer of the pool will be called (see object.__del__() for more information).
Chromium has been seeing hangs in 'wpt manifest' invocations since
moving to Python 3 for WPT, which sounds a lot like 'Failure to do this
can lead to the process hanging on finalization.' So let's
context-manage our Pool properly :)
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
Comment 4•5 years ago
|
||
Automatic update from web-platform-tests
[manifest] Explicitly terminate the multiprocessing.Pool
Python requires that a Pool object be terminated before it is GC'd
(https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool):
Warning: multiprocessing.pool objects have internal resources that need
to be properly managed (like any other resource) by using the pool as a
context manager or by calling close() and terminate() manually. Failure
to do this can lead to the process hanging on finalization.
Note that is not correct to rely on the garbage colletor to destroy the
pool as CPython does not assure that the finalizer of the pool will be
called (see object.__del__() for more information).
Chromium has been seeing hangs in 'wpt manifest' invocations since
moving to Python 3 for WPT, which sounds a lot like 'Failure to do this
can lead to the process hanging on finalization.' So let's
terminate our Pool properly :)
--
wpt-commits: eb6aa97d61d689ee572ce0975315dcd36d9068e7
wpt-pr: 27175
Assignee | ||
Comment 6•5 years ago
|
||
Comment 7•5 years ago
|
||
bugherder |
Description
•