cryptohome unit test failing on asan builders |
||||
Issue descriptionhttps://ci.chromium.org/p/chromeos/builders/luci.chromeos.general/Prod/b8937995673212092416 cryptohome-0.0.1-r2632: * ASAN error detected: cryptohome-0.0.1-r2632: * ================================================================= cryptohome-0.0.1-r2632: * ==17==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffcdfc7cc34 at pc 0x7f0e3fba0c2d bp 0x7ffcdfc7c530 sp 0x7ffcdfc7c528 cryptohome-0.0.1-r2632: * READ of size 4 at 0x7ffcdfc7cc34 thread T0 cryptohome-0.0.1-r2632: * #0 0x7f0e3fba0c2c in cryptohome::Mount::MountDaemonStoreDirectories(base::FilePath const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2632/work/cryptohome-0.0.1/platform2/cryptohome/mount.cc:2045:69 cryptohome-0.0.1-r2632: * #1 0x7f0e3fb8736d in cryptohome::Mount::MountHomesAndDaemonStores(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, base::FilePath const&, base::FilePath const&) /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2632/work/cryptohome-0.0.1/platform2/cryptohome/mount.cc:1992:8 cryptohome-0.0.1-r2632: * #2 0x7f0e3fb82c48 in cryptohome::Mount::MountCryptohomeInner(cryptohome::Credentials const&, cryptohome::Mount::MountArgs const&, bool, cryptohome::MountError*) /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2632/work/cryptohome-0.0.1/platform2/cryptohome/mount.cc:637:8 cryptohome-0.0.1-r2632: * #3 0x7f0e3fb7d492 in cryptohome::Mount::MountCryptohome(cryptohome::Credentials const&, cryptohome::Mount::MountArgs const&, cryptohome::MountError*) /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2632/work/cryptohome-0.0.1/platform2/cryptohome/mount.cc:291:17 cryptohome-0.0.1-r2632: * #4 0x7f0e3f3fecff in cryptohome::MountTest_MountCryptohomeHasPrivileges_Test::TestBody() /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2632/work/cryptohome-0.0.1/platform2/cryptohome/mount_unittest.cc:534:3 cryptohome-0.0.1-r2632: * #5 0x7f0e3e5faf93 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 cryptohome-0.0.1-r2632: * #6 0x7f0e3e5faf93 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 cryptohome-0.0.1-r2632: * #7 0x7f0e3e5e16a0 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 cryptohome-0.0.1-r2632: * #8 0x7f0e3e5e25ff 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 cryptohome-0.0.1-r2632: * #9 0x7f0e3e5e2c86 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 cryptohome-0.0.1-r2632: * #10 0x7f0e3e5eb7e6 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 cryptohome-0.0.1-r2632: * #11 0x7f0e3e5fbab3 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 cryptohome-0.0.1-r2632: * #12 0x7f0e3e5fbab3 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 cryptohome-0.0.1-r2632: * #13 0x7f0e3e5eb39e 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 cryptohome-0.0.1-r2632: * #14 0x7f0e3fc87695 in RUN_ALL_TESTS() /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../usr/include/gtest/gtest.h:2233:46 cryptohome-0.0.1-r2632: * #15 0x7f0e3fc87695 in main /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2632/work/cryptohome-0.0.1/platform2/common-mk/testrunner.cc:16:0 cryptohome-0.0.1-r2632: * #16 0x7f0e3b46c735 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 cryptohome-0.0.1-r2632: * #17 0x7f0e3e6e23d8 in _start ??:0:0 cryptohome-0.0.1-r2632: * cryptohome-0.0.1-r2632: * Address 0x7ffcdfc7cc34 is located in stack of thread T0 at offset 1780 in frame cryptohome-0.0.1-r2632: * #0 0x7f0e3fb9f8bf in cryptohome::Mount::MountDaemonStoreDirectories(base::FilePath const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2632/work/cryptohome-0.0.1/platform2/cryptohome/mount.cc:1999:0 cryptohome-0.0.1-r2632: * cryptohome-0.0.1-r2632: * This frame has 16 object(s): cryptohome-0.0.1-r2632: * [32, 40) 'file_enumerator' (line 2003) cryptohome-0.0.1-r2632: * [64, 88) 'ref.tmp' (line 2003) cryptohome-0.0.1-r2632: * [128, 152) 'etc_daemon_store_path' (line 2008) cryptohome-0.0.1-r2632: * [192, 216) 'ref.tmp4' (line 2009) cryptohome-0.0.1-r2632: * [256, 280) 'ref.tmp14' (line 2010) cryptohome-0.0.1-r2632: * [320, 344) 'run_daemon_store_path' (line 2013) cryptohome-0.0.1-r2632: * [384, 408) 'ref.tmp15' (line 2014) cryptohome-0.0.1-r2632: * [448, 752) 'ref.tmp26' (line 2017) cryptohome-0.0.1-r2632: * [816, 840) 'mount_source' (line 2023) cryptohome-0.0.1-r2632: * [880, 904) 'mount_target' (line 2026) cryptohome-0.0.1-r2632: * [944, 960) 'agg.tmp48' cryptohome-0.0.1-r2632: * [976, 1280) 'ref.tmp62' (line 2030) cryptohome-0.0.1-r2632: * [1344, 1648) 'ref.tmp97' (line 2035) cryptohome-0.0.1-r2632: * [1712, 1896) 'ref.tmp121' (line 2044) <== Memory access at offset 1780 is inside this variable cryptohome-0.0.1-r2632: * [1968, 2272) 'ref.tmp145' (line 2048) cryptohome-0.0.1-r2632: * [2336, 2640) 'ref.tmp182' (line 2056) cryptohome-0.0.1-r2632: * HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork cryptohome-0.0.1-r2632: * (longjmp and C++ exceptions *are* supported) cryptohome-0.0.1-r2632: * SUMMARY: AddressSanitizer: stack-use-after-scope (/var/cache/portage/chromeos-base/cryptohome/out/Default/cryptohome_testrunner+0x157ec2c) cryptohome-0.0.1-r2632: * Shadow bytes around the buggy address: cryptohome-0.0.1-r2632: * 0x10001bf87930: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 cryptohome-0.0.1-r2632: * 0x10001bf87940: f8 f8 f8 f8 f8 f8 f8 f8 f2 f2 f2 f2 f2 f2 f2 f2 cryptohome-0.0.1-r2632: * 0x10001bf87950: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 cryptohome-0.0.1-r2632: * 0x10001bf87960: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 cryptohome-0.0.1-r2632: * 0x10001bf87970: f8 f8 f8 f8 f8 f8 f2 f2 f2 f2 f2 f2 f2 f2 f8 f8 cryptohome-0.0.1-r2632: * =>0x10001bf87980: f8 f8 f8 f8 f8 f8[f8]f8 f8 f8 f8 f8 f8 f8 f8 f8 cryptohome-0.0.1-r2632: * 0x10001bf87990: f8 f8 f8 f8 f8 f2 f2 f2 f2 f2 f2 f2 f2 f2 f8 f8 cryptohome-0.0.1-r2632: * 0x10001bf879a0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 cryptohome-0.0.1-r2632: * 0x10001bf879b0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 cryptohome-0.0.1-r2632: * 0x10001bf879c0: f8 f8 f8 f8 f2 f2 f2 f2 f2 f2 f2 f2 f8 f8 f8 f8 cryptohome-0.0.1-r2632: * 0x10001bf879d0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 cryptohome-0.0.1-r2632: * Shadow byte legend (one shadow byte represents 8 application bytes): cryptohome-0.0.1-r2632: * Addressable: 00 cryptohome-0.0.1-r2632: * Partially addressable: 01 02 03 04 05 06 07 cryptohome-0.0.1-r2632: * Heap left redzone: fa cryptohome-0.0.1-r2632: * Freed heap region: fd cryptohome-0.0.1-r2632: * Stack left redzone: f1 cryptohome-0.0.1-r2632: * Stack mid redzone: f2 cryptohome-0.0.1-r2632: * Stack right redzone: f3 cryptohome-0.0.1-r2632: * Stack after return: f5 cryptohome-0.0.1-r2632: * Stack use after scope: f8 cryptohome-0.0.1-r2632: * Global redzone: f9 cryptohome-0.0.1-r2632: * Global init order: f6 cryptohome-0.0.1-r2632: * Poisoned by user: f7 cryptohome-0.0.1-r2632: * Container overflow: fc cryptohome-0.0.1-r2632: * Array cookie: ac cryptohome-0.0.1-r2632: * Intra object redzone: bb cryptohome-0.0.1-r2632: * ASan internal: fe cryptohome-0.0.1-r2632: * Left alloca redzone: ca cryptohome-0.0.1-r2632: * Right alloca redzone: cb cryptohome-0.0.1-r2632: * Shadow gap: cc cryptohome-0.0.1-r2632: * ==17==ABORTING
,
Aug 20
Classic... CL:1181363
,
Aug 26
What is the current status of this? Is any progress being made?
,
Aug 29
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/beb319e73b436fd97aa470d318ec1ee9d16ec0e3 commit beb319e73b436fd97aa470d318ec1ee9d16ec0e3 Author: Lutz Justen <ljusten@chromium.org> Date: Wed Aug 29 23:09:14 2018 cryptohome: Fix use-after-destruction error In C++, it's OK to keep - a const ref to a temp object - a const ref to a member of a temp object but not - a const ref that was returned by a temp object. The bad code did the third. Create a copy instead. BUG= chromium:875395 TEST=cros tryjob -g <this_CL> amd64-generic-asan-tryjob Change-Id: Id693272e856f69e41c6afd29f46d8c1c099f68ad Reviewed-on: https://chromium-review.googlesource.com/1181363 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org> [modify] https://crrev.com/beb319e73b436fd97aa470d318ec1ee9d16ec0e3/cryptohome/mount.cc
,
Sep 28
Triage nag: This Chrome OS bug has an owner but no component. Please add a component so that this can be tracked by the relevant team.
,
Sep 28
This is not happening anymore.
,
Nov 13
|
||||
►
Sign in to add a comment |
||||
Comment 1 by manojgupta@chromium.org
, Aug 17Owner: ljusten@chromium.org