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

Issue 2243143002: Add --serial mode to dm, runs unit tests serially (Closed)

Created:
4 years, 4 months ago by msarett
Modified:
4 years, 4 months ago
Reviewers:
Giwan Go, borenet, mtklein, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Add --solo mode to dm, runs unit tests alone This mode is useful for tests that use a lot of memory (and should not be run multi-threaded). Also adds regression test for bug fix in: https://codereview.chromium.org/2230163002 This particular test will be run using --solo. BUG:636268 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243143002 Committed: https://skia.googlesource.com/skia/+/bcae9d3d15d34a59d279c34e187e6101975500c0

Patch Set 1 #

Patch Set 2 : whitespace #

Patch Set 3 : Only run on 32-bit builds, blacklist on NexusPlayer #

Patch Set 4 : Run test serially #

Total comments: 10

Patch Set 5 : Use --solo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -27 lines) Patch
M dm/DM.cpp View 1 2 3 4 4 chunks +16 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.py View 1 2 3 4 2 chunks +11 lines, -0 lines 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Android-GCC-AndroidOne-GPU-Mali400MP2-Arm7-Release.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Android-GCC-GalaxyS3-GPU-Mali400-Arm7-Debug.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Android-GCC-NVIDIA_Shield-GPU-TegraX1-Arm64-Debug.json View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Android-GCC-Nexus10-GPU-MaliT604-Arm7-Release.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Android-GCC-Nexus6-GPU-Adreno420-Arm7-Debug.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Debug.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Android-GCC-Nexus9-CPU-Denver-Arm64-Debug.json View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Android-GCC-NexusPlayer-CPU-SSE4-x86-Release.json View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug.json View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug.json View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer.json View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Coverage-Trybot.json View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug.json View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN.json View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared.json View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN.json View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind.json View 1 2 3 4 3 chunks +10 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan.json View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot.json View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M infra/bots/recipes/swarm_test.expected/Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/adb_in_path.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/big_issue_number.json View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M infra/bots/recipes/swarm_test.expected/download_and_push_skimage.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/download_and_push_skps.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/download_and_push_svgs.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/failed_dm.json View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/failed_get_hashes.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/missing_SKP_VERSION_device.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/missing_SK_IMAGE_VERSION_device.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M infra/bots/recipes/swarm_test.expected/missing_SVG_VERSION_device.json View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
A resources/invalid_images/crbug636268.png View Binary file 0 comments Download
M tests/ColorSpaceTest.cpp View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 51 (23 generated)
msarett
4 years, 4 months ago (2016-08-14 22:00:03 UTC) #3
Giwan Go
lgtm
4 years, 4 months ago (2016-08-15 04:58:17 UTC) #9
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/2243143002/20001
4 years, 4 months ago (2016-08-15 16:41:06 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/bcae9d3d15d34a59d279c34e187e6101975500c0
4 years, 4 months ago (2016-08-15 16:42:04 UTC) #13
msarett
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/2243403003/ by msarett@google.com. ...
4 years, 4 months ago (2016-08-16 11:54:09 UTC) #14
Giwan Go
On 2016/08/16 11:54:09, msarett wrote: > A revert of this CL (patchset #2 id:20001) has ...
4 years, 4 months ago (2016-08-16 12:38:32 UTC) #15
msarett
On 2016/08/16 12:38:32, GiWan Go wrote: > On 2016/08/16 11:54:09, msarett wrote: > > A ...
4 years, 4 months ago (2016-08-16 12:40:32 UTC) #16
Giwan Go
On 2016/08/16 12:40:32, msarett wrote: > On 2016/08/16 12:38:32, GiWan Go wrote: > > On ...
4 years, 4 months ago (2016-08-16 12:43:29 UTC) #18
msarett
On 2016/08/16 12:43:29, GiWan Go wrote: > On 2016/08/16 12:40:32, msarett wrote: > > On ...
4 years, 4 months ago (2016-08-16 13:11:31 UTC) #19
Giwan Go
On 2016/08/16 13:11:31, msarett wrote: > On 2016/08/16 12:43:29, GiWan Go wrote: > > On ...
4 years, 4 months ago (2016-08-16 13:32:41 UTC) #20
mtklein
On 2016/08/16 13:32:41, GiWan Go wrote: > On 2016/08/16 13:11:31, msarett wrote: > > On ...
4 years, 4 months ago (2016-08-16 13:53:01 UTC) #23
Giwan Go
On 2016/08/16 13:53:01, mtklein wrote: > On 2016/08/16 13:32:41, GiWan Go wrote: > > On ...
4 years, 4 months ago (2016-08-16 14:07:20 UTC) #24
msarett
On 2016/08/16 13:53:01, mtklein wrote: > On 2016/08/16 13:32:41, GiWan Go wrote: > > On ...
4 years, 4 months ago (2016-08-16 14:36:48 UTC) #25
msarett
4 years, 4 months ago (2016-08-16 14:37:16 UTC) #27
mtklein
On 2016/08/16 14:36:48, msarett wrote: > On 2016/08/16 13:53:01, mtklein wrote: > > On 2016/08/16 ...
4 years, 4 months ago (2016-08-16 14:42:11 UTC) #28
msarett
> > > How much RAM does this regression test need? > > > If ...
4 years, 4 months ago (2016-08-16 19:11:01 UTC) #32
msarett
On 2016/08/16 19:11:01, msarett wrote: > > > > How much RAM does this regression ...
4 years, 4 months ago (2016-08-16 19:15:16 UTC) #33
msarett
Please take a look. I've added the --serial flag to dm to run unit tests ...
4 years, 4 months ago (2016-08-16 22:35:05 UTC) #36
mtklein
https://codereview.chromium.org/2243143002/diff/80001/dm/DM.cpp File dm/DM.cpp (right): https://codereview.chromium.org/2243143002/diff/80001/dm/DM.cpp#newcode74 dm/DM.cpp:74: DEFINE_string2(serial, s, nullptr, Why don't we call this flag ...
4 years, 4 months ago (2016-08-16 23:54:07 UTC) #37
msarett
https://codereview.chromium.org/2243143002/diff/80001/dm/DM.cpp File dm/DM.cpp (right): https://codereview.chromium.org/2243143002/diff/80001/dm/DM.cpp#newcode74 dm/DM.cpp:74: DEFINE_string2(serial, s, nullptr, On 2016/08/16 23:54:06, mtklein wrote: > ...
4 years, 4 months ago (2016-08-17 12:40:45 UTC) #41
mtklein
https://codereview.chromium.org/2243143002/diff/80001/infra/bots/recipes/swarm_test.py File infra/bots/recipes/swarm_test.py (right): https://codereview.chromium.org/2243143002/diff/80001/infra/bots/recipes/swarm_test.py#newcode310 infra/bots/recipes/swarm_test.py:310: match.append('~ColorSpaceCRBug') On 2016/08/17 12:40:45, msarett wrote: > On 2016/08/16 ...
4 years, 4 months ago (2016-08-17 12:45:12 UTC) #42
msarett
https://codereview.chromium.org/2243143002/diff/80001/infra/bots/recipes/swarm_test.py File infra/bots/recipes/swarm_test.py (right): https://codereview.chromium.org/2243143002/diff/80001/infra/bots/recipes/swarm_test.py#newcode310 infra/bots/recipes/swarm_test.py:310: match.append('~ColorSpaceCRBug') On 2016/08/17 12:45:12, mtklein wrote: > On 2016/08/17 ...
4 years, 4 months ago (2016-08-17 12:51:47 UTC) #43
mtklein
> This is actually what we do - the large memory use is from the ...
4 years, 4 months ago (2016-08-17 12:55:17 UTC) #44
msarett
On 2016/08/17 12:55:17, mtklein wrote: > > This is actually what we do - the ...
4 years, 4 months ago (2016-08-17 13:08:40 UTC) #47
mtklein
On 2016/08/17 13:08:40, msarett wrote: > On 2016/08/17 12:55:17, mtklein wrote: > > > This ...
4 years, 4 months ago (2016-08-17 13:10:20 UTC) #48
Giwan Go
On 2016/08/17 13:10:20, mtklein wrote: > On 2016/08/17 13:08:40, msarett wrote: > > On 2016/08/17 ...
4 years, 4 months ago (2016-08-18 02:17:49 UTC) #49
Giwan Go
On 2016/08/18 02:17:49, GiWan Go wrote: > On 2016/08/17 13:10:20, mtklein wrote: > > On ...
4 years, 4 months ago (2016-08-18 02:25:02 UTC) #50
msarett
4 years, 4 months ago (2016-08-18 15:29:11 UTC) #51
On 2016/08/18 02:25:02, GiWan Go wrote:
> On 2016/08/18 02:17:49, GiWan Go wrote:
> > On 2016/08/17 13:10:20, mtklein wrote:
> > > On 2016/08/17 13:08:40, msarett wrote:
> > > > On 2016/08/17 12:55:17, mtklein wrote:
> > > > > > This is actually what we do - the large memory use is from the
> > > decompressed
> > > > > ICC
> > > > > > profile.  We allocate gammas in one block of memory - so we haven't
> > > > allocated
> > > > > > anything yet.  The bug fix prevents us from trying to allocate if we
> > > > overflow
> > > > > > when adding sizeof(gamma1) + sizeof(gamma2) + sizeof(gamma3).
> > > > > > 
> > > > > > FWIW, I intend to write another CL that rejects all tables that are
> > > greater
> > > > > than
> > > > > > <some large number of entries>.  That may incidentally also fix this
> > bug,
> > > > but
> > > > > I
> > > > > > think the overflow checks are important on their own.
> > > > > 
> > > > > Is it possible to test this until then with something that's got large
> > > enough
> > > > > gammas but small enough everything else that it doesn't have to be an
> > > unusual
> > > > > test?  Then when the full-force reject logic comes in, you can switch
> back
> > > to
> > > > > this (presumably wild?) .png.
> > > > 
> > > > A smaller test would probably be fine to test the full force reject
logic.
> > > > 
> > > > To test specifically this overflow bug, we need a large test.  I believe
I
> > > could
> > > > trim the test down to less than 400 MB.  It will just be a bit tricky
> > because
> > > > I'll need to generate a giant custom ICC profile, then encode it to PNG.

> > Does
> > > > that sound better?  Or we can just not have this test?  I don't feel
> > strongly.
> > > 
> > > I think I'm still not clear why we can't delay all allocation until after
> > we've
> > > decided it's safe.  If the profile is 4 or 700 MB, can we not add that
into
> > our
> > > overflow check?
> > 
> > Please take a look at libqcms.
> > There is a good check code.
> >
>
https://skia.googlesource.com/skia.git/+/master/third_party/qcms/src/iccread....
> > 
> > #define MAX_PROFILE_SIZE 1024*1024*4
> > #define MAX_TAG_COUNT 1024
> 
> But, The 700MB of memory is still allocated in libpng.

I don't feel strongly that we need a test for this specific code path, given
that we should be short-circuiting this error case with some sanity checks up
front.

I plan to right a CL that includes these sanity checks along with some (smaller)
test cases that exercise them.

Powered by Google App Engine
This is Rietveld 408576698