New issue
Advanced search Search tips

Issue 834613 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug
Flaky-Test: SoftwareTextureLayerMultipleRegisterTest.RunMultiThread_DelegatingRenderer

Blocking:
issue 703263



Sign in to add a comment

SoftwareTextureLayerMultipleRegisterTest.RunMultiThread_DelegatingRenderer is Flaky

Project Member Reported by Findit, Apr 19 2018

Issue description

Findit has detected a flake at test SoftwareTextureLayerMultipleRegisterTest.RunMultiThread_DelegatingRenderer.

Culprit (100.0% confidence): https://chromium-review.googlesource.com/q/I25e2bc6b819fcab043faa3fc4949a89f5e078307
Regression range: None

Analysis: https://findit-for-me.appspot.com/waterfall/flake?key=ag9zfmZpbmRpdC1mb3ItbWVy1AELEhdNYXN0ZXJGbGFrZUFuYWx5c2lzUm9vdCKdAWNocm9taXVtLm1lbW9yeS9NYWMgQVNhbiA2NCBUZXN0cyAoMSkvNDAxMTAvY2NfdW5pdHRlc3RzL1UyOW1kSGRoY21WVVpYaDBkWEpsVEdGNVpYSk5kV3gwYVhCc1pWSmxaMmx6ZEdWeVZHVnpkQzVTZFc1TmRXeDBhVlJvY21WaFpGOUVaV3hsWjJGMGFXNW5VbVZ1WkdWeVpYST0MCxITTWFzdGVyRmxha2VBbmFseXNpcxgBDA

If this result was incorrect, apply the label Findit-Incorrect-Result, mark the bug as Untriaged and the component Tools>Test>Findit>Flakiness.
 
Project Member

Comment 1 by Findit, Apr 19 2018

Findit identified the culprit r547024 with confidence 100.0% in the config "chromium.memory / Mac ASan 64 Tests (1)"
based on the flakiness trend:

https://findit-for-me.appspot.com/waterfall/flake?key=ag9zfmZpbmRpdC1mb3ItbWVy1AELEhdNYXN0ZXJGbGFrZUFuYWx5c2lzUm9vdCKdAWNocm9taXVtLm1lbW9yeS9NYWMgQVNhbiA2NCBUZXN0cyAoMSkvNDAxMTAvY2NfdW5pdHRlc3RzL1UyOW1kSGRoY21WVVpYaDBkWEpsVEdGNVpYSk5kV3gwYVhCc1pWSmxaMmx6ZEdWeVZHVnpkQzVTZFc1TmRXeDBhVlJvY21WaFpGOUVaV3hsWjJGMGFXNW5VbVZ1WkdWeVpYST0MCxITTWFzdGVyRmxha2VBbmFseXNpcxgBDA


Automatically posted by the findit-for-me app (https://goo.gl/Ot9f7N).
Flake Analyzer is in beta.
Feedback is welcome! Please use component Tools>Test>FindIt>Flakiness
Cc: mstensho@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f01e44f276faa93406756ec54621713c4c068895

commit f01e44f276faa93406756ec54621713c4c068895
Author: Morten Stenshorne <mstensho@chromium.org>
Date: Thu Apr 19 09:19:42 2018

Disable SoftwareTextureLayerMultipleRegisterTest due to flakiness.

TBR=danakj@chromium.org

Bug:  834613 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Icb20b1fa2501205562a0db7c8c5c3d672c2ed762
Reviewed-on: https://chromium-review.googlesource.com/1018477
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551970}
[modify] https://crrev.com/f01e44f276faa93406756ec54621713c4c068895/cc/layers/texture_layer_unittest.cc

Labels: -Pri-1 -Sheriff-Chromium Pri-2
Owner: danakj@chromium.org
Status: Assigned (was: Available)

Comment 5 by danakj@chromium.org, Apr 19 2018

When you file a bug for a failing test, please include an example of the failing test output.

Comment 6 by danakj@chromium.org, Apr 19 2018

Blocking: 703263
Cc: kylec...@chromium.org
This is crashing after it finished:

[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from SoftwareTextureLayerMultipleRegisterTest
[ RUN      ] SoftwareTextureLayerMultipleRegisterTest.RunMultiThread_DelegatingRenderer
[       OK ] SoftwareTextureLayerMultipleRegisterTest.RunMultiThread_DelegatingRenderer (51 ms)
[----------] 1 test from SoftwareTextureLayerMultipleRegisterTest (51 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (53 ms total)
[  PASSED  ] 1 test.
[67316:775:0418/203333.887429:15045735445140:FATAL:texture_layer.cc(290)] Check failed: 0u == internal_references_ (0 vs. 1)
0   cc_unittests                        0x000000010aac1e1c base::debug::StackTrace::StackTrace(unsigned long) + 28
1   cc_unittests                        0x000000010aaf5667 logging::LogMessage::~LogMessage() + 695
2   cc_unittests                        0x000000010a04a826 cc::TextureLayer::TransferableResourceHolder::~TransferableResourceHolder() + 342
3   cc_unittests                        0x000000010a04a94e cc::TextureLayer::TransferableResourceHolder::~TransferableResourceHolder() + 14
4   cc_unittests                        0x000000010a051879 base::internal::BindState<void (cc::TextureLayer::TransferableResourceHolder::*)(), scoped_refptr<cc::TextureLayer::TransferableResourceHolder> >::Destroy(base::internal::BindStateBase const*) + 121
5   cc_unittests                        0x000000010ab0d4e9 base::internal::IncomingTaskQueue::TriageQueue::Clear() + 793
6   cc_unittests                        0x000000010ab1448c base::MessageLoop::DeletePendingTasks() + 396
7   cc_unittests                        0x000000010ab13679 base::MessageLoop::~MessageLoop() + 793
8   cc_unittests                        0x000000010ab146ee base::MessageLoop::~MessageLoop() + 14
9   cc_unittests                        0x0000000109641abc cc::CCTestSuite::Shutdown() + 92
10  cc_unittests                        0x000000010a422ebc base::TestSuite::Run() + 572
11  cc_unittests                        0x000000010a44ccd9 base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) + 857
12  cc_unittests                        0x000000010a44c8ca base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) + 442
13  cc_unittests                        0x0000000109641c69 main + 377
14  libdyld.dylib                       0x00007fff5391c115 start + 1
15  ???                                 0x000000000000000c 0x0 + 12

Comment 7 by danakj@chromium.org, Apr 19 2018

Status: Started (was: Assigned)
Project Member

Comment 8 by bugdroid1@chromium.org, Apr 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0841105055f52f0efbfb330b6e5970a859d916c1

commit 0841105055f52f0efbfb330b6e5970a859d916c1
Author: danakj <danakj@chromium.org>
Date: Thu Apr 19 20:52:24 2018

Prevent DCHECKs if MessageLoop is destroyed during TextureLayer shutdown

If the compositor thread has released the resource in a TextureLayer
and posted that release to the main thread, but then the MessageLoop
on which the posted task sits shuts down, the TextureLayer's
TransferableResourceHolder will be destroyed. This is because the
holder is at that time singly owned by callback, as the resource is
being released due to being removed (and unowned) by the main thread
side.

In this case, there is a posted-but-not-run dereference sitting in
the MessageLoop which we can track, and avoid DCHECK-failing in the
TransferableResourceHolder destructor.

However, there is also the ReleaseCallback for the main thread in
the TransferableResourceHolder that will DCHECK if not run, so we
can run that SingleReleaseCallback from the TransferableResourceHolder
destructor. This is done on the assumption that the MessageLoop is
destroyed from the main thread (we can DCHECK this instead), and
that the only case we have a SingleReleaseCallback in the destructor
still is when all missing derefs have been posted but not run (we
can DCHECK this as well).

This fixes the flaky SoftwareTextureLayerMultipleRegisterTest,
which could be resolved by using DidReceiveCompositorFrameAck()
instead of DidCommitAndDrawFrame(), as that waits for the release
callback to be run. But also resolves production issues where
DCHECKs are hit during shutdown due to the MessageLoop being
destroyed in this scenario (809604).

R=piman@chromium.org

Bug:  834613 ,  809604 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I3faa1cdcc58f1be99cf5f80732c63e51e9aff3d9
Reviewed-on: https://chromium-review.googlesource.com/1019614
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552151}
[modify] https://crrev.com/0841105055f52f0efbfb330b6e5970a859d916c1/cc/layers/texture_layer.cc
[modify] https://crrev.com/0841105055f52f0efbfb330b6e5970a859d916c1/cc/layers/texture_layer.h

Comment 9 by danakj@chromium.org, Apr 19 2018

Status: Fixed (was: Started)
Project Member

Comment 10 by bugdroid1@chromium.org, Apr 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/366637efaa81adc37d9687559a4b07937e4afab1

commit 366637efaa81adc37d9687559a4b07937e4afab1
Author: danakj <danakj@chromium.org>
Date: Thu Apr 19 22:15:46 2018

cc: Renable SoftwareTextureLayerMultipleRegisterTest

After https://chromium-review.googlesource.com/c/chromium/src/+/1019614
the test is no longer failing flakily.

R=piman@chromium.org

Bug:  834613 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I9a26d5e4833e5566d5fd184894d2b6b951226fe1
Reviewed-on: https://chromium-review.googlesource.com/1020287
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552182}
[modify] https://crrev.com/366637efaa81adc37d9687559a4b07937e4afab1/cc/layers/texture_layer_unittest.cc

Sign in to add a comment