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

Issue 639352 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Jan 11
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug

Blocking:
issue 619943



Sign in to add a comment

Strict Mode failures on Android L Consumer

Project Member Reported by donnd@chromium.org, Aug 19 2016

Issue description

Looks like https://codereview.chromium.org/2081153005 is causing a strict mode violation in at least one of the new tests on one configuration:

https://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=org.chromium.chrome.browser.offlinepages.OfflinePageUtilsTest%23testCopyToShareableLocation&testType=chrome_public_test_apk

https://build.chromium.org/p/chromium.android/builders/Lollipop%20Consumer%20Tester/builds/2135 has the following:

I  545.754s run_tests_on_device(02157df26c266408)    INSTRUMENTATION_STATUS: test=testCopyToShareableLocation
I  545.754s run_tests_on_device(02157df26c266408)    INSTRUMENTATION_STATUS: class=org.chromium.chrome.test.ChromeActivityTestCaseBase$ChromeUncaughtExceptionHandler
I  545.754s run_tests_on_device(02157df26c266408)    INSTRUMENTATION_STATUS: stack=android.os.StrictMode$StrictModeViolation: policy=2655 violation=2
I  545.755s run_tests_on_device(02157df26c266408)    	at android.os.StrictMode.executeDeathPenalty(StrictMode.java:1379)
I  545.755s run_tests_on_device(02157df26c266408)    	at android.os.StrictMode.access$1300(StrictMode.java:118)
I  545.755s run_tests_on_device(02157df26c266408)    	at android.os.StrictMode$AndroidBlockGuardPolicy.handleViolation(StrictMode.java:1372)
I  545.755s run_tests_on_device(02157df26c266408)    	at android.os.StrictMode$AndroidBlockGuardPolicy$1.run(StrictMode.java:1254)
I  545.755s run_tests_on_device(02157df26c266408)    	at android.os.Handler.handleCallback(Handler.java:739)
I  545.755s run_tests_on_device(02157df26c266408)    	at android.os.Handler.dispatchMessage(Handler.java:95)
I  545.755s run_tests_on_device(02157df26c266408)    	at android.os.Looper.loop(Looper.java:145)
I  545.755s run_tests_on_device(02157df26c266408)    	at android.app.ActivityThread.main(ActivityThread.java:6837)
I  545.755s run_tests_on_device(02157df26c266408)    	at java.lang.reflect.Method.invoke(Native Method)
I  545.756s run_tests_on_device(02157df26c266408)    	at java.lang.reflect.Method.invoke(Method.java:372)
I  545.756s run_tests_on_device(02157df26c266408)    	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
I  545.756s run_tests_on_device(02157df26c266408)    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
I  545.756s run_tests_on_device(02157df26c266408)    
I  545.756s run_tests_on_device(02157df26c266408)    Search logcat for "StrictMode policy violation" for full stack.
I  545.756s run_tests_on_device(02157df26c266408)    INSTRUMENTATION_STATUS_CODE: -1
I  545.756s run_tests_on_device(02157df26c266408)    INSTRUMENTATION_RESULT: shortMsg=android.os.StrictMode$StrictModeViolation
I  545.757s run_tests_on_device(02157df26c266408)    INSTRUMENTATION_RESULT: longMsg=android.os.StrictMode$StrictModeViolation: policy=2655 violation=2
I  545.757s run_tests_on_device(02157df26c266408)    INSTRUMENTATION_CODE: 0
I  545.758s TimeoutThread-1-for-run_tests_on_device(02157df26c266408)  [host]> /b/c/b/Lollipop_Consumer_Tester/src/third_party/android_tools/sdk/platform-tools/adb -s 02157df26c266408 shell '( pm clear org.chromium.chrome );echo %$?'
I  545.772s run_tests_on_device(06157df695aba319)  preparing to run org.chromium.chrome.browser.omaha.ExponentialBackoffSchedulerTest#testExponentialBackoffSchedulerDelayCalculation: {'annotations': {'SmallTest': None, 'Feature': {'value': ['Omaha', 'Sync']}}, 'class': 'org.chromium.chrome.browser.omaha.ExponentialBackoffSchedulerTest', 'method': 'testExponentialBackoffSchedulerDelayCalculation'}
I  545.774s TimeoutThread-1-for-run_tests_on_device(06157df695aba319)  [host]> /b/c/b/Lollipop_Consumer_Tester/src/third_party/android_tools/sdk/platform-tools/adb -s 06157df695aba319 shell '( ( p=org.chromium.chrome.tests;am instrument -w -r -e class '"'"'org.chromium.chrome.browser.omaha.ExponentialBackoffSchedulerTest#testExponentialBackoffSchedulerDelayCalculation'"'"' "$p"/org.chromium.chrome.test.ChromeInstrumentationTestRunner )>/data/local/tmp/temp_file-a607548da9c15 );echo %$?'
I  545.877s TimeoutThread-1-for-delete_temporary_file(03157df350b86801)  [host]> /b/c/b/Lollipop_Consumer_Tester/src/third_party/android_tools/sdk/platform-tools/adb -s 03157df350b86801 shell 'rm -f /data/local/tmp/temp_file-1c0ea362f8ae3'
I  545.904s run_tests_on_device(03157df350b86801)  detected failure in org.chromium.chrome.browser.offlinepages.OfflinePageUtilsTest#testDeleteSharedOfflineFiles. raw output:
I  545.904s run_tests_on_device(03157df350b86801)    INSTRUMENTATION_STATUS: numtests=1
I  545.904s run_tests_on_device(03157df350b86801)    INSTRUMENTATION_STATUS: stream=
I  545.904s run_tests_on_device(03157df350b86801)    org.chromium.chrome.browser.offlinepages.OfflinePageUtilsTest:
I  545.904s run_tests_on_device(03157df350b86801)    INSTRUMENTATION_STATUS: id=InstrumentationTestRunner
I  545.904s run_tests_on_device(03157df350b86801)    INSTRUMENTATION_STATUS: test=testDeleteSharedOfflineFiles
I  545.904s run_tests_on_device(03157df350b86801)    INSTRUMENTATION_STATUS: class=org.chromium.chrome.browser.offlinepages.OfflinePageUtilsTest
I  545.904s run_tests_on_device(03157df350b86801)    INSTRUMENTATION_STATUS: current=1
I  545.904s run_tests_on_device(03157df350b86801)    INSTRUMENTATION_STATUS_CODE: 1
I  545.904s run_tests_on_device(03157df350b86801)    INSTRUMENTATION_STATUS: test=testDeleteSharedOfflineFiles
I  545.904s run_tests_on_device(03157df350b86801)    INSTRUMENTATION_STATUS: class=org.chromium.chrome.test.ChromeActivityTestCaseBase$ChromeUncaughtExceptionHandler
I  545.904s run_tests_on_device(03157df350b86801)    INSTRUMENTATION_STATUS: stack=android.os.StrictMode$StrictModeViolation: policy=2655 violation=2
I  545.904s run_tests_on_device(03157df350b86801)    	at android.os.StrictMode.executeDeathPenalty(StrictMode.java:1379)
I  545.904s run_tests_on_device(03157df350b86801)    	at android.os.StrictMode.access$1300(StrictMode.java:118)
I  545.904s run_tests_on_device(03157df350b86801)    	at android.os.StrictMode$AndroidBlockGuardPolicy.handleViolation(StrictMode.java:1372)
I  545.904s run_tests_on_device(03157df350b86801)    	at android.os.StrictMode$AndroidBlockGuardPolicy$1.run(StrictMode.java:1254)
I  545.904s run_tests_on_device(03157df350b86801)    	at android.os.Handler.handleCallback(Handler.java:739)
I  545.905s run_tests_on_device(03157df350b86801)    	at android.os.Handler.dispatchMessage(Handler.java:95)
I  545.905s run_tests_on_device(03157df350b86801)    	at android.os.Looper.loop(Looper.java:145)
I  545.905s run_tests_on_device(03157df350b86801)    	at android.app.ActivityThread.main(ActivityThread.java:6837)
I  545.905s run_tests_on_device(03157df350b86801)    	at java.lang.reflect.Method.invoke(Native Method)
I  545.905s run_tests_on_device(03157df350b86801)    	at java.lang.reflect.Method.invoke(Method.java:372)
I  545.905s run_tests_on_device(03157df350b86801)    	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
I  545.905s run_tests_on_device(03157df350b86801)    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

Vivian, can you work to fix this?  Looks like that CL is pretty involved so it would be better to fix these failures than to revert the whole CL.

 

Comment 1 by donnd@chromium.org, Aug 19 2016

Labels: -Pri-3 Pri-1

Comment 2 by donnd@chromium.org, Aug 19 2016

Cc: donnd@chromium.org
Summary: OfflinePageUtilsTest Strict Mode failures on Android L Consumer (was: OfflinePageUtilsTest#testCopyToShareableLocation failing due to Strict Mode violation )
There are actually 3 tests that fail consistently on L consumer: testCopyToShareableLocation, testDeleteSharedOfflineFiles, testShowOfflineSnackbarIfNecessary.
testCopyToShareableLocation is flaky on other platforms, but all three fail every time on L Consumer, and we should try to figure out why.

See https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=chrome_public_test_apk&tests=org.chromium.chrome.browser.offlinepages.OfflinePageUtilsTest for details.

The immediate need is to get the test bots to stop failing, so we should add 
DisabledTest(message = " crbug.com/639352 ")
for those three.

Also CC other engineers that understand this code and/or strict mode issues.
Cc: fgor...@chromium.org
Components: UI>Browser>Offline
Labels: -Pri-1 OS-Android Pri-3
Hey, Donn,

could you please explain how you inferred that this is the patch causing the problem? And why does it only happen on L?

I checked out the stdio for chrome_public_test_apk that you are pointing to in #0, and I find a line containing this: shortMsg=android.os.StrictMode$StrictModeViolation
2214 times. I don't suppose just 3 tests generated that. Can you have a trooper look into the bot before you open more issues like that related to these tests?

https://build.chromium.org/p/chromium.android/builders/Lollipop%20Consumer%20Tester/builds/2135/steps/chrome_public_test_apk/logs/stdio


Comment 4 by donnd@chromium.org, Aug 19 2016

Cc: tedc...@chromium.org wnwen@chromium.org
Labels: -Pri-3 Pri-1
Maybe we should revert the CL that introduced the new test?

I asked Ted about Strict Mode violations today and he said "if it's a new test just revert the CL".  
The failing test could indicate a true Strict Mode issue in the code, not just the test.  So reverting the CL is the safe choice.

Evidently it's not just happening on L, I see a failure here on M: https://build.chromium.org/p/chromium.android/builders/Marshmallow%2064%20bit%20Tester/builds/3442/steps/chrome_public_test_apk/logs/stdio
C  876.547s Main  Search logcat for "StrictMode policy violation" for full stack.
C  876.547s Main  [FAIL] org.chromium.chrome.browser.offlinepages.OfflinePageUtilsTest#testCopyToShareableLocation:
C  876.547s Main  junit.framework.AssertionFailedError: Should be able to copy file to shareable location.
C  876.547s Main  	at org.chromium.chrome.browser.offlinepages.OfflinePageUtilsTest.testCopyToShareableLocation(OfflinePageUtilsTest.java:271)
C  876.547s Main  	at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
C  876.547s Main  	at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
C  876.547s Main  	at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
C  876.547s Main  	at org.chromium.chrome.test.ChromeActivityTestCaseBase.runTest(ChromeActivityTestCaseBase.java:726)
C  876.547s Main  	at org.chromium.base.test.BaseTestResult.runParameterized(BaseTestResult.java:161)
C  876.547s Main  	at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:124)
C  876.547s Main  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
C  876.547s Main  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
C  876.547s Main  	at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
C  876.547s Main  	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1879)

Please look at the failure history here to get a broader view of the failures for this new test:
https://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=org.chromium.chrome.browser.offlinepages.OfflinePageUtilsTest%23testCopyToShareableLocation&testType=chrome_public_test_apk

In OfflinePageUtilsTest.java:271 we call a method that does file operations.  Is the main test thread banned from file operations?  I thought that the UI thread was a separate thread for instrumentation tests.

Comment 7 by donnd@chromium.org, Aug 19 2016

Cc: weiran@google.com
Owner: donnd@chromium.org
Looking at the log output of the violation shows where it occurred:

63a29:  08-19 07:41:10.990 26889 26889 D StrictMode: StrictMode policy violation; ~duration=109 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=2655 violation=2
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1137)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at libcore.io.BlockGuardOs.access(BlockGuardOs.java:67)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at java.io.File.doAccess(File.java:283)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at java.io.File.exists(File.java:364)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.content.res.Resources.loadDrawable(Resources.java:3714)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.content.res.Resources.getDrawable(Resources.java:1921)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.content.Context.getDrawable(Context.java:409)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.widget.ImageView.resolveUri(ImageView.java:758)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.widget.ImageView.setImageResource(ImageView.java:409)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at com.android.internal.policy.impl.MultiPhoneWindow$HeaderWindowController.performInflateController(MultiPhoneWindow.java:3800)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at com.android.internal.policy.impl.MultiPhoneWindow$PenWindowController.generateLayout(MultiPhoneWindow.java:3391)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at com.android.internal.policy.impl.MultiPhoneWindow.generatePenWindowLayout(MultiPhoneWindow.java:532)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at com.android.internal.policy.impl.MultiPhoneWindow.generateLayout(MultiPhoneWindow.java:501)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:4334)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java:2227)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:363)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:312)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:277)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at org.chromium.chrome.browser.ChromeActivity.setContentView(ChromeActivity.java:339)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at org.chromium.chrome.browser.init.AsyncInitializationActivity.setContentViewAndLoadLibrary(AsyncInitializationActivity.java:108)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at org.chromium.chrome.browser.init.ChromeBrowserInitializer.handlePreNativeStartup(ChromeBrowserInitializer.java:144)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at org.chromium.chrome.browser.init.AsyncInitializationActivity.onCreateInternal(AsyncInitializationActivity.java:237)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at org.chromium.chrome.browser.init.AsyncInitializationActivity.onCreate(AsyncInitializationActivity.java:210)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.app.Activity.performCreate(Activity.java:6500)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1120)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3072)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3218)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.app.ActivityThread.access$1000(ActivityThread.java:198)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1676)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.os.Handler.dispatchMessage(Handler.java:102)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.os.Looper.loop(Looper.java:145)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at android.app.ActivityThread.main(ActivityThread.java:6837)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at java.lang.reflect.Method.invoke(Native Method)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at java.lang.reflect.Method.invoke(Method.java:372)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
63a29:  08-19 07:41:10.990 26889 26889 D StrictMode:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
63a29:  08-19 07:41:10.990 26889 26889 D AndroidRuntime: Shutting down VM
63a29:  08-19 07:41:11.000 26889 26889 E AndroidRuntime: FATAL EXCEPTION: main
63a29:  08-19 07:41:11.000 26889 26889 E AndroidRuntime: Process: org.chromium.chrome, PID: 26889
63a29:  08-19 07:41:11.000 26889 26889 E AndroidRuntime: android.os.StrictMode$StrictModeViolation: policy=2655 violation=2
63a29:  08-19 07:41:11.000 26889 26889 E AndroidRuntime:        at android.os.StrictMode.executeDeathPenalty(StrictMode.java:1379)
63a29:  08-19 07:41:11.000 26889 26889 E AndroidRuntime:        at android.os.StrictMode.access$1300(StrictMode.java:118)
63a29:  08-19 07:41:11.000 26889 26889 E AndroidRuntime:        at android.os.StrictMode$AndroidBlockGuardPolicy.handleViolation(StrictMode.java:1372)


 I'll work to put together a workaround for this violation.
Project Member

Comment 8 by bugdroid1@chromium.org, Aug 20 2016

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

commit acd088a7ef6ec0ca53889ca735ada8a0151581a7
Author: donnd <donnd@chromium.org>
Date: Sat Aug 20 00:48:33 2016

Workaround for Strict Mode issues on L Consumer devices.

Allow disk writes when the activity is setting the content view for the main layout.
This works around Strict Mode violations we're seeing on tests running on the L Consumer configuration.

BUG= 639352 

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

[modify] https://crrev.com/acd088a7ef6ec0ca53889ca735ada8a0151581a7/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java

Comment 9 by wnwen@chromium.org, Aug 22 2016

Blocking: 619943
Labels: -Pri-1 Pri-3
Owner: ----
Status: Available (was: Assigned)
Thanks for digging in and finding the root cause. Seems like this is crashing in 
MultiPhoneWindow.java, which is Samsung's multiwindow implementation.

Since we've whitelisted it already, lowering priority and tracking it in our 3rd party StrictMode list. The hope is this feedback trickles back and OEMs fix their OS modifications.

Comment 10 Deleted

Comment 11 by donnd@chromium.org, Aug 23 2016

The fix in #8 only fixed part of the problem.  It allowed read/writes during setContentView, but now the subsequent resource inflation is causing IO.  I'll try including that code in the strict-mode block too.

Here's the log output from the current failure:

66408:  08-22 12:24:17.350 10243 10243 D StrictMode: StrictMode policy violation; ~duration=77 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=2655 violation=2
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1137)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at libcore.io.BlockGuardOs.access(BlockGuardOs.java:67)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at java.io.File.doAccess(File.java:283)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at java.io.File.exists(File.java:364)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.content.res.Resources.loadDrawable(Resources.java:3714)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.content.res.TypedArray.getDrawable(TypedArray.java:762)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.graphics.drawable.StateListDrawable.inflateChildElements(StateListDrawable.java:182)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:127)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1192)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.graphics.drawable.Drawable.createFromXml(Drawable.java:1086)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.content.res.Resources.loadDrawableForCookie(Resources.java:3871)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.content.res.Resources.loadDrawable(Resources.java:3755)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.content.res.Resources.getDrawable(Resources.java:1921)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at org.chromium.base.ApiCompatibilityUtils.getDrawable(ApiCompatibilityUtils.java:414)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at org.chromium.chrome.browser.widget.newtab.NewTabButton.<init>(NewTabButton.java:38)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at java.lang.reflect.Constructor.newInstance(Native Method)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.view.LayoutInflater.createView(LayoutInflater.java:614)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:933)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.view.LayoutInflater.rInflate(LayoutInflater.java:821)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.view.LayoutInflater.inflate(LayoutInflater.java:511)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.view.ViewStub.inflate(ViewStub.java:264)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at org.chromium.chrome.browser.ChromeActivity.setContentView(ChromeActivity.java:359)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at org.chromium.chrome.browser.init.AsyncInitializationActivity.setContentViewAndLoadLibrary(AsyncInitializationActivity.java:108)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at org.chromium.chrome.browser.init.ChromeBrowserInitializer.handlePreNativeStartup(ChromeBrowserInitializer.java:144)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at org.chromium.chrome.browser.init.AsyncInitializationActivity.onCreateInternal(AsyncInitializationActivity.java:237)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at org.chromium.chrome.browser.init.AsyncInitializationActivity.onCreate(AsyncInitializationActivity.java:210)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.app.Activity.performCreate(Activity.java:6500)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1120)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3072)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3218)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.app.ActivityThread.access$1000(ActivityThread.java:198)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1676)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.os.Handler.dispatchMessage(Handler.java:102)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.os.Looper.loop(Looper.java:145)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at android.app.ActivityThread.main(ActivityThread.java:6837)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at java.lang.reflect.Method.invoke(Native Method)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at java.lang.reflect.Method.invoke(Method.java:372)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
66408:  08-22 12:24:17.350 10243 10243 D StrictMode:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
66408:  08-22 12:24:17.350 10243 10243 D AndroidRuntime: Shutting down VM
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime: FATAL EXCEPTION: main
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime: Process: org.chromium.chrome, PID: 10243
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime: android.os.StrictMode$StrictModeViolation: policy=2655 violation=2
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime:        at android.os.StrictMode.executeDeathPenalty(StrictMode.java:1379)
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime:        at android.os.StrictMode.access$1300(StrictMode.java:118)
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime:        at android.os.StrictMode$AndroidBlockGuardPolicy.handleViolation(StrictMode.java:1372)
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime:        at android.os.StrictMode$AndroidBlockGuardPolicy$1.run(StrictMode.java:1254)
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:739)
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:95)
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:145)
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6837)
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Method.java:372)
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
66408:  08-22 12:24:17.360 10243 10243 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
66408:  08-22 12:24:17.360  3585  4739 V ApplicationPolicy: isApplicationStateBlocked userId 0 pkgname org.chromium.chrome
66408:  08-22 12:24:17.360  3585  4739 W ActivityManager: Error in app org.chromium.chrome running instrumentation ComponentInfo{org.chromium.chrome.tests/org.chromium.chrome.test.ChromeInstrumentationTestRunner}:
66408:  08-22 12:24:17.360  3585  4739 W ActivityManager:   android.os.StrictMode$StrictModeViolation
66408:  08-22 12:24:17.360  3585  4739 W ActivityManager:   android.os.StrictMode$StrictModeViolation: policy=2655 violation=2


Comment 12 by wnwen@chromium.org, Aug 23 2016

Wow, this seems pretty bad, reading resource files on the UI thread on startup. Is this resource inflation a third-party issue like the last one or does this happen for all our users?

Comment 13 by donnd@chromium.org, Aug 23 2016

Cc: candr...@chromium.org
Based solely on the fact that we only see this issue consistently on the L Consumer bot, I would think that this must be a third-party issue.  I have not run the tests on an L Consumer device -- that seems like something we need to do in order to validate the next attempted workaround.

Peter, do you have access to an L Consumer device?

Christine, do you know if we have an L Consumer device in the test pool that I can borrow?

Comment 14 by wnwen@chromium.org, Aug 23 2016

Unfortunately I don't have an L Consumer device, from the codename zeroflte it seems to be the S6.
Project Member

Comment 15 by bugdroid1@chromium.org, Aug 23 2016

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

commit a1235d7c247cbb55a06f648cda088272fb3c8729
Author: donnd <donnd@chromium.org>
Date: Tue Aug 23 21:19:22 2016

Expand the workaround for Strict Mode issues on L Consumer.

Expands the code section that allows I/O during
ChromeActivity#setContentView. Now I/O is also allowed during the resource
inflation of the toolbar container.

This works around Strict Mode violations we're seeing on tests running on
the L Consumer configuration.

BUG= 639352 

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

[modify] https://crrev.com/a1235d7c247cbb55a06f648cda088272fb3c8729/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java

Comment 16 by donnd@chromium.org, Aug 25 2016

Status: Started (was: Assigned)
It looks like the latest CL fixed the initialization sequence, but we still have an issue when resuming the activity in the window manager when getting the display setup:

63a29:  08-25 06:13:03.520  6187  6187 D StrictMode: StrictMode policy violation; ~duration=7 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=2911 violation=2
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1137)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at libcore.io.BlockGuardOs.access(BlockGuardOs.java:67)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at java.io.File.doAccess(File.java:283)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at java.io.File.exists(File.java:364)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.os.DcsHelper.getInstance(DcsHelper.java:61)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.content.pm.PackageParser.generateApplicationInfo(PackageParser.java:4849)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at com.android.server.pm.PackageManagerService.getApplicationInfo(PackageManagerService.java:3390)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:202)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3014)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.os.Binder.execTransact(Binder.java:461)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode: # via Binder call with stack:
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode: android.os.StrictMode$LogStackTrace
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.os.StrictMode.readAndHandleBinderCallViolations(StrictMode.java:1717)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.os.Parcel.readExceptionCode(Parcel.java:1527)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.os.Parcel.readException(Parcel.java:1496)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.content.pm.IPackageManager$Stub$Proxy.getApplicationInfo(IPackageManager.java:2386)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:322)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.hardware.display.SecWifiDisplayUtil.<init>(SecWifiDisplayUtil.java:48)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.hardware.display.DisplayManager.<init>(DisplayManager.java:733)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.app.ContextImpl$25.createService(ContextImpl.java:609)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.app.ContextImpl$ServiceFetcher.getService(ContextImpl.java:414)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.app.ContextImpl.getSystemService(ContextImpl.java:2367)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.view.ContextThemeWrapper.getSystemService(ContextThemeWrapper.java:113)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.app.Activity.getSystemService(Activity.java:5466)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.view.ViewRootImpl.<init>(ViewRootImpl.java:531)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:287)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:87)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4112)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3229)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.app.ActivityThread.access$1000(ActivityThread.java:198)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1676)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.os.Handler.dispatchMessage(Handler.java:102)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.os.Looper.loop(Looper.java:145)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at android.app.ActivityThread.main(ActivityThread.java:6837)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at java.lang.reflect.Method.invoke(Native Method)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at java.lang.reflect.Method.invoke(Method.java:372)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
63a29:  08-25 06:13:03.520  6187  6187 D StrictMode:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
63a29:  08-25 06:13:03.520  6187  6187 D AndroidRuntime: Shutting down VM
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime: FATAL EXCEPTION: main
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime: Process: org.chromium.chrome, PID: 6187
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime: android.os.StrictMode$StrictModeViolation: policy=2655 violation=2
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime:        at android.os.StrictMode.executeDeathPenalty(StrictMode.java:1379)
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime:        at android.os.StrictMode.access$1300(StrictMode.java:118)
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime:        at android.os.StrictMode$AndroidBlockGuardPolicy.handleViolation(StrictMode.java:1372)
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime:        at android.os.StrictMode$AndroidBlockGuardPolicy$1.run(StrictMode.java:1254)
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:739)
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:95)
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:145)
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6837)
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Method.java:372)
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
63a29:  08-25 06:13:03.520  6187  6187 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
63a29:  08-25 06:13:03.530  3651  4029 V ApplicationPolicy: isApplicationStateBlocked userId 0 pkgname org.chromium.chrome
63a29:  08-25 06:13:03.530  3651  4029 W ActivityManager: Error in app org.chromium.chrome running instrumentation ComponentInfo{org.chromium.chrome.tests/org.chromium.chrome.test.ChromeInstrumentationTestRunner}:
63a29:  08-25 06:13:03.530  3651  4029 W ActivityManager:   android.os.StrictMode$StrictModeViolation
63a29:  08-25 06:13:03.530  3651  4029 W ActivityManager:   android.os.StrictMode$StrictModeViolation: policy=2655 violation=2
63a29:  08-25 06:13:03.530  6172  6172 D AndroidRuntime: Shutting down VM

Comment 17 by donnd@chromium.org, Aug 26 2016

I may not get to work on this again until my next Sheriff rotation.
Cc: -fgor...@chromium.org
Components: -UI>Browser>Offline
Summary: Strict Mode failures on Android L Consumer (was: OfflinePageUtilsTest Strict Mode failures on Android L Consumer )
Removing offline pages related info from summary and component as it is unrelated.
You started fixing this bug over two years ago. Are you still working on it? 
Status: WontFix (was: Started)
No longer happening.

Sign in to add a comment