Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Issue 2558153002: Change ExecLinkWrapper to not buffer all tool output (Closed)

Created:
4 years ago by brucedawson
Modified:
4 years ago
Reviewers:
scottmg
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change ExecLinkWrapper to not buffer all tool output /verbose linking of chrome.dll creates over one GB of output. This causes ExecLinkWrapper to consume over two GB of memory which leads to an OOM failure in the 32-bit depot_tools python, and the loss of all of the valuable output. This change modifies ExecLinkWrapper to process the output one line at a time, thus avoiding the OOM. I've tested that this handles the 1.1 GB of output which the previous version of this function failed on and I've visually confirmed that the output looks the same - no extraneous blank lines, for instance, when displaying warnings, errors, or 1.9 million lines of verbose output. I also verified that the script stays idle when waiting for output - blocking on .readline(). BUG=672182 Committed: https://crrev.com/5d0d1b0bf01acb3ebe3a5ef27ebf2f3180ab1d1d Cr-Commit-Position: refs/heads/master@{#437126}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Simpler and more idiomatic #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -3 lines) Patch
M build/toolchain/win/tool_wrapper.py View 1 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 25 (17 generated)
brucedawson
WDYT? This makes /verbose work reliably again.
4 years ago (2016-12-07 22:14:45 UTC) #9
scottmg
https://codereview.chromium.org/2558153002/diff/1/build/toolchain/win/tool_wrapper.py File build/toolchain/win/tool_wrapper.py (right): https://codereview.chromium.org/2558153002/diff/1/build/toolchain/win/tool_wrapper.py#newcode140 build/toolchain/win/tool_wrapper.py:140: if len(line) == 0: # Read of zero bytes ...
4 years ago (2016-12-07 22:20:56 UTC) #10
brucedawson
Much simpler now. Try bots are running but it is passing the quick local tests ...
4 years ago (2016-12-07 23:00:24 UTC) #13
scottmg
lgtm if it works. :)
4 years ago (2016-12-07 23:01:49 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2558153002/20001
4 years ago (2016-12-08 00:29:56 UTC) #19
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-08 01:48:52 UTC) #22
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/5d0d1b0bf01acb3ebe3a5ef27ebf2f3180ab1d1d Cr-Commit-Position: refs/heads/master@{#437126}
4 years ago (2016-12-08 01:52:58 UTC) #24
scottmg
4 years ago (2016-12-09 16:14:50 UTC) #25
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:20001) has been created in
https://codereview.chromium.org/2564893002/ by scottmg@chromium.org.

The reason for reverting is: Reverting under suspicion for crbug.com/672841..

Powered by Google App Engine
This is Rietveld 408576698