New issue
Advanced search Search tips

Issue 849817 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Fuchsia
Pri: 1
Type: Bug



Sign in to add a comment

TaskSchedulerSingleThreadTaskRunnerManagerStartTest.PostTaskBeforeStart flakes under Fuchsia/x64/Debug

Project Member Reported by w...@chromium.org, Jun 5 2018

Issue description

This test flaked in run https://ci.chromium.org/buildbot/chromium.fyi/Fuchsia%20%28dbg%29/20358:

[ RUN      ] TaskSchedulerSingleThreadTaskRunnerManagerStartTest.PostTaskBeforeStart
[110746:706915339:0605/193019.198939:119893475:FATAL:scheduler_worker.cc(92)] Check failed: !should_exit_.IsSet().
#00: base::debug::StackTrace::StackTrace(unsigned long) at ??:?
#01: base::debug::StackTrace::StackTrace() at ??:?
#02: logging::LogMessage::~LogMessage() at ??:?
#03: base::internal::SchedulerWorker::WakeUp() at ??:?
#04: base::internal::SchedulerSingleThreadTaskRunnerManager::Start(base::SchedulerWorkerObserver*) at ??:?
#05: base::internal::TaskSchedulerSingleThreadTaskRunnerManagerStartTest_PostTaskBeforeStart_Test::TestBody() at scheduler_single_thread_task_runner_manager_unittest.cc:?
#06: void testing::internal::InvokeHelper<void, std::__2::tuple<> >::InvokeMethod<base::RunLoop, void (base::RunLoop::*)()>(base::RunLoop*, void (base::RunLoop::*)(), std::__2::tuple<> const&) at file_descriptor_watcher_posix_unittest.cc:?
#07: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) at gtest.cc:?
#08: testing::Test::Run() at gtest.cc:?
#09: testing::TestInfo::Run() at gtest.cc:?
#10: testing::TestCase::Run() at gtest.cc:?
#11: testing::internal::UnitTestImpl::RunAllTests() at gtest.cc:?
#12: bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) at gtest.cc:?
#13: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) at gtest.cc:?
#14: testing::UnitTest::Run() at gtest.cc:?
#15: RUN_ALL_TESTS() at test_suite.cc:?
#16: base::TestSuite::Run() at test_suite.cc:?
#17: void base::internal::FunctorTraits<void (base::WaitableEvent::*)(), void>::Invoke<void (base::WaitableEvent::*)(), base::WaitableEvent*>(void (base::WaitableEvent::*)(), base::WaitableEvent*&&) at task_annotator_unittest.cc:?
#18: void base::internal::InvokeHelper<false, void>::MakeItSo<void (base::WaitableEvent::*)(), base::WaitableEvent*>(void (base::WaitableEvent::*&&)(), base::WaitableEvent*&&) at task_annotator_unittest.cc:?
#19: int base::internal::Invoker<base::internal::BindState<int (base::MockCallback<base::OnceCallback<int ()> >::*)(), base::internal::UnretainedWrapper<base::MockCallback<base::OnceCallback<int ()> > > >, int ()>::RunImpl<int (base::MockCallback<base::OnceCallback<int ()> >::*)(), std::__2::tuple<base::internal::UnretainedWrapper<base::MockCallback<base::OnceCallback<int ()> > > >, 0ul>(int (base::MockCallback<base::OnceCallback<int ()> >::*&&)(), std::__2::tuple<base::internal::UnretainedWrapper<base::MockCallback<base::OnceCallback<int ()> > > >&&, std::__2::integer_sequence<unsigned long, 0ul>) at mock_callback_unittest.cc:?
#20: base::internal::Invoker<base::internal::BindState<int (base::MockCallback<base::RepeatingCallback<int ()> >::*)(), base::internal::UnretainedWrapper<base::MockCallback<base::RepeatingCallback<int ()> > > >, int ()>::Run(base::internal::BindStateBase*) at mock_callback_unittest.cc:?
#21: base::OnceCallback<int ()>::Run() && at bind_unittest.cc:?
#22: base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) at unit_test_launcher.cc:?
#23: base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) at unit_test_launcher.cc:?
#24: main at run_all_base_unittests.cc:?
#25: pc 0x50954d37532e (libc.so,0x1a32e)

We've seen a number of TaskScheduler flakes crop up over the past week or so.  Assigning to fdoray@ based on https://chromium-review.googlesource.com/c/chromium/src/+/1080259.
 

Comment 1 by gab@chromium.org, Jun 27 2018

Cc: fdoray@chromium.org
Owner: gab@chromium.org
Status: WontFix (was: Assigned)
This is infeasible IMO, this is a single-threaded test (until the point of the crash that is). Only memory corruption can lead to this as far as I can tell (and what caused that can be far out of this test's reach...).

Is that the only test failing as such?


Analysis:

|SchedulerWorker::should_exit_| is only set by its owning SingleThreadTaskRunnerManager in JoinForTesting() (at test TearDown()); or when the corresponding DEDICATED SingleThreadTaskRunner's last ref is released but that's impossible at this point as the task posted by this test holds a ref via |single_thread_task_runner_ref| and hasn't run yet, since we're in Start().

Therefore it is impossible for |should_exit_| to have been set at this point. Also, this is member state and isn't reachable statically, nor via TLS; and as such corruption by a previous test is also out of the question.

A thread dump would have been useful (e.g. are there rogue threads from previous bad tests running around and screwing with memory..?). On Monday Ryan fixed some PartionAlloc OOM tests that resulted in an unstable heap for future tests in the same process (https://chromium-review.googlesource.com/c/chromium/src/+/1106602), maybe related..?


I'll WontFix as Infeasible for now...

Sign in to add a comment