New issue
Advanced search Search tips

Issue 683884 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

DCHECK in ProfileStatistics::GatherStatistics()

Project Member Reported by jlebel@chromium.org, Jan 23 2017

Issue description

Chrome Version: (Version 57.0.2985.0 (64-bit)
OS: macOS

What steps will reproduce the problem?
(1) Open the user manager window
(2) Open chrome://inspect#
(3) Inspect the user manager window
(4) Close the inspecter

What is the expected result?
DCHECK [1] fails in function [2].

[1] DCHECK(!profile_->IsOffTheRecord() && !profile_->IsSystemProfile());
[2] void ProfileStatistics::GatherStatistics(const profiles::ProfileStatisticsCallback& callback)

What happens instead?
Nothing.

Please use labels and text to provide additional information.

* thread #1: tid = 0xc8c7f5, 0x0000000115364954 libbase.dylib`base::debug::BreakDebugger() + 20 at debugger_posix.cc:262, name = 'CrBrowserMain', queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
  * frame #0: 0x0000000115364954 libbase.dylib`base::debug::BreakDebugger() + 20 at debugger_posix.cc:262
    frame #1: 0x0000000115401ba3 libbase.dylib`logging::LogMessage::~LogMessage(this=0x00007fff5fbf9bf0) + 4387 at logging.cc:759
    frame #2: 0x00000001153fe5d5 libbase.dylib`logging::LogMessage::~LogMessage(this=0x00007fff5fbf9bf0) + 21 at logging.cc:533
    frame #3: 0x00000001039434f0 libchrome_dll.dylib`ProfileStatistics::GatherStatistics(this=0x0000638000245310, callback=0x00007fff5fbf9fb0), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&) + 336 at profile_statistics.cc:28
    frame #4: 0x0000000102fdc054 libchrome_dll.dylib`ProfileManager::BrowserListObserver::OnBrowserRemoved(this=0x000000013ce116c0, browser=0x000000013c82d350) + 1700 at profile_manager.cc:1675
    frame #5: 0x00000001086c7d7f libchrome_dll.dylib`BrowserList::RemoveBrowser(browser=0x000000013c82d350) + 319 at browser_list.cc:82
    frame #6: 0x000000010869ad84 libchrome_dll.dylib`Browser::~Browser(this=0x000000013c82d350) + 1060 at browser.cc:475
    frame #7: 0x000000010869cb95 libchrome_dll.dylib`Browser::~Browser(this=0x000000013c82d350) + 21 at browser.cc:459
    frame #8: 0x000000010869cd19 libchrome_dll.dylib`Browser::~Browser(this=0x000000013c82d350) + 25 at browser.cc:459
    frame #9: 0x0000000108dfcad6 libchrome_dll.dylib`::-[BrowserWindowController .cxx_destruct]() [inlined] std::__1::default_delete<Browser>::operator(this=0x000000013c82d6a0, __ptr=0x000000013c82d350)(Browser*) const + 1878 at memory:2398
    frame #10: 0x0000000108dfcab1 libchrome_dll.dylib`::-[BrowserWindowController .cxx_destruct]() [inlined] std::__1::unique_ptr<Browser, std::__1::default_delete<Browser> >::reset(this=0x000000013c82d6a0, __p=0x0000000000000000) + 83 at memory:2604
    frame #11: 0x0000000108dfca5e libchrome_dll.dylib`::-[BrowserWindowController .cxx_destruct]() [inlined] std::__1::unique_ptr<Browser, std::__1::default_delete<Browser> >::~unique_ptr(this=0x000000013c82d6a0) at memory:2572
    frame #12: 0x0000000108dfca5e libchrome_dll.dylib`::-[BrowserWindowController .cxx_destruct]() [inlined] std::__1::unique_ptr<Browser, std::__1::default_delete<Browser> >::~unique_ptr(this=0x000000013c82d6a0) at memory:2572
    frame #13: 0x0000000108dfca5e libchrome_dll.dylib`::-[BrowserWindowController .cxx_destruct](self=0x000000013c82d610, _cmd=<no value available>) + 1758 at browser_window_controller.mm:202
    frame #14: 0x00007fff8df2a542 libobjc.A.dylib`object_cxxDestructFromClass(objc_object*, objc_class*) + 127
    frame #15: 0x00007fff8df23084 libobjc.A.dylib`objc_destructInstance + 92
    frame #16: 0x00000001007eb88b libzombies.dylib`(anonymous namespace)::ZombieDealloc(self=0x000000013c82d610, _cmd="dealloc") + 395 at objc_zombie.mm:115
    frame #17: 0x00007fff76d376e9 AppKit`-[NSResponder dealloc] + 139
    frame #18: 0x00007fff7700430d AppKit`-[NSWindowController dealloc] + 532
    frame #19: 0x0000000108ffc65d libchrome_dll.dylib`::-[TabWindowController dealloc](self=0x000000013c82d610, _cmd="dealloc") + 125 at tab_window_controller.mm:120
    frame #20: 0x0000000108df02cd libchrome_dll.dylib`::-[BrowserWindowController dealloc](self=0x000000013c82d610, _cmd="dealloc") + 717 at browser_window_controller.mm:432
    frame #21: 0x00007fff8df28c49 libobjc.A.dylib`objc_object::sidetable_release(bool) + 285
    frame #22: 0x00007fff76d53325 AppKit`-[NSWindowController release] + 155
    frame #23: 0x00007fff7ac8d114 Foundation`__delayedPerformCleanup + 50
    frame #24: 0x00007fff7921c616 CoreFoundation`CFRunLoopTimerInvalidate + 630
    frame #25: 0x00007fff7921bf5a CoreFoundation`__CFRunLoopDoTimer + 1130
    frame #26: 0x00007fff7921ba7a CoreFoundation`__CFRunLoopDoTimers + 298
    frame #27: 0x00007fff792135d1 CoreFoundation`__CFRunLoopRun + 2081
    frame #28: 0x00007fff79212b54 CoreFoundation`CFRunLoopRunSpecific + 420
    frame #29: 0x00007fff7879dacc HIToolbox`RunCurrentEventLoopInMode + 240
    frame #30: 0x00007fff7879d901 HIToolbox`ReceiveNextEventCommon + 432
    frame #31: 0x00007fff7879d736 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71
    frame #32: 0x00007fff76d43ae4 AppKit`_DPSNextEvent + 1120
    frame #33: 0x00007fff774be21f AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2789
    frame #34: 0x000000010288dd0a libchrome_dll.dylib`::__71-[BrowserCrApplication nextEventMatchingMask:untilDate:inMode:dequeue:]_block_invoke(.block_descriptor=0x00007fff5fbfde18) + 106 at chrome_browser_application_mac.mm:187
    frame #35: 0x0000000115404aca libbase.dylib`base::mac::CallWithEHFrame(void () block_pointer) + 10 at call_with_eh_frame_asm.S:36
    frame #36: 0x000000010288dba8 libchrome_dll.dylib`::-[BrowserCrApplication nextEventMatchingMask:untilDate:inMode:dequeue:](self=0x0000600000120960, _cmd="nextEventMatchingMask:untilDate:inMode:dequeue:", mask=18446744073709551615, expiration=0x422d63c37f00000d, mode=0x00007fff93fc0e40, dequeue=YES) + 248 at chrome_browser_application_mac.mm:186
    frame #37: 0x00007fff76d38465 AppKit`-[NSApplication run] + 926
    frame #38: 0x000000011546af42 libbase.dylib`base::MessagePumpNSApplication::DoRun(this=0x0000628000180680, delegate=0x000000013ce0e610) + 306 at message_pump_mac.mm:637
    frame #39: 0x0000000115469f3a libbase.dylib`base::MessagePumpCFRunLoopBase::Run(this=0x0000628000180680, delegate=0x000000013ce0e610) + 122 at message_pump_mac.mm:210
    frame #40: 0x0000000115456d95 libbase.dylib`base::MessageLoop::RunHandler(this=0x000000013ce0e610) + 645 at message_loop.cc:386
    frame #41: 0x000000011553a533 libbase.dylib`base::RunLoop::Run(this=0x00007fff5fbfe898) + 307 at run_loop.cc:37
    frame #42: 0x00000001028a0050 libchrome_dll.dylib`ChromeBrowserMainParts::MainMessageLoopRun(this=0x0000000100208410, result_code=0x0000000100209958) + 400 at chrome_browser_main.cc:1990
    frame #43: 0x000000011b9f26a1 libcontent.dylib`content::BrowserMainLoop::RunMainMessageLoopParts(this=0x0000000100209940) + 417 at browser_main_loop.cc:1176
    frame #44: 0x000000011ba01471 libcontent.dylib`content::BrowserMainRunnerImpl::Run(this=0x0000600000021da0) + 481 at browser_main_runner.cc:141
    frame #45: 0x000000011b9e3475 libcontent.dylib`content::BrowserMain(parameters=0x00007fff5fbff290) + 421 at browser_main.cc:46
    frame #46: 0x000000011dc86ae7 libcontent.dylib`content::RunNamedProcessTypeMain(process_type="", main_function_params=0x00007fff5fbff290, delegate=0x00007fff5fbff730) + 599 at content_main_runner.cc:416
    frame #47: 0x000000011dc889d6 libcontent.dylib`content::ContentMainRunnerImpl::Run(this=0x00006000000a0420) + 1462 at content_main_runner.cc:793
    frame #48: 0x000000011dc8634d libcontent.dylib`content::ContentMain(params=0x00007fff5fbff710) + 349 at content_main.cc:20
    frame #49: 0x0000000101006007 libchrome_dll.dylib`::ChromeMain(argc=3, argv=0x00007fff5fbff888) + 135 at chrome_main.cc:112
    frame #50: 0x0000000100000dbc Chromium`main(argc=3, argv=0x00007fff5fbff888) + 780 at chrome_exe_main_mac.c:85
    frame #51: 0x00007fff8e810255 libdyld.dylib`start + 1
    frame #52: 0x00007fff8e810255 libdyld.dylib`start + 1

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 23 2017

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

commit 8595b7aa3cd26aec6af7d4e90fecc0e31c04ea44
Author: jlebel <jlebel@chromium.org>
Date: Mon Jan 23 20:20:33 2017

Should not gather statistics for a system profile.

If |profile| is not a system profile, this does not imply that |original_profile|
is not a system profile. Gathering statistics should be done only for none
system profile, according to:

DCHECK(!profile_->IsOffTheRecord() && !profile_->IsSystemProfile());
https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_statistics.cc?q=gatherstati&sq=package:chromium&l=28

BUG= 683884 

Review-Url: https://codereview.chromium.org/2654443002
Cr-Commit-Position: refs/heads/master@{#445462}

[modify] https://crrev.com/8595b7aa3cd26aec6af7d4e90fecc0e31c04ea44/chrome/browser/profiles/profile_manager.cc

Comment 2 by jlebel@chromium.org, Jan 24 2017

Status: Fixed (was: Available)

Sign in to add a comment