Bug 1456525 [wpt PR 10654] - [Gecko Bug 1456525] Fix wpt ws[s] server intermittent startup issue, a=testonly

Automatic update from web-platform-testsFix wpt ws[s] server intermittent startup issue

Running wpt occasionally failed due to an issue starting the ws[s]
servers. This turns out to be a deadlock caused by a logging lock
being inherited into the child process, sometimes in a locked
state. As a workaround, after spawning the subprocess, we reload the
logging module in order to clear any existing lock. This is pretty
much a hack, but it's the fastest path to a solution to a critical issue.
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1456525
gecko-commit: 3c548f1fdf4dbac4c11bfc239e129864db547e4c
gecko-integration-branch: mozilla-inbound
gecko-reviewers: ato

--
Fix Python 3 compatibility
--

wpt-commits: 2ae9668bd0f23edf15d0591aeb90060dbd2565c2, 8f9b8153e139423dcd74598818ad3f7bd7e35c9f
wpt-pr: 10654
This commit is contained in:
moz-wptsync-bot 2018-05-01 14:56:15 +00:00 committed by James Graham
parent 13516021f4
commit 2d71c4a9df

View File

@ -18,6 +18,7 @@ from collections import defaultdict, OrderedDict
from multiprocessing import Process, Event
from localpaths import repo_root
from six.moves import reload_module
from manifest.sourcefile import read_script_metadata, js_meta_re, parse_variants
from wptserve import server as wptserve, handlers
@ -567,7 +568,7 @@ def start_ws_server(host, port, paths, routes, bind_address, config, ssl_config,
**kwargs):
# Ensure that when we start this in a new process we don't inherit the
# global lock in the logging module
reload(logging)
reload_module(logging)
return WebSocketDaemon(host,
str(port),
repo_root,
@ -581,7 +582,7 @@ def start_wss_server(host, port, paths, routes, bind_address, config, ssl_config
**kwargs):
# Ensure that when we start this in a new process we don't inherit the
# global lock in the logging module
reload(logging)
reload_module(logging)
return WebSocketDaemon(host,
str(port),
repo_root,