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

Issue 724534 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

StrictMode violation in testEnterUrlBeforeNativeIsLoaded

Project Member Reported by mikec...@chromium.org, May 19 2017

Issue description

Seeing this error in testEnterUrlBeforeNativeIsLoaded
https://uberchromegw.corp.google.com/i/chromium.android/builders/Marshmallow%20Tablet%20Tester/builds/8469

41e30:  05-19 06:50:34.756  5481  5481 D StrictMode: StrictMode policy violation; ~duration=12 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=1900575 violation=2
41e30:  05-19 06:50:34.756  5481  5481 D StrictMode:   at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1263)
41e30:  05-19 06:50:34.756  5481  5481 D StrictMode:    at android.app.SharedPreferencesImpl.awaitLoadedLocked(SharedPreferencesImpl.java:203)
41e30:  05-19 06:50:34.756  5481  5481 D StrictMode:    at android.app.SharedPreferencesImpl.edit(SharedPreferencesImpl.java:284)
41e30:  05-19 06:50:34.756  5481  5481 D StrictMode:    at org.chromium.chrome.browser.customtabs.RequestThrottler.purgeOldEntries(RequestThrottler.java:215)
41e30:  05-19 06:50:34.756  5481  5481 D StrictMode:    at org.chromium.chrome.browser.customtabs.RequestThrottler.getForUid(RequestThrottler.java:131)
41e30:  05-19 06:50:34.756  5481  5481 D StrictMode:    at org.chromium.chrome.browser.customtabs.CustomTabsConnection$2.run(CustomTabsConnection.java:304)
41e30:  05-19 06:50:34.756  5481  5481 D StrictMode:    at android.os.Handler.handleCallback(Handler.java:739)
41e30:  05-19 06:50:34.756  5481  5481 D StrictMode:    at android.os.Handler.dispatchMessage(Handler.java:95)
41e30:  05-19 06:50:34.756  5481  5481 D StrictMode:    at android.os.Looper.loop(Looper.java:148)
41e30:  05-19 06:50:34.756  5481  5481 D StrictMode:    at android.app.ActivityThread.main(ActivityThread.java:5417)
41e30:  05-19 06:50:34.756  5481  5481 D StrictMode:    at java.lang.reflect.Method.invoke(Native Method)
41e30:  05-19 06:50:34.756  5481  5481 D StrictMode:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
41e30:  05-19 06:50:34.756  5481  5481 D StrictMode:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Can see some more of the logcat here...
https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.android%2FMarshmallow_Tablet_Tester%2F8469%2F%2B%2Flogcat_org.chromium.chrome.browser.searchwidget.SearchActivityTest.testEnterUrlBeforeNativeIsLoaded_20170519T135032-UTC_0b041e30

But some of the logcat seems to be missing from the above link.
https://bugs.chromium.org/p/chromium/issues/detail?id=724528

Do you know what is up?
 
Cc: dfalcant...@chromium.org
Owner: tedc...@chromium.org
Not seeing anything useful in the log, but I wouldn't be surprised if it was because we have to actually edit the shared prefs as the test runs.
Cc: tedc...@chromium.org lizeb@chromium.org
Owner: yus...@chromium.org
It isn't in the test code but the CCT RequestThrottler logic, so sending in to the CCT folk to investigate.

SearchActivity calls CustomTabsConnection.getInstance(getApplication()).warmup, which likely triggers this path.
Cc: yus...@chromium.org
 Issue 728643  has been merged into this issue.
Labels: -Pri-3 Pri-2
We're hitting this frequently enough that I don't think it should stay a P3.

Comment 5 by lizeb@chromium.org, Jun 2 2017

Owner: lizeb@chromium.org
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 7 2017

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

commit 7b00acc99eb8c9b4ddffda41f9215fff02c31b0b
Author: lizeb <lizeb@chromium.org>
Date: Wed Jun 07 10:06:16 2017

customtabs: Load the SharedPreferences only once, in the background.

RequestThrottler needs to access SharedPreferences, triggering a
StrictMode violation at the first access. Make sure that this access is
from an AsyncTask, and that we execute the AsyncTask only once (for
efficiency).

BUG= 724534 

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

[modify] https://crrev.com/7b00acc99eb8c9b4ddffda41f9215fff02c31b0b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
[modify] https://crrev.com/7b00acc99eb8c9b4ddffda41f9215fff02c31b0b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/RequestThrottler.java

Comment 7 by lizeb@chromium.org, Jun 26 2017

Status: Fixed (was: Assigned)

Sign in to add a comment