Link to failure: https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.fyi%2FFuchsia__dbg_%2F19577%2F%2B%2Frecipes%2Fsteps%2Fbase_unittests%2F0%2Flogs%2FTaskSchedulerWorkerPoolHistogramTest.NumTasksBeforeCleanup%2F0
[ RUN ] TaskSchedulerWorkerPoolHistogramTest.NumTasksBeforeCleanup
../../base/task_scheduler/scheduler_worker_pool_impl_unittest.cc:732: Failure
Expected equality of these values:
*thread_ref
Which is: 8-byte object <38-DB 63-46 63-27 00-00>
PlatformThread::CurrentRef()
Which is: 8-byte object <38-0B 21-B9 45-14 00-00>
Stack trace:
bt#00: pc 0x41826b4fd88f (libbase.so,0x41888f)
bt#01: end
../../base/task_scheduler/scheduler_worker_pool_impl_unittest.cc:763: Failure
Expected: (thread_ref) != (PlatformThread::CurrentRef()), actual: 8-byte object <38-DB 63-46 63-27 00-00> vs 8-byte object <38-DB 63-46 63-27 00-00>
Worker reused. Worker will not cleanup and the histogram value will be wrong.
Stack trace:
bt#00: pc 0x41826b4fd88f (libbase.so,0x41888f)
bt#01: end
../../base/task_scheduler/scheduler_worker_pool_impl_unittest.cc:784: Failure
Expected equality of these values:
0
histogram->SnapshotSamples()->GetCount(1)
Which is: 1
Stack trace:
bt#00: pc 0x4abf9b607009 (app:/pkg/bin/app,0x142b009)
bt#01: pc 0x4abf9b6229e7 (app:/pkg/bin/app,0x14469e7)
bt#02: pc 0x4abf9b621d87 (app:/pkg/bin/app,0x1445d87)
bt#03: pc 0x4abf9b1b8882 (app:/pkg/bin/app,0xfdc882)
bt#04: pc 0x4abf9b5caa4e (app:/pkg/bin/app,0x13eea4e)
bt#05: end
../../base/task_scheduler/scheduler_worker_pool_impl_unittest.cc:786: Failure
Expected equality of these values:
1
histogram->SnapshotSamples()->GetCount(3)
Which is: 0
Stack trace:
bt#00: pc 0x4abf9b607009 (app:/pkg/bin/app,0x142b009)
bt#01: pc 0x4abf9b6229e7 (app:/pkg/bin/app,0x14469e7)
bt#02: pc 0x4abf9b621d87 (app:/pkg/bin/app,0x1445d87)
bt#03: pc 0x4abf9b1b8cc7 (app:/pkg/bin/app,0xfdccc7)
bt#04: pc 0x4abf9b5caa4e (app:/pkg/bin/app,0x13eea4e)
bt#05: end
[ FAILED ] TaskSchedulerWorkerPoolHistogramTest.NumTasksBeforeCleanup (507 ms)
A pool should always have one alive worker, so it is unlikely that the worker that ran the 2 first tasks was cleaned up by the time the 3rd task runs. However, this could happen:
1. Worker #1: Runs a tasks and empties the sequence, without adding itself to the idle stack yet.
2. Posting thread: Posts another task to the now empty sequence. Wakes up a new worker, since worker #1 isn't on the idle stack yet.
3. Worker #2: Runs the tasks, violating the expectation that the 3 initial tasks run on the same worker.
Comment 1 by bugdroid1@chromium.org
, May 17 2018