Closed Bug 1686581 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 27175 - [manifest] Explicitly context-manage the Pool

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox86 fixed)

RESOLVED FIXED
86 Branch
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 :)

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c0161b95e29e [wpt PR 27175] - [manifest] Explicitly terminate the multiprocessing.Pool, a=testonly
Test result changes from PR not available.

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

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ada517987113 [wpt PR 27175] - [manifest] Explicitly terminate the multiprocessing.Pool, a=testonly
Test result changes from PR not available.
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: