New issue
Advanced search Search tips

Issue 869217 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Jul 31
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

MediaViewerUtils StrictMode violation

Project Member Reported by bsheedy@chromium.org, Jul 31

Issue description

Running VrInstallUpdateInfoBarTest#testInfoBarNotPresentWhenVrServicesCurrent with the same configuration as the CQ bot android-kitkat-arm-rel ends up failing due to a StrictMode violation in MediaViewerUtils. This doesn't appear to have anything to do with VR itself, but rather just part of Chrome startup.

Strangely, this doesn't appear to be appearing on the CQ bot itself, only when manually running the test with the same GN args on the same swarming devices.

GN args:

dcheck_always_on = true
ffmpeg_branding = "Chrome"
is_component_build = false
is_debug = false
proprietary_codecs = true
strip_absolute_paths_from_debug_symbols = true
strip_debug_info = true
symbol_level = 1
target_os = "android"
use_goma = true

Swarming dimensions:
pool = Chrome
device_type = hammerhead
device_os = KTU84P

Failure stack:

Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: StrictMode policy violation; ~duration=37 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=2911 violation=2
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1135)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:106)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at libcore.io.IoBridge.open(IoBridge.java:393)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at com.android.server.pm.Settings.writePackageRestrictionsLPr(Settings.java:1057)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at com.android.server.pm.PackageManagerService.setEnabledSetting(PackageManagerService.java:10328)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at com.android.server.pm.PackageManagerService.setComponentEnabledSetting(PackageManagerService.java:10236)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:1036)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:1523)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at android.os.Binder.execTransact(Binder.java:404)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at dalvik.system.NativeStart.run(Native Method)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: # via Binder call with stack:
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: android.os.StrictMode$LogStackTrace
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at android.os.StrictMode.readAndHandleBinderCallViolations(StrictMode.java:1705)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at android.os.Parcel.readExceptionCode(Parcel.java:1447)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at android.os.Parcel.readException(Parcel.java:1416)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at android.content.pm.IPackageManager$Stub$Proxy.setComponentEnabledSetting(IPackageManager.java:2943)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at android.app.ApplicationPackageManager.setComponentEnabledSetting(ApplicationPackageManager.java:1283)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at org.chromium.chrome.browser.media.MediaViewerUtils.updateMediaLauncherActivityEnabled(MediaViewerUtils.java:187)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at org.chromium.chrome.browser.init.ProcessInitializationHandler.lambda$handleDeferredStartupTasksInitialization$1$ProcessInitializationHandler(ProcessInitializationHandler.java:433)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at org.chromium.chrome.browser.init.ProcessInitializationHandler$$Lambda$1.run(Unknown Source)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at org.chromium.chrome.browser.DeferredStartupHandler.lambda$queueDeferredTasksOnIdleHandler$0$DeferredStartupHandler(DeferredStartupHandler.java:78)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at org.chromium.chrome.browser.DeferredStartupHandler$$Lambda$0.queueIdle(Unknown Source)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at android.os.MessageQueue.next(MessageQueue.java:207)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at android.os.Looper.loop(Looper.java:123)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at android.app.ActivityThread.main(ActivityThread.java:5001)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at java.lang.reflect.Method.invokeNative(Native Method)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at java.lang.reflect.Method.invoke(Method.java:515)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
Device(06abd580003bb7a8) 07-30 23:49:32.439  2139  2139 D StrictMode: 	at dalvik.system.NativeStart.main(Native Method)
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 31

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

commit 82b55ac63bedccb4526f7ad0f0c5480b6709c842
Author: bsheedy <bsheedy@chromium.org>
Date: Tue Jul 31 02:12:23 2018

Fix MediaViewerUtils StrictMode violation

Fixes a StrictMode violation caused by a setComponentEnabledSetting in
MediaViewerUtils by wrapping the offending call in a context that
allows disk reads and writes.

Bug:  869217 
Change-Id: Ide971ab817cc149df3c828b23a9b4bf4015ff711
Reviewed-on: https://chromium-review.googlesource.com/1155974
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579283}
[modify] https://crrev.com/82b55ac63bedccb4526f7ad0f0c5480b6709c842/chrome/android/java/src/org/chromium/chrome/browser/media/MediaViewerUtils.java

Status: Fixed (was: Untriaged)
Labels: -VR-Caught-By-Test XR-Caught-By-Test

Sign in to add a comment