New issue
Advanced search Search tips

Issue 773210 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome
Pri: 2
Type: Bug-Regression



Sign in to add a comment

unit_tests failing on 2 builders

Project Member Reported by yukishiino@chromium.org, Oct 10 2017

Issue description

unit_tests failing on 2 builders

Builders failed on: 
- Linux ChromiumOS MSan Tests: 
  https://build.chromium.org/p/chromium.memory/builders/Linux%20ChromiumOS%20MSan%20Tests
- Linux MSan Tests: 
  https://build.chromium.org/p/chromium.memory/builders/Linux%20MSan%20Tests


Out of 27 CLs at https://build.chromium.org/p/chromium.memory/builders/Linux%20MSan%20Tests/builds/4885
Karan's CL at https://chromium-review.googlesource.com/c/chromium/src/+/673829 looks like most relevant.  Seeing the following stacktrace, it looks like touching uninitialized memory when storing some preference settings in JSON.

Sample stack trace is here:
==23314==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0xd2d7810 in IntToString base/strings/string_number_conversions.cc:49:5
    #1 0xd2d7810 in base::IntToString(int) base/strings/string_number_conversions.cc:332:0
    #2 0xd1c8d34 in base::JSONWriter::BuildJSONString(base::Value const&, unsigned long) base/json/json_writer.cc:77:28
    #3 0xd1ca3f3 in base::JSONWriter::BuildJSONString(base::Value const&, unsigned long) base/json/json_writer.cc:181:14
    #4 0xd1c8582 in base::JSONWriter::WriteWithOptions(base::Value const&, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) base/json/json_writer.cc:41:24
    #5 0xd1c7c18 in SerializeInternal base/json/json_string_value_serializer.cc:40:10
    #6 0xd1c7c18 in JSONStringValueSerializer::Serialize(base::Value const&) base/json/json_string_value_serializer.cc:21:0
    #7 0x99b0ccc in (anonymous namespace)::ValueAsString(base::Value const*) services/preferences/tracked/pref_hash_calculator.cc:63:16
    #8 0x99af86a in PrefHashCalculator::Calculate(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, base::Value const*) const services/preferences/tracked/pref_hash_calculator.cc:94:55
    #9 0x99bdb01 in PrefHashStoreImpl::ComputeMac(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, base::Value const*) services/preferences/tracked/pref_hash_store_impl.cc:94:32
    #10 0x99be1d3 in PrefHashStoreImpl::ComputeSplitMacs(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, base::DictionaryValue const*) services/preferences/tracked/pref_hash_store_impl.cc:115:36
    #11 0x99c0b33 in PrefHashStoreImpl::PrefHashStoreTransactionImpl::StoreSplitHash(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, base::DictionaryValue const*) services/preferences/tracked/pref_hash_store_impl.cc:268:17
    #12 0x99d53c4 in TrackedSplitPreference::OnNewValue(base::Value const*, PrefHashStoreTransaction*) const services/preferences/tracked/tracked_split_preference.cc:44:16
    #13 0x99b5a29 in PrefHashFilter::FilterSerializeData(base::DictionaryValue*) services/preferences/tracked/pref_hash_filter.cc:193:29
    #14 0x13e15fb1 in JsonPrefStore::SerializeData(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) components/prefs/json_pref_store.cc:471:23
    #15 0xd4738c1 in base::ImportantFileWriter::DoScheduledWrite() base/files/important_file_writer.cc:279:20
    #16 0x13e126f5 in JsonPrefStore::CommitPendingWrite(base::OnceCallback<void ()>) components/prefs/json_pref_store.cc:295:13
    #17 0x13e14f3a in JsonPrefStore::~JsonPrefStore() components/prefs/json_pref_store.cc:459:3
    #18 0x13e15d3c in JsonPrefStore::~JsonPrefStore() components/prefs/json_pref_store.cc:457:33
    #19 0x99c727a in DeleteInternal<PrefStore> base/memory/ref_counted.h:344:5
    #20 0x99c727a in Destruct base/memory/ref_counted.h:310:0
    #21 0x99c727a in Release base/memory/ref_counted.h:333:0
    #22 0x99c727a in Release base/memory/ref_counted.h:676:0
    #23 0x99c727a in ~scoped_refptr base/memory/ref_counted.h:571:0
    #24 0x99c727a in SegregatedPrefStore::~SegregatedPrefStore() services/preferences/tracked/segregated_pref_store.cc:189:0
    #25 0x99c772c in SegregatedPrefStore::~SegregatedPrefStore() services/preferences/tracked/segregated_pref_store.cc:186:45
    #26 0x13e34b3e in DeleteInternal<PrefStore> base/memory/ref_counted.h:344:5
    #27 0x13e34b3e in Destruct base/memory/ref_counted.h:310:0
    #28 0x13e34b3e in Release base/memory/ref_counted.h:333:0
    #29 0x13e34b3e in Release base/memory/ref_counted.h:676:0
    #30 0x13e34b3e in operator= base/memory/ref_counted.h:593:0
    #31 0x13e34b3e in PrefService::~PrefService() components/prefs/pref_service.cc:88:0
    #32 0x17b988da in sync_preferences::PrefServiceSyncable::~PrefServiceSyncable() components/sync_preferences/pref_service_syncable.cc:74:1
    #33 0x17b9896c in sync_preferences::PrefServiceSyncable::~PrefServiceSyncable() components/sync_preferences/pref_service_syncable.cc:68:45
    #34 0xda74c2a in operator() buildtools/third_party/libc++/trunk/include/memory:2272:5
    #35 0xda74c2a in reset buildtools/third_party/libc++/trunk/include/memory:2585:0
    #36 0xda74c2a in ~unique_ptr buildtools/third_party/libc++/trunk/include/memory:2539:0
    #37 0xda74c2a in ProfileImpl::~ProfileImpl() chrome/browser/profiles/profile_impl.cc:762:0
    #38 0xda752ec in ProfileImpl::~ProfileImpl() chrome/browser/profiles/profile_impl.cc:720:29
    #39 0xe2d96da in ProfileDestroyer::DestroyProfileWhenAppropriate(Profile*) chrome/browser/profiles/profile_destroyer.cc:66:7
    #40 0xdaebb18 in ~ProfileInfo chrome/browser/profiles/profile_manager.cc:1659:3
    #41 0xdaebb18 in operator() buildtools/third_party/libc++/trunk/include/memory:2272:0
    #42 0xdaebb18 in reset buildtools/third_party/libc++/trunk/include/memory:2585:0
    #43 0xdaebb18 in ~unique_ptr buildtools/third_party/libc++/trunk/include/memory:2539:0
    #44 0xdaebb18 in ~pair buildtools/third_party/libc++/trunk/include/utility:312:0
    #45 0xdaebb18 in __destroy<std::__1::pair<const base::FilePath, std::__1::unique_ptr<ProfileManager::ProfileInfo, std::__1::default_delete<ProfileManager::ProfileInfo> > > > buildtools/third_party/libc++/trunk/include/memory:1726:0
    #46 0xdaebb18 in destroy<std::__1::pair<const base::FilePath, std::__1::unique_ptr<ProfileManager::ProfileInfo, std::__1::default_delete<ProfileManager::ProfileInfo> > > > buildtools/third_party/libc++/trunk/include/memory:1589:0
    #47 0xdaebb18 in std::__1::__tree<std::__1::__value_type<base::FilePath, std::__1::unique_ptr<ProfileManager::ProfileInfo, std::__1::default_delete<ProfileManager::ProfileInfo> > >, std::__1::__map_value_compare<base::FilePath, std::__1::__value_type<base::FilePath, std::__1::unique_ptr<ProfileManager::ProfileInfo, std::__1::default_delete<ProfileManager::ProfileInfo> > >, std::__1::less<base::FilePath>, true>, std::__1::allocator<std::__1::__value_type<base::FilePath, std::__1::unique_ptr<ProfileManager::ProfileInfo, std::__1::default_delete<ProfileManager::ProfileInfo> > > > >::destroy(std::__1::__tree_node<std::__1::__value_type<base::FilePath, std::__1::unique_ptr<ProfileManager::ProfileInfo, std::__1::default_delete<ProfileManager::ProfileInfo> > >, void*>*) buildtools/third_party/libc++/trunk/include/__tree:1831:0
    #48 0xdaeb5e1 in ~__tree buildtools/third_party/libc++/trunk/include/__tree:1819:3
    #49 0xdaeb5e1 in ~map buildtools/third_party/libc++/trunk/include/map:798:0
    #50 0xdaeb5e1 in ProfileManager::~ProfileManager() chrome/browser/profiles/profile_manager.cc:385:0
    #51 0xdac553c in ProfileManager::~ProfileManager() chrome/browser/profiles/profile_manager.cc:383:35
    #52 0xe158045 in operator() buildtools/third_party/libc++/trunk/include/memory:2272:5
    #53 0xe158045 in reset buildtools/third_party/libc++/trunk/include/memory:2585:0
    #54 0xe158045 in BrowserProcessImpl::StartTearDown() chrome/browser/browser_process_impl.cc:342:0
    #55 0xe666833 in ChromeBrowserMainParts::PostMainMessageLoopRun() chrome/browser/chrome_browser_main.cc:1953:21
    #56 0x74d01d2 in content::BrowserMainLoop::ShutdownThreadsAndCleanUp() content/browser/browser_main_loop.cc:1221:13
    #57 0x74dcbf9 in content::BrowserMainRunnerImpl::Shutdown() content/browser/browser_main_runner.cc:200:19
    #58 0x74b940a in content::BrowserMain(content::MainFunctionParams const&) content/browser/browser_main.cc:48:16
    #59 0xd0e4783 in content::RunNamedProcessTypeMain(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, content::MainFunctionParams const&, content::ContentMainDelegate*) content/app/content_main_runner.cc:424:14
    #60 0xd0e785f in content::ContentMainRunnerImpl::Run() content/app/content_main_runner.cc:704:12
    #61 0x14bff56f in service_manager::Main(service_manager::MainParams const&) services/service_manager/embedder/main.cc:469:29
    #62 0xd0e0e9e in content::ContentMain(content::ContentMainParams const&) content/app/content_main.cc:19:10
    #63 0xebc8ecd in content::BrowserTestBase::SetUp() content/public/test/browser_test_base.cc:272:3
    #64 0xd4e7b58 in InProcessBrowserTest::SetUp() chrome/test/base/in_process_browser_test.cc:263:20
    #65 0x52d52fb in HandleExceptionsInMethodIfSupported<testing::Test, void> third_party/googletest/src/googletest/src/gtest.cc:2456:12
    #66 0x52d52fb in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc:2468:0
    #67 0x52d8ef7 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2654:11
    #68 0x52da8d9 in testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2772:28
    #69 0x52fbac4 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:4677:43
    #70 0x52fa939 in HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> third_party/googletest/src/googletest/src/gtest.cc:2456:12
    #71 0x52fa939 in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc:4285:0
    #72 0xd547b03 in RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2237:46
    #73 0xd547b03 in base::TestSuite::Run() base/test/test_suite.cc:270:0
    #74 0xd130e31 in ChromeTestSuiteRunner::RunTestSuite(int, char**) chrome/test/base/chrome_test_launcher.cc:70:38
    #75 0xed0e430 in content::LaunchTests(content::TestLauncherDelegate*, unsigned long, int, char**) content/public/test/test_launcher.cc:571:31
    #76 0xd131f23 in LaunchChromeTests(unsigned long, content::TestLauncherDelegate*, int, char**) chrome/test/base/chrome_test_launcher.cc:160:10
    #77 0xd130b86 in main chrome/test/base/browser_tests_main.cc:36:10
    #78 0x7fa27979ef44 in __libc_start_main /build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:287:0
    #79 0x87438f in _start ??:0:0

 
Labels: -Sheriff-Chromium
Removing sheriff label since assigned.
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a89306503f799d29220285e415114beb752b65ae

commit a89306503f799d29220285e415114beb752b65ae
Author: Karandeep Bhatia <karandeepb@chromium.org>
Date: Wed Oct 11 17:41:12 2017

Reland "DNR: Save indexed ruleset checksum as part of Extension preferences."

This is a reland of 63b0d516e3510a375cda56fd29cce73d23c7d4ae. It fixes the 
use of uninitialized memory which was detected by the MSan bots.

Original change's description:
> DNR: Save indexed ruleset checksum as part of Extension preferences.
> 
> This CL adds a new extension preference "dnr_ruleset_checksum" to save the
> checksum of the indexed ruleset for the Declarative Net Request API. This
> preference is saved during extension installation for packed and loading for
> unpacked extensions. The checksum is useful to determine whether an indexed
> ruleset exists for an extension and to verify the integrity of the ruleset on
> disk.
> 
> Doc=http://go/declarative-net-request (Internal only)
> BUG=696822
> 
> Change-Id: I092cc9c113a7ba61562314462f8fcd74bd8a8b11
> Reviewed-on: https://chromium-review.googlesource.com/673829
> Commit-Queue: Karan Bhatia <karandeepb@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#507510}

Bug: 696822,  773210 
TBR=sky@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_chromeos_msan_rel_ng,linux_chromium_msan_rel_ng

Change-Id: Ic211308a0f9c728e96d34e07117a9eea44d784ff
Reviewed-on: https://chromium-review.googlesource.com/711031
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Commit-Queue: Karan Bhatia <karandeepb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508022}
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/chrome/browser/chromeos/app_mode/kiosk_app_data.cc
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/chrome/browser/chromeos/app_mode/kiosk_external_update_validator.cc
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/chrome/browser/chromeos/app_mode/kiosk_external_update_validator.h
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/chrome/browser/extensions/api/declarative_net_request/declarative_net_request_browsertest.cc
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/chrome/browser/extensions/api/declarative_net_request/rule_indexing_unittest.cc
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/chrome/browser/extensions/crx_installer.cc
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/chrome/browser/extensions/crx_installer.h
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/chrome/browser/extensions/extension_service.cc
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/chrome/browser/extensions/extension_service.h
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/chrome/browser/extensions/startup_helper.cc
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/chrome/browser/extensions/unpacked_installer.cc
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/chrome/browser/extensions/unpacked_installer.h
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/chrome/browser/metrics/extensions_metrics_provider_unittest.cc
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/extensions/browser/api/declarative_net_request/flat_ruleset_indexer.h
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/extensions/browser/api/declarative_net_request/test_utils.cc
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/extensions/browser/api/declarative_net_request/test_utils.h
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/extensions/browser/api/declarative_net_request/utils.cc
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/extensions/browser/api/declarative_net_request/utils.h
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/extensions/browser/extension_prefs.cc
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/extensions/browser/extension_prefs.h
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/extensions/browser/sandboxed_unpacker.cc
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/extensions/browser/sandboxed_unpacker.h
[modify] https://crrev.com/a89306503f799d29220285e415114beb752b65ae/extensions/browser/sandboxed_unpacker_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment