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

Issue 6902129: Arbitrarily large output can't be used in an exception. (Closed)

Created:
9 years, 7 months ago by sosa
Modified:
9 years, 6 months ago
Reviewers:
dgarrett
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

Arbitrarily large output can't be used in an exception. It seems like we are seeing whacky errors with sys.stderr dying when trying to print out a process and its exception. I think controlling how the output is printed in RunCommand is better than passing it with the exception. Change-Id: I3711575e5d9e710c3aea6ff19d43d149fd83f44c BUG=chromium-os:14398 TEST=Ran it with au_test_harness Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=237b686

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M lib/cros_build_lib.py View 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
sosa
9 years, 7 months ago (2011-04-28 22:17:04 UTC) #1
dgarrett
The code change LGTM, but with a couple of general questions.... However, I'm surprised. Are ...
9 years, 7 months ago (2011-04-28 22:27:21 UTC) #2
sosa
The actual errors seem to occur when the buffer for sys.stderr becomes full. It's hard ...
9 years, 7 months ago (2011-04-28 22:31:32 UTC) #3
sosa
9 years, 7 months ago (2011-04-28 23:26:09 UTC) #4
Actually reading the docs on sys.stderr, it's already UNBUFFERED.  So
my other solution wouldn't have worked.  As far as whether the errors
would be interspersed, this would be true.  I think in general this is
happening to us because we're printing huge blobs to sys.stderr in
multiple processes where it's usually expecting one line at a time.

On Thu, Apr 28, 2011 at 3:31 PM, Chris Sosa <sosa@chromium.org> wrote:
> The actual errors seem to occur when the buffer for sys.stderr becomes
> full.  It's hard to repro so I'm hoping that flush stderr directly
> after printing the larger output, we actually clean the buffer.  The
> other alternative we could consider is running the au_test_harness w/
> PYTHONUNBUFFERED
>
> On Thu, Apr 28, 2011 at 3:27 PM,  <dgarrett@chromium.org> wrote:
>> The code change LGTM, but with a couple of general questions....
>>
>> However, I'm surprised. Are the large exceptions causing the problem, or is
>> it
>> related to the pickling for interprocess communication that happens later
>> on?
>>
>> Also, if multiple parallel tests fail, will the outputs end up interleaved
>> with
>> each other?
>>
>> http://codereview.chromium.org/6902129/
>>
>

Powered by Google App Engine
This is Rietveld 408576698