New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 661444 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Android MediaRouter only (left Chro...
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

"org.chromium.chrome.browser.customtabs.CustomTabFromChromeExternalNavigationTest#testIntentWithRedirectToApp" is flaky

Project Member Reported by chromium...@appspot.gserviceaccount.com, Nov 2 2016

Issue description

"org.chromium.chrome.browser.customtabs.CustomTabFromChromeExternalNavigationTest#testIntentWithRedirectToApp" is flaky.

This issue was created automatically by the chromium-try-flakes app. Please find the right owner to fix the respective test/step and assign this issue to them. If the step/test is infrastructure-related, please add Infra-Troopers label and change issue status to Untriaged. When done, please remove the issue from Sheriff Bug Queue by removing the Sheriff-Chromium label.

We have detected 3 recent flakes. List of all flakes can be found at https://chromium-try-flakes.appspot.com/all_flake_occurrences?key=ahVzfmNocm9taXVtLXRyeS1mbGFrZXNydwsSBUZsYWtlImxvcmcuY2hyb21pdW0uY2hyb21lLmJyb3dzZXIuY3VzdG9tdGFicy5DdXN0b21UYWJGcm9tQ2hyb21lRXh0ZXJuYWxOYXZpZ2F0aW9uVGVzdCN0ZXN0SW50ZW50V2l0aFJlZGlyZWN0VG9BcHAM.

Flaky tests should be disabled within 30 minutes unless culprit CL is found and reverted. Please see more details here: https://sites.google.com/a/chromium.org/dev/developers/tree-sheriffs/sheriffing-bug-queues#triaging-auto-filed-flakiness-bugs
 
Labels: -Sheriff-Chromium
Owner: tedc...@chromium.org
Status: Assigned (was: Untriaged)
Assigning to tedchoc who created the test - likely the best person to improve it.

I'm going to disable it for now.
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 2 2016

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

commit 4f13b2a4b4e56ade54c33c4660a1a98dd585fa20
Author: kjellander <kjellander@chromium.org>
Date: Wed Nov 02 08:01:10 2016

Disabling CustomTabFromChromeExternalNavigationTest#testIntentWithRedirectToApp due to flakiness

Disabled due to flakiness on linux_android_rel_ng.

BUG= 661444 
TBR=tedchoc@chromium.org

Review-Url: https://codereview.chromium.org/2468163002
Cr-Commit-Position: refs/heads/master@{#429235}

[modify] https://crrev.com/4f13b2a4b4e56ade54c33c4660a1a98dd585fa20/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabFromChromeExternalNavigationTest.java

Cc: tedc...@chromium.org
Owner: zqzh...@chromium.org
Each one of the flakes failed due to this error:
Device(06ad38d6003b700e) 11-02 02:16:01.299 25614 25614 F chromium: [FATAL:media_session_android.cc(41)] Check failed: j_media_session_.is_empty()

Change was introduced yesterday:
https://codereview.chromium.org/2453623003

Since the change landed yesterday, it is probably OK to revert that as well.  I'll let zqzhang@ investigate quickly, but if we can't get that addressed then reverting the offending change is best.
Status: Started (was: Assigned)
Investigating
Cc: jbudorick@chromium.org
 Issue 661288  has been merged into this issue.

Comment 6 by boliu@chromium.org, Nov 2 2016

Cc: torne@chromium.org
Looks like that DCHECK is just wrong. JavaObjectWeakGlobalRef::is_empty doesn't check if the object from the weak ref has been gc-ed, it just means is the weak reference itself null (I guess that sentence would make more sense in java..)

+torne for this totally unexpected api

Anyway, looking at MediaSessionDestroyed, you actually skip nulling out the reference if the referent is already gc-ed. So fix should be to always null out the ref in MediaSessionDestroyed
Project Member

Comment 7 by chromium...@appspot.gserviceaccount.com, Nov 2 2016

Labels: Sheriff-Chromium
Detected 7 new flakes for test/step "org.chromium.chrome.browser.TabsTest#testCloseLastTabFromMain". To see the actual flakes, please visit https://chromium-try-flakes.appspot.com/all_flake_occurrences?key=ahVzfmNocm9taXVtLXRyeS1mbGFrZXNySAsSBUZsYWtlIj1vcmcuY2hyb21pdW0uY2hyb21lLmJyb3dzZXIuVGFic1Rlc3QjdGVzdENsb3NlTGFzdFRhYkZyb21NYWluDA. This message was posted automatically by the chromium-try-flakes app. Since flakiness is ongoing, the issue was moved back into Sheriff Bug Queue (unless already there).
 Issue 661795  has been merged into this issue.
Project Member

Comment 9 by bugdroid1@chromium.org, Nov 3 2016

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

commit 05e950493073776c3f1817cbe11df728c04ebeae
Author: zqzhang <zqzhang@chromium.org>
Date: Thu Nov 03 00:33:10 2016

Fix Java weak reference nullification in MediaSessionAndroid

This CL fixes a Java weak reference nullification issue which happens
when a garbage collection is run between garbage collecting Java
WebContents and MediaSessionAndroid destruction. MediaSessionAndroid
should always unset the Java weak reference when receiving
MediaSessionDestroyed().

This CL also re-enables a flaky test disabled previously due to this
issue.

BUG= 661444 
TBR=tedchoc@chromium.org

Review-Url: https://codereview.chromium.org/2477513002
Cr-Commit-Position: refs/heads/master@{#429476}

[modify] https://crrev.com/05e950493073776c3f1817cbe11df728c04ebeae/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabFromChromeExternalNavigationTest.java
[modify] https://crrev.com/05e950493073776c3f1817cbe11df728c04ebeae/content/browser/media/session/media_session_android.cc

Status: Assigned (was: Started)
From the dashboard, I see after the fix landed, the flakyness is gone, though there are not too many builds after the fix landed.

I'll leave this bug open for a couple of days and see if there are new flakes.

https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=chrome_public_test_apk&tests=CustomTabFromChromeExternalNavigationTest%23testIntentWithRedirectToApp
Once you verify there are no more flakes, can you revert https://codereview.chromium.org/2468163002? 
Already reverted that in the hotfix CL. Otherwise I cannot tell whether it's flaky or not :)
Project Member

Comment 13 by chromium...@appspot.gserviceaccount.com, Nov 3 2016

Detected 5 new flakes for test/step "org.chromium.chrome.browser.TabsTest#testCloseLastTabFromMain". To see the actual flakes, please visit https://chromium-try-flakes.appspot.com/all_flake_occurrences?key=ahVzfmNocm9taXVtLXRyeS1mbGFrZXNySAsSBUZsYWtlIj1vcmcuY2hyb21pdW0uY2hyb21lLmJyb3dzZXIuVGFic1Rlc3QjdGVzdENsb3NlTGFzdFRhYkZyb21NYWluDA. This message was posted automatically by the chromium-try-flakes app.
Hmm, the previous solution did not solve all the flakes. So it should be a chance when GC happens after WebContents.java is gc'ed and before content::MediaSessionImpl is destroyed.

I'll send another fix.
Project Member

Comment 15 by bugdroid1@chromium.org, Nov 4 2016

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

commit a987baac512327c28cf37237f53020a23aa53cc4
Author: zqzhang <zqzhang@chromium.org>
Date: Fri Nov 04 01:38:43 2016

Another fix for MediaSessionAndroid DCHECK on destruction

This CL removes the unnecessary DCHECK for the Java object
in MediaSessionAndroid destruction. This should fix an flaky test
caused by hitting this DCHECK() in some situations.

BUG= 661444 

Review-Url: https://codereview.chromium.org/2479703002
Cr-Commit-Position: refs/heads/master@{#429757}

[modify] https://crrev.com/a987baac512327c28cf37237f53020a23aa53cc4/content/browser/media/session/media_session_android.cc

Labels: -Sheriff-Chromium
taking out of sheriff queue - good luck!
Bo, are you proposing we change the is_empty function of JavaObjectWeakGlobalRef? It's not clear what you meant. I'm tempted to just delete it entirely; there's only a couple of uses of it in the entire tree and they all look a bit dubious.
CL at https://codereview.chromium.org/2485513003/ to fix up JavaObjectWeakGlobalRef to make it harder to abuse by mistake (didn't delete it, there are some reasonable use cases for it).
Status: Fixed (was: Assigned)
The flake is gone :)

Sign in to add a comment