cryptohome: Flaky test ServiceTestNotInitialized.CheckAutoCleanupCallback |
||||
Issue descriptionThe test failed twice in the same build under ASan (and fuzzer) USE flags. Build link: https://build.chromium.org/p/chromiumos/builders/amd64-generic-fuzzer/builds/1318 Log: [0;32m[ RUN ] [mServiceTestNotInitialized.CheckAutoCleanupCallback [0505/134419:WARNING:service_monolithic.cc(80)] Attestation-based enterprise enrollment will not be available. [0505/134419:WARNING:service.cc(761)] TPM is not enabled. Disabling TPM alert metrics [0505/134419:INFO:service.cc(235)] Stopping cryptohome task processing. Error: /var/cache/portage/chromeos-base/cryptohome/out/Default/cryptohome_testrunner: failed with exit code 1 * ERROR: chromeos-base/cryptohome-0.0.1-r2529::chromiumos failed (test phase): * (no error message) * * Call stack: * ebuild.sh, line 133: Called src_test * environment, line 4258: Called platform_src_test * environment, line 3817: Called platform_pkg_test * environment, line 3798: Called platform_test 'run' '/build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/cryptohome_testrunner' * environment, line 3850: Called die * The specific snippet of code: * "${cmd[@]}" || die * * If you need support, post the output of `emerge --info '=chromeos-base/cryptohome-0.0.1-r2529::chromiumos'`, * the complete build log and the output of `emerge -pqv '=chromeos-base/cryptohome-0.0.1-r2529::chromiumos'`. * ASAN error detected: * ================================================================= * ==17==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffb4ab48c0 at pc 0x7fc1666d19ca bp 0x7fc15a13c830 sp 0x7fc15a13c828 * READ of size 8 at 0x7fffb4ab48c0 thread T1253 (MountThread) * #0 0x7fc1666d19c9 in cryptohome::ServiceTestNotInitialized_CheckAutoCleanupCallback_Test::TestBody()::$_0::operator()() const /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2529/work/cryptohome-0.0.1/platform2/cryptohome/service_unittest.cc:344:12 * #1 0x7fc1666d19c9 in base::Time testing::internal::InvokeHelper<base::Time, std::__1::tuple<> >::Invoke<cryptohome::ServiceTestNotInitialized_CheckAutoCleanupCallback_Test::TestBody()::$_0>(cryptohome::ServiceTestNotInitialized_CheckAutoCleanupCallback_Test::TestBody()::$_0, std::__1::tuple<> const&) /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../usr/include/gmock/gmock-generated-actions.h:58:0 * #2 0x7fc1666d19c9 in base::Time testing::internal::InvokeAction<cryptohome::ServiceTestNotInitialized_CheckAutoCleanupCallback_Test::TestBody()::$_0>::Perform<base::Time, std::__1::tuple<> >(std::__1::tuple<> const&) /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../usr/include/gmock/gmock-more-actions.h:61:0 * #3 0x7fc1666d19c9 in testing::PolymorphicAction<testing::internal::InvokeAction<cryptohome::ServiceTestNotInitialized_CheckAutoCleanupCallback_Test::TestBody()::$_0> >::MonomorphicImpl<base::Time ()>::Perform(std::__1::tuple<> const&) /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../usr/include/gmock/gmock-actions.h:446:0 * #4 0x7fc165ec96c6 in testing::Action<base::Time ()>::Perform(std::__1::tuple<> const&) const /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../usr/include/gmock/gmock-actions.h:395:19 * #5 0x7fc165ec9cd1 in testing::internal::ActionResultHolder<base::Time>* testing::internal::ActionResultHolder<base::Time>::PerformAction<base::Time ()>(testing::Action<base::Time ()> const&, testing::internal::Function<base::Time ()>::ArgumentTuple const&) /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../usr/include/gmock/gmock-spec-builders.h:1403:50 * #6 0x7fc165ec78bc in testing::internal::FunctionMockerBase<base::Time ()>::UntypedPerformAction(void const*, void const*) const /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../usr/include/gmock/gmock-spec-builders.h:1542:12 * #7 0x7fc164d17949 in testing::internal::UntypedFunctionMockerBase::UntypedInvokeWith(void const*) /build/amd64-generic/tmp/portage/dev-cpp/gmock-1.8.0/work/googletest-release-1.8.0/googlemock-abi_x86_64.amd64/./src/gmock-spec-builders.cc:411:15 * #8 0x7fc165438cec in testing::internal::FunctionMockerBase<base::Time ()>::InvokeWith(std::__1::tuple<> const&) /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../usr/include/gmock/gmock-spec-builders.h:1585:40 * #9 0x7fc165424757 in testing::internal::FunctionMocker<base::Time ()>::Invoke() /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../usr/include/gmock/gmock-generated-function-mockers.h:80:18 * #10 0x7fc165424757 in cryptohome::MockPlatform::GetCurrentTime() const /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2529/work/cryptohome-0.0.1/platform2/cryptohome/mock_platform.h:163:0 * #11 0x7fc166bedf31 in cryptohome::Service::LowDiskCallback() /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2529/work/cryptohome-0.0.1/platform2/cryptohome/service.cc:2849:46 * #12 0x7fc166c0dcae in void base::internal::RunnableAdapter<void (cryptohome::Service::*)()>::Run<cryptohome::Service*>(cryptohome::Service*&&) /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../usr/include/base-395517/base/bind_internal.h:186:12 * #13 0x7fc166c0dcae in void base::internal::InvokeHelper<false, void, base::internal::RunnableAdapter<void (cryptohome::Service::*)()> >::MakeItSo<cryptohome::Service*>(base::internal::RunnableAdapter<void (cryptohome::Service::*)()>, cryptohome::Service*&&) /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../usr/include/base-395517/base/bind_internal.h:311:0 * #14 0x7fc166c0d94b in base::internal::Invoker<base::IndexSequence<0ul>, base::internal::BindState<base::internal::RunnableAdapter<void (cryptohome::Service::*)()>, void (cryptohome::Service*), base::internal::UnretainedWrapper<cryptohome::Service> >, base::internal::InvokeHelper<false, void, base::internal::RunnableAdapter<void (cryptohome::Service::*)()> >, void ()>::Run(base::internal::BindStateBase*) /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../usr/include/base-395517/base/bind_internal.h:362:12 * #15 0x7fc1628acb9e in base::Callback<void (), (base::internal::CopyMode)1>::Run() const /build/amd64-generic/tmp/portage/chromeos-base/libchrome-395517-r29/work/libchrome-395517/./base/callback.h:397:12 * #16 0x7fc1628acb9e in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask const&) /build/amd64-generic/tmp/portage/chromeos-base/libchrome-395517-r29/work/libchrome-395517/base/debug/task_annotator.cc:51:0 * #17 0x7fc1629d1ffd in base::MessageLoop::RunTask(base::PendingTask const&) /build/amd64-generic/tmp/portage/chromeos-base/libchrome-395517-r29/work/libchrome-395517/base/message_loop/message_loop.cc:478:19 * #18 0x7fc1629d2d93 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask const&) /build/amd64-generic/tmp/portage/chromeos-base/libchrome-395517-r29/work/libchrome-395517/base/message_loop/message_loop.cc:487:5 * #19 0x7fc1629d54a5 in base::MessageLoop::DoDelayedWork(base::TimeTicks*) /build/amd64-generic/tmp/portage/chromeos-base/libchrome-395517-r29/work/libchrome-395517/base/message_loop/message_loop.cc:642:10 * #20 0x7fc1629fdf55 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) /build/amd64-generic/tmp/portage/chromeos-base/libchrome-395517-r29/work/libchrome-395517/base/message_loop/message_pump_default.cc:37:27 * #21 0x7fc1629d08d3 in base::MessageLoop::RunHandler() /build/amd64-generic/tmp/portage/chromeos-base/libchrome-395517-r29/work/libchrome-395517/base/message_loop/message_loop.cc:442:10 * #22 0x7fc162b66bf5 in base::RunLoop::Run() /build/amd64-generic/tmp/portage/chromeos-base/libchrome-395517-r29/work/libchrome-395517/base/run_loop.cc:35:10 * #23 0x7fc1629cd143 in base::MessageLoop::Run() /build/amd64-generic/tmp/portage/chromeos-base/libchrome-395517-r29/work/libchrome-395517/base/message_loop/message_loop.cc:294:12 * #24 0x7fc162d0781e in base::Thread::ThreadMain() /build/amd64-generic/tmp/portage/chromeos-base/libchrome-395517-r29/work/libchrome-395517/base/threading/thread.cc:252:3 * #25 0x7fc162cba673 in base::(anonymous namespace)::ThreadFunc(void*) /build/amd64-generic/tmp/portage/chromeos-base/libchrome-395517-r29/work/libchrome-395517/base/threading/platform_thread_posix.cc:70:13 * #26 0x7fc164d352b7 in start_thread /var/tmp/portage/cross-x86_64-cros-linux-gnu/glibc-2.23-r18/work/glibc-2.23/nptl/pthread_create.c:333:0 * #27 0x7fc1612a7fac in clone /var/tmp/portage/cross-x86_64-cros-linux-gnu/glibc-2.23-r18/work/glibc-2.23/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:109:0 * * Address 0x7fffb4ab48c0 is located in stack of thread T0 at offset 384 in frame * #0 0x7fc166b91fef in cryptohome::Service::StopTasks() /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2529/work/cryptohome-0.0.1/platform2/cryptohome/service.cc:234:0 * * This frame has 1 object(s): * [32, 328) 'ref.tmp' (line 235) <== Memory access at offset 384 overflows this variable * HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork * (longjmp and C++ exceptions *are* supported) * SUMMARY: AddressSanitizer: stack-buffer-overflow (/var/cache/portage/chromeos-base/cryptohome/out/Default/cryptohome_testrunner+0x14f39c9) * Shadow bytes around the buggy address: * 0x10007694e8c0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f3 f3 f3 f3 f3 f3 f3 * 0x10007694e8d0: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 * 0x10007694e8e0: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 f8 f8 f8 f8 * 0x10007694e8f0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 * 0x10007694e900: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 * =>0x10007694e910: f8 f3 f3 f3 f3 f3 f3 f3[f3]f3 f3 f3 00 00 00 00 * 0x10007694e920: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 0x10007694e930: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 0x10007694e940: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 0x10007694e950: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 0x10007694e960: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * Shadow byte legend (one shadow byte represents 8 application bytes): * Addressable: 00 * Partially addressable: 01 02 03 04 05 06 07 * Heap left redzone: fa * Freed heap region: fd * Stack left redzone: f1 * Stack mid redzone: f2 * Stack right redzone: f3 * Stack after return: f5 * Stack use after scope: f8 * Global redzone: f9 * Global init order: f6 * Poisoned by user: f7 * Container overflow: fc * Array cookie: ac * Intra object redzone: bb * ASan internal: fe * Left alloca redzone: ca * Right alloca redzone: cb * Thread T1253 (MountThread) created by T0 here: * #0 0x7fc16534d13d in __interceptor_pthread_create ??:0:0 * #1 0x7fc162cb9057 in base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) /build/amd64-generic/tmp/portage/chromeos-base/libchrome-395517-r29/work/libchrome-395517/base/threading/platform_thread_posix.cc:109:13 * #2 0x7fc162d05962 in base::Thread::StartWithOptions(base::Thread::Options const&) /build/amd64-generic/tmp/portage/chromeos-base/libchrome-395517-r29/work/libchrome-395517/base/threading/thread.cc:115:10 * #3 0x7fc162d0532c in base::Thread::Start() /build/amd64-generic/tmp/portage/chromeos-base/libchrome-395517-r29/work/libchrome-395517/base/threading/thread.cc:85:10 * #4 0x7fc166b9d993 in cryptohome::Service::Initialize() /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2529/work/cryptohome-0.0.1/platform2/cryptohome/service.cc:630:17 * #5 0x7fc1666792c6 in cryptohome::ServiceTestNotInitialized_CheckAutoCleanupCallback_Test::TestBody() /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2529/work/cryptohome-0.0.1/platform2/cryptohome/service_unittest.cc:348:12 * #6 0x7fc164f915f3 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:2402:10 * #7 0x7fc164f915f3 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:2438:0 * #8 0x7fc164f751a0 in testing::Test::Run() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:2474:5 * #9 0x7fc164f762ff in testing::TestInfo::Run() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:2656:11 * #10 0x7fc164f769f6 in testing::TestCase::Run() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:2774:28 * #11 0x7fc164f7f9a6 in testing::internal::UnitTestImpl::RunAllTests() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:4649:43 * #12 0x7fc164f923c3 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:2402:10 * #13 0x7fc164f923c3 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:2438:0 * #14 0x7fc164f7f55e in testing::UnitTest::Run() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:4257:10 * #15 0x7fc166c6e684 in RUN_ALL_TESTS() /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../usr/include/gtest/gtest.h:2233:46 * #16 0x7fc166c6e684 in main /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2529/work/cryptohome-0.0.1/platform2/common-mk/testrunner.cc:16:0 * #17 0x7fc1611d1735 in __libc_start_main /var/tmp/portage/cross-x86_64-cros-linux-gnu/glibc-2.23-r18/work/glibc-2.23/csu/../csu/libc-start.c:289:0 * #18 0x7fc1652bdcd8 in _start ??:0:0 * * ==17==ABORTING
,
May 5 2018
,
May 5 2018
Also failing sometimes in ASan builder. https://uberchromegw.corp.google.com/i/chromiumos/builders/amd64-generic-asan/builds/24896
,
May 7 2018
,
May 9 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/3f5a7afbc0e9498e27c99b3da24d6fdc11e75a3f commit 3f5a7afbc0e9498e27c99b3da24d6fdc11e75a3f Author: Alexey Baskakov <loyso@chromium.org> Date: Wed May 09 14:24:17 2018 cryptohome: Fix Service CheckAutoCleanupCallback unittest crash The current_time lifetime scope should include platform_ lifetime. Widen it as current_time_. BUG= chromium:840108 TEST=cryptohome unit tests Change-Id: I93b7c6268580c653b67e052b1e763e70e10a3fc2 Reviewed-on: https://chromium-review.googlesource.com/1045960 Commit-Ready: Alexey Baskakov <loyso@chromium.org> Tested-by: Alexey Baskakov <loyso@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> [modify] https://crrev.com/3f5a7afbc0e9498e27c99b3da24d6fdc11e75a3f/cryptohome/service_unittest.cc
,
May 9 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by emaxx@chromium.org
, May 5 2018Owner: loyso@chromium.org
Status: Assigned (was: Untriaged)