WatchdogTest.DisarmTest sometimes fails on Fuchsia |
|||
Issue description[00310.034] 02425.02552> [ RUN ] WatchdogTest.DisarmTest [00310.034] 02425.02552> ../../base/threading/watchdog_unittest.cc:136: Failure [00310.034] 02425.02552> Expected: ((base::TimeTicks::Now() - start).InMilliseconds()) <= (kTimeout.InMilliseconds()), actual: 300046 vs 300000 [00310.034] 02425.02552> Timed out [00310.034] 02425.02552> ../../base/threading/watchdog_unittest.cc:138: Failure [00310.034] 02425.02552> Expected: 1 [00310.034] 02425.02552> To be equal to: watchdog.alarm_counter() [00310.034] 02425.02552> Which is: 0 [00310.034] 02425.02552> [ FAILED ] WatchdogTest.DisarmTest (301148 ms) Seems similar to bug 734130 , bug 734218 , bug 734216 .
,
Jun 17 2017
Oh, actually TimeTicks is int64_t, even though mx_time_t is uint64_t. But, when the watchdog time gets armed for approximately -9s (i.e. start_time_ of -9s here https://cs.chromium.org/chromium/src/base/threading/watchdog.cc?rcl=1a947b509b80615967ccdc266ba06ffd7eaf4dbe&l=98 then in the main wakeup thread https://cs.chromium.org/chromium/src/base/threading/watchdog.cc?rcl=1a947b509b80615967ccdc266ba06ffd7eaf4dbe&l=134 it thinks it's really late so the hung-in-a-debugger path kicks in static_data->last_debugged_alarm_time > watchdog_->start_time_ and the alarm is disarmed and ignored, rather than triggered and disarmed. I think the correct fix is probably to initialize last_debugged_alarm_time to int64_t::min, rather than 0. +miu might be interested in this behaviour.
,
Jun 21 2017
Fixed by https://chromium-review.googlesource.com/c/539058/ when bugdroid was on vacation. |
|||
►
Sign in to add a comment |
|||
Comment 1 by scottmg@chromium.org
, Jun 17 2017