Commit 47833e5d authored by tonyg@chromium.org's avatar tonyg@chromium.org

Fix sharded perf test host forwarder sharing

This code is subtle. Since killing the host forwarder is a global operation, it
keeps a temp file with the shared pid and process start time so that it knows
whether the forwarder is the correct one that should be shared or a stray one
that should be killed.

This failed because not all of the sharded perf test processes had the same
parent pid. This caused the sharded tests to stomp on the global forwarder.

We didn't notice this previously because we only had narrow sharding, and 3
retries so the flake was papered over. When we added 8-way sharding on
chromium.perf, the flake rose to the level where it appeared every run.

This patch fixes it by using the process group instead of using the parent
process ID as a proxy.

BUG=163503

Review URL: https://codereview.chromium.org/391383005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283683 0039d316-1c4b-4281-b951-d872f2087c98
parent 7d75a031
......@@ -249,7 +249,7 @@ class Forwarder(object):
current process is returned.
"""
use_multiprocessing = Forwarder._MULTIPROCESSING_ENV_VAR in os.environ
return os.getppid() if use_multiprocessing else os.getpid()
return os.getpgrp() if use_multiprocessing else os.getpid()
def _InitHostLocked(self):
"""Initializes the host forwarder daemon.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment