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

Issue 750196 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
OOO until Feb 4th
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

WebApkVersionManager.updateWebApksIfNeeded warning

Project Member Reported by boliu@chromium.org, Jul 28 2017

Issue description

07-28 15:40:39.909 20408 20417 E StrictMode: java.lang.Throwable: Explicit termination method 'close' not called
07-28 15:40:39.909 20408 20417 E StrictMode: 	at dalvik.system.CloseGuard.open(CloseGuard.java:184)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at dalvik.system.DexFile.<init>(DexFile.java:113)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at dalvik.system.DexFile.loadDex(DexFile.java:151)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at dalvik.system.DexPathList.loadDexFile(DexPathList.java:266)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at dalvik.system.DexPathList.makeDexElements(DexPathList.java:221)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at dalvik.system.DexPathList.<init>(DexPathList.java:112)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at dalvik.system.DexClassLoader.<init>(DexClassLoader.java:57)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at org.chromium.webapk.lib.client.DexOptimizer.optimize(DexOptimizer.java:71)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at org.chromium.chrome.browser.webapps.WebApkVersionManager.updateWebApksIfNeeded(WebApkVersionManager.java:74)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at org.chromium.chrome.browser.init.ProcessInitializationHandler$15.doInBackground$10299ca(ProcessInitializationHandler.java:453)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at org.chromium.chrome.browser.init.ProcessInitializationHandler$15.doInBackground(ProcessInitializationHandler.java:418)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at android.os.AsyncTask$2.call(AsyncTask.java:288)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
07-28 15:40:39.909 20408 20417 E StrictMode: 	at java.lang.Thread.run(Thread.java:841)

Got it on a trybot run from AndroidPaymentAppFinderTest#testValidEvePay1:
https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/350410

Logcat:
https://luci-logdog.appspot.com/v/?s=chromium%2Fandroid%2Fswarming%2Flogcats%2F37a2a5570fcb2411%2F%2B%2Flogcat_org.chromium.chrome.browser.payments.AndroidPaymentAppFinderTest.testValidEvePay1_20170728T154037-UTC_06b71d49f0e94ce3
 
It's an unfortunate bug in Android SDK. Not sure if there's a function to temporarily allow this kind of strictmode violation ?

Comment 2 by wnwen@chromium.org, Sep 18 2017

Blocking: 765936

Comment 3 by wnwen@chromium.org, Sep 18 2017

Cc: wnwen@chromium.org estevenson@chromium.org
Status: Available (was: Untriaged)
We can create a new ThreadPolicy (https://developer.android.com/reference/android/os/StrictMode.ThreadPolicy.Builder.html), set to that with setThreadPolicy (https://developer.android.com/reference/android/os/StrictMode.html#setThreadPolicy(android.os.StrictMode.ThreadPolicy)) and reset after. Much easier with a specific method for try-with-resources in  issue 766228 .

Comment 4 Deleted

This bug is causing multiple flaky failures in chrome_public_test_apk on Android Tests bots.
+Sheriff-Chromium for reference. 
Nothing should've changed in ~months so unclear why this is causing failures now. Is it possible this is listing the strictmode but not the actual reason for test failure?

Comment 7 by wnwen@chromium.org, Sep 20 2017

Summary: WebApkVersionManager.updateWebApksIfNeeded warning (was: WebApkVersionManager.updateWebApksIfNeeded crash)
This isn't actually a crash, it is logged to the system: http://cs/android/libcore/dalvik/src/main/java/dalvik/system/CloseGuard.java?l=291&rcl=cb1c65c89f6ddc06b9205a81a2b08afe0c223d4d

Comment 8 by wnwen@chromium.org, Sep 20 2017

Blocking: -765936

Comment 9 by wnwen@chromium.org, Sep 20 2017

Cc: -wnwen@chromium.org
Owner: wnwen@chromium.org
Status: Assigned (was: Available)
I'll add a whitelist StrictModeContext for this.

Comment 10 by wnwen@chromium.org, Sep 20 2017

Status: Started (was: Assigned)
Project Member

Comment 11 by bugdroid1@chromium.org, Sep 20 2017

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

commit a9c8c78c96f465a3be0b975c5194ee2050870bf7
Author: Peter Wen <wnwen@chromium.org>
Date: Wed Sep 20 21:48:14 2017

Android: Allow disabling StrictMode VM policies

Bugs in Android SDK cause StrictMode for us but it is not actionable for
us. Adding an easy way to disable it.

BUG= 750196 

Change-Id: I7f5edc1700cbe15e00e288210f83cddcae6a4a0d
Reviewed-on: https://chromium-review.googlesource.com/675831
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503259}
[modify] https://crrev.com/a9c8c78c96f465a3be0b975c5194ee2050870bf7/base/android/java/src/org/chromium/base/StrictModeContext.java
[modify] https://crrev.com/a9c8c78c96f465a3be0b975c5194ee2050870bf7/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkVersionManager.java

wnwen: does the above patch fix this bug? if not, is there a followup patch in the works?

Comment 13 by wnwen@chromium.org, Sep 21 2017

Status: Fixed (was: Started)
Yep, fixed. We'll remove the whitelist once the Android SDK is fixed.

Sign in to add a comment