MinidumpUploaderImplTest#testCancelFailedUploadCausesReschedule is flaky |
||||
Issue descriptionThis was reported in crbug.com/785055 https://ci.chromium.org/buildbot/tryserver.chromium.android/linux_android_rel_ng/430011 "MinidumpUploaderImplTest: failure in assertion here: https://codesearch.chromium.org/chromium/src/components/minidump_uploader/android/javatests/src/org/chromium/components/minidump_uploader/MinidumpUploaderImplTest.java?rcl=e21758bf780cf8c25927525be22dac8f54132fd8&l=245. Doesn't get picked up as a test failure because the assertion runs on another thread. +gsennton"
,
Nov 17 2017
This test in itself is not great.. the way the code is set up right now we can't guarantee that uploadsFinished() will be called during the test, so we can't have the test wait for that to be called. Secondly, since uploadsFinished is run on a separate thread (the UI thread), we might run that callback after we have cleaned up the minidump files we added in the test - and since whether we want to reschedule depends on whether there are any files left to upload, the callback will then tell us that we do not want to reschedule - and subsequently cause a crash on the UI thread.. I think if we want to test this properly we have to make the test wait until the UI thread no longer has any pending tasks to execute.
,
Nov 20 2017
,
Dec 21 2017
This is one reason why the linux_android_rel_ng tryserver is unreliable: https://ci.chromium.org/buildbot/tryserver.chromium.android/linux_android_rel_ng/456964 Test log: 12-20 21:53:16.809 22850 22864 I TestRunner: started: testCancelFailedUploadCausesReschedule(org.chromium.components.minidump_uploader.MinidumpUploaderImplTest) 12-20 21:53:16.809 22850 22850 I MonitoringInstrumentation: Activities that are still in CREATED to STOPPED: 0 12-20 21:53:16.819 22850 22869 E cr_MinidumpUploaderImpl: Crash directory doesn't exist! 12-20 21:53:16.819 22850 22869 W dalvikvm: threadid=12: thread exiting with uncaught exception (group=0x41599ba8) 12-20 21:53:16.819 22837 22837 D AndroidRuntime: Shutting down org.chromium.chrome.browser.ApplicationLifetime$Observer 12-20 21:53:16.819 22850 22864 I TestRunner: finished: testCancelFailedUploadCausesReschedule(org.chromium.components.minidump_uploader.MinidumpUploaderImplTest) 12-20 21:53:16.819 22850 22854 D dalvikvm: GC_CONCURRENT freed 341K, 3% free 16946K/17320K, paused 2ms+1ms, total 22ms 12-20 21:53:16.819 22837 22844 D dalvikvm: GC_CONCURRENT freed 102K, 16% free 568K/672K, paused 0ms+0ms, total 2ms 12-20 21:53:16.819 22850 22869 E AndroidRuntime: FATAL EXCEPTION: MinidumpUploader-WorkerThread 12-20 21:53:16.819 22850 22869 E AndroidRuntime: Process: org.chromium.chrome, PID: 22850 12-20 21:53:16.819 22850 22869 E AndroidRuntime: java.lang.AssertionError 12-20 21:53:16.819 22850 22869 E AndroidRuntime: at org.junit.Assert.fail(Assert.java:86) 12-20 21:53:16.819 22850 22869 E AndroidRuntime: at org.junit.Assert.assertTrue(Assert.java:41) 12-20 21:53:16.819 22850 22869 E AndroidRuntime: at org.junit.Assert.assertTrue(Assert.java:52) 12-20 21:53:16.819 22850 22869 E AndroidRuntime: at org.chromium.components.minidump_uploader.MinidumpUploaderImplTest$8.uploadsFinished(MinidumpUploaderImplTest.java:245) 12-20 21:53:16.819 22850 22869 E AndroidRuntime: at org.chromium.components.minidump_uploader.MinidumpUploaderImpl$UploadRunnable.run(MinidumpUploaderImpl.java:95) 12-20 21:53:16.819 22850 22869 E AndroidRuntime: at java.lang.Thread.run(Thread.java:841) 12-20 21:53:16.819 780 792 W ActivityManager: Error in app org.chromium.chrome running instrumentation ComponentInfo{org.chromium.chrome.tests/org.chromium.base.test.BaseChromiumAndroidJUnitRunner}: 12-20 21:53:16.819 780 792 W ActivityManager: java.lang.AssertionError 12-20 21:53:16.819 780 792 W ActivityManager: java.lang.AssertionError 12-20 21:53:17.039 780 792 I ActivityManager: Force stopping org.chromium.chrome appid=10074 user=0: finished inst 12-20 21:53:17.039 780 792 I ActivityManager: Killing 22850:org.chromium.chrome/u0a74 (adj 0): stop org.chromium.chrome 12-20 21:53:17.159 22876 22876 I test_runner_py: END org.chromium.components.minidump_uploader.MinidumpUploaderImplTest#testCancelFailedUploadCausesReschedule Please do something about this test. It's one of the reasons that linux_android_rel_ng is unacceptably flaky.
,
Dec 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/915a3e2fdff7985d6dc755e2ce350a930bce6ac1 commit 915a3e2fdff7985d6dc755e2ce350a930bce6ac1 Author: Gustav Sennton <gsennton@google.com> Date: Fri Dec 22 13:29:16 2017 [Minidump uploader] fix flaky test in MinidumpUploaderImplTest Fix MinidumpUploaderImplTest#testCancelFailedUploadCausesReschedule by waiting for the minidump uploads worker thread to finish before ending the testCancelFailedUploadCausesReschedule test. BUG= 786310 Change-Id: I2cd1cde84faf2f44bd69018ed17bbecaa09d6fb8 Reviewed-on: https://chromium-review.googlesource.com/840682 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Gustav Sennton <gsennton@chromium.org> Cr-Commit-Position: refs/heads/master@{#525982} [modify] https://crrev.com/915a3e2fdff7985d6dc755e2ce350a930bce6ac1/components/minidump_uploader/android/javatests/src/org/chromium/components/minidump_uploader/MinidumpUploaderImplTest.java
,
Dec 22 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by gsennton@chromium.org
, Nov 17 2017