New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 693369 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 693203
Owner:
Closed: Feb 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Flaky DCHECK in ~TaskSchedulerImpl during gl_unittests on Nexus 5X

Project Member Reported by ynovikov@chromium.org, Feb 17 2017

Issue description

TaskSchedulerImpl::~TaskSchedulerImpl() {
#if DCHECK_IS_ON()
  DCHECK(join_for_testing_returned_.IsSet());
#endif
}

During investigation of  issue 693203  it was discovered that some tests hit this DCHECK in first try, and then succeed in second try.

For some reason third_party/android_platform/development/scripts/stack doesn't work, so I've tried to disassemble the failing stack manually.
Looks something like:

logging::LogMessage::~LogMessage()
base::internal::TaskSchedulerImpl::~TaskSchedulerImpl()
base::internal::TaskSchedulerImpl::~TaskSchedulerImpl()
base::TaskScheduler::SetInstance(std::__ndk1::unique_ptr<base::TaskScheduler, std::__ndk1::default_delete<base::TaskScheduler> >)
base::TaskScheduler::CreateAndSetDefaultTaskScheduler(std::__ndk1::vector<base::SchedulerWorkerPoolParams, std::__ndk1::allocator<base::SchedulerWorkerPoolParams> > const&, base::Callback<unsigned long (base::TaskTraits const&), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&)
base::TaskScheduler::CreateAndSetSimpleTaskScheduler(int)
gl::GLImageTest<gl::(anonymous namespace)::GLImageSharedMemoryTestDelegate<(gfx::BufferFormat)7> >::SetUp()
void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)
testing::Test::Run()
testing::TestInfo::Run()
testing::TestCase::Run()
testing::internal::UnitTestImpl::RunAllTests()
testing::UnitTest::Run()
base::TestSuite::Run()
base::internal::Invoker<base::internal::BindState<void (disk_cache::BackendImpl::*)(), base::internal::UnretainedWrapper<disk_cache::BackendImpl> >, void ()>::Run(base::internal::BindStateBase*)
base::internal::RunMixin<base::Callback<int (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> >::Run() const
base::LaunchUnitTests(int, char**, base::Callback<int (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&)
main
Java_org_chromium_native_1test_NativeTest_nativeRunTests

fdoray@, looks like you've are the last to make changes in this area in https://codereview.chromium.org/2628313004, could you please take a look?
 

Comment 1 by fdoray@chromium.org, Feb 21 2017

Cc: fdoray@chromium.org
Owner: dcasta...@chromium.org
GLImageTest registers a TaskScheduler in the process https://cs.chromium.org/chromium/src/ui/gl/test/gl_image_test_template.h?q=GLImageTest&sq=package:chromium&dr=CSs&l=167 and never unregisters it. The second GLImageTest running in a process will fail because it will try to register a TaskScheduler when there is already one.

In tests, use base::test::ScopedTaskScheduler instead of base::test::ScopedAsyncTaskScheduler.

I'll update the documentation of base::test::CreateAndSetSimpleTaskScheduler ASAP to mention that it shouldn't be used in tests.

Comment 2 by fdoray@chromium.org, Feb 21 2017

Mergedinto: 693203
Status: Duplicate (was: Assigned)

Sign in to add a comment