New issue
Advanced search Search tips

Issue 855167 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

"org.chromium.chrome.browser.download.DownloadActivityTest#testShareFiles" is flaky

Project Member Reported by chromium...@appspot.gserviceaccount.com, Jun 21 2018

Issue description

"org.chromium.chrome.browser.download.DownloadActivityTest#testShareFiles" 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 4 recent flakes. List of all flakes can be found at https://chromium-try-flakes.appspot.com/all_flake_occurrences?key=ahVzfmNocm9taXVtLXRyeS1mbGFrZXNyUwsSBUZsYWtlIkhvcmcuY2hyb21pdW0uY2hyb21lLmJyb3dzZXIuZG93bmxvYWQuRG93bmxvYWRBY3Rpdml0eVRlc3QjdGVzdFNoYXJlRmlsZXMM.

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: OS-Android
Owner: dtrainor@chromium.org
Status: Assigned (was: Untriaged)
Hi dtrainor, could you help triage this?
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 22 2018

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

commit 055aafbe751ade39703914fc746ceb137543ce62
Author: Darren Shen <shend@chromium.org>
Date: Fri Jun 22 03:37:50 2018

Disable flaky chrome.browser.download.DownloadActivityTest tests

TBR=dtrainor@chromium.org

Bug: 855219, 855168, 855167, 854241
Change-Id: I555f125d6d581e4f7d0361e61bc6a3d2963d37a1
Reviewed-on: https://chromium-review.googlesource.com/1111483
Reviewed-by: Darren Shen <shend@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569525}
[modify] https://crrev.com/055aafbe751ade39703914fc746ceb137543ce62/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadActivityTest.java

Comment 3 by shend@chromium.org, Jun 22 2018

Labels: -Sheriff-Chromium
From my soon-to-be-abandoned disabling patch https://chromium-review.googlesource.com/c/chromium/src/+/1111199

They fail with
android.os.StrictMode$StrictModeViolation: policy=1900575 violation=2
	at android.os.StrictMode.executeDeathPenalty(StrictMode.java:1505)
	at android.os.StrictMode.-wrap3(StrictMode.java)
	at android.os.StrictMode$AndroidBlockGuardPolicy.handleViolation(StrictMode.java:1498)
	at android.os.StrictMode$AndroidBlockGuardPolicy$1.run(StrictMode.java:1380)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:148)
	at android.app.ActivityThread.main(ActivityThread.java:5417)
	at java.lang.reflect.Method.invoke(Method.java)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

See, e.g. https://logs.chromium.org/v/?s=chromium%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8943074896947672416%2F%2B%2Fsteps%2Fchrome_public_test_apk_on_Android_device_Nexus_5X__with_patch__experimental_%2F0%2Flogs%2Forg.chromium.chrome.browser.download.DownloadActivityTest_testSpaceDisplay%2F0

Owner: xingliu@chromium.org
xingliu@ did you fix this for another bug?
I guess Android M still access disk on main thread somewhere.

Comment 7 by ajwong@chromium.org, Jun 25 2018

Yeah... If you look at the full stack trace, android.os.Envrionment.getExternalStorageDirectory() unfortunately triggers a disk read sometimes. I've attempted to repro locally and can't, so my guess is there's some sort of caching behavior which decides whether or not the OS feels a need to build the metadata for the getExternalStorageDirectory().  I don't think you can land the proposed CL with the StrictMode exception removed.

Here's the more relevant log snippet:
  

06-22 07:09:47.877 14382 14382 D StrictMode: StrictMode policy violation; ~duration=1 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=6094879 violation=2
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1263)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at libcore.io.BlockGuardOs.statvfs(BlockGuardOs.java:297)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at java.io.File.getTotalSpace(File.java:1126)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.storage.StorageManager.getStorageLowBytes(StorageManager.java:943)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.storage.VolumeInfo.buildStorageVolume(VolumeInfo.java:362)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at com.android.server.MountService.getVolumeList(MountService.java:2712)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.storage.IMountService$Stub.onTransact(IMountService.java:1648)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.Binder.execTransact(Binder.java:453)
06-22 07:09:47.877 14382 14382 D StrictMode: # via Binder call with stack:
06-22 07:09:47.877 14382 14382 D StrictMode: android.os.StrictMode$LogStackTrace
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.StrictMode.readAndHandleBinderCallViolations(StrictMode.java:1911)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.Parcel.readExceptionCode(Parcel.java:1601)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.Parcel.readException(Parcel.java:1570)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.storage.IMountService$Stub$Proxy.getVolumeList(IMountService.java:772)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.storage.StorageManager.getVolumeList(StorageManager.java:883)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.Environment$UserEnvironment.getExternalDirs(Environment.java:83)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.Environment.getExternalStorageDirectory(Environment.java:340)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at org.chromium.chrome.browser.download.DownloadManagerService$4.onPostExecute(DownloadManagerService.java:1549)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at org.chromium.chrome.browser.download.DownloadManagerService$4.onPostExecute(DownloadManagerService.java:1544)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.AsyncTask.finish(AsyncTask.java:651)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.AsyncTask.-wrap1(AsyncTask.java)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.Handler.dispatchMessage(Handler.java:102)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.os.Looper.loop(Looper.java:148)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at android.app.ActivityThread.main(ActivityThread.java:5417)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at java.lang.reflect.Method.invoke(Method.java)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
06-22 07:09:47.877 14382 14382 D StrictMode: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
06-22 07:09:47.878 14382 14382 D AndroidRuntime: Shutting down com.google.protobuf.nano.MessageNano
06-22 07:09:47.878 14382 14382 D AndroidRuntime: Shutting down com.google.protobuf.nano.MessageNano
06-22 07:09:47.888 14382 14382 E MonitoringInstrumentation: Exception encountered by: Thread[main,5,main]. Dumping thread state to outputs and pining for the fjords.
06-22 07:09:47.888 14382 14382 E MonitoringInstrumentation: android.os.StrictMode$StrictModeViolation: policy=1900575 violation=2
06-22 07:09:47.888 14382 14382 E MonitoringInstrumentation: 	at android.os.StrictMode.executeDeathPenalty(StrictMode.java:1505)
06-22 07:09:47.888 14382 14382 E MonitoringInstrumentation: 	at android.os.StrictMode.-wrap3(StrictMode.java)
06-22 07:09:47.888 14382 14382 E MonitoringInstrumentation: 	at android.os.StrictMode$AndroidBlockGuardPolicy.handleViolation(StrictMode.java:1498)
06-22 07:09:47.888 14382 14382 E MonitoringInstrumentation: 	at android.os.StrictMode$AndroidBlockGuardPolicy$1.run(StrictMode.java:1380)
06-22 07:09:47.888 14382 14382 E MonitoringInstrumentation: 	at android.os.Handler.handleCallback(Handler.java:739)
06-22 07:09:47.888 14382 14382 E MonitoringInstrumentation: 	at android.os.Handler.dispatchMessage(Handler.java:95)
06-22 07:09:47.888 14382 14382 E MonitoringInstrumentation: 	at android.os.Looper.loop(Looper.java:148)
06-22 07:09:47.888 14382 14382 E MonitoringInstrumentation: 	at android.app.ActivityThread.main(ActivityThread.java:5417)
06-22 07:09:47.888 14382 14382 E MonitoringInstrumentation: 	at java.lang.reflect.Method.invoke(Method.java)
06-22 07:09:47.888 14382 14382 E MonitoringInstrumentation: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
06-22 07:09:47.888 14382 14382 E MonitoringInstrumentation: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)


(taken from: https://luci-logdog.appspot.com/v/?s=chromium%2Fandroid%2Fswarming%2Flogcats%2F3e3f14f89c1f9d11%2F%2B%2Flogcat_logcat_org.chromium.chrome.browser.download.DownloadActivityTest.testUndoDeleteFromMenu_20180622T070947-UTC_01e4b07573b23b64)
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 25 2018

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

commit ce3de2d33c08d47444e6f7798cea176654e642a5
Author: Xing Liu <xingliu@chromium.org>
Date: Mon Jun 25 18:46:16 2018

Download location: enable flaky tests in DownloadActivityTest.

The CL that causes the flakiness has been reverted. See:
https://chromium-review.googlesource.com/c/chromium/src/+/1112777
Landed as e4144ed1a4845edb13e3afce024a8cb60588b38f.

This CL enables flaky tests in DownloadActivityTest.

TBR=dtrainor@chromium.org

Bug: 855389,855219,855168,855167
Change-Id: Id53085ed71c5188cd1e7588998bda6f00c7b89a5
Reviewed-on: https://chromium-review.googlesource.com/1113910
Reviewed-by: Xing Liu <xingliu@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570107}
[modify] https://crrev.com/ce3de2d33c08d47444e6f7798cea176654e642a5/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadActivityTest.java

Project Member

Comment 9 by bugdroid1@chromium.org, Jun 25 2018

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

commit 5d4f6fdc1c619ac1e15ade577008de18525a132e
Author: Theresa <twellington@chromium.org>
Date: Mon Jun 25 22:54:43 2018

Revert "Download location: enable flaky tests in DownloadActivityTest."

This reverts commit ce3de2d33c08d47444e6f7798cea176654e642a5.

Reason for revert: Some of the tests are still failing, triggering a try flakes alert. Will you please re-land with the tests we know are passing conditionally re-enabled?


Original change's description:
> Download location: enable flaky tests in DownloadActivityTest.
> 
> The CL that causes the flakiness has been reverted. See:
> https://chromium-review.googlesource.com/c/chromium/src/+/1112777
> Landed as e4144ed1a4845edb13e3afce024a8cb60588b38f.
> 
> This CL enables flaky tests in DownloadActivityTest.
> 
> TBR=dtrainor@chromium.org
> 
> Bug: 855389,855219,855168,855167
> Change-Id: Id53085ed71c5188cd1e7588998bda6f00c7b89a5
> Reviewed-on: https://chromium-review.googlesource.com/1113910
> Reviewed-by: Xing Liu <xingliu@chromium.org>
> Commit-Queue: Xing Liu <xingliu@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#570107}

TBR=dtrainor@chromium.org,xingliu@chromium.org

Change-Id: I7299f6a85b0acd59050f1f26c0f6c8a8fb3626c6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 855389, 855219, 855168, 855167
Reviewed-on: https://chromium-review.googlesource.com/1114044
Reviewed-by: Theresa <twellington@chromium.org>
Commit-Queue: Theresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570215}
[modify] https://crrev.com/5d4f6fdc1c619ac1e15ade577008de18525a132e/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadActivityTest.java

Sign in to add a comment