New issue
Advanced search Search tips

Issue 612881 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Chrome with DCHECK enabled always hits DCHECK in SiteEngagementService

Project Member Reported by mek@chromium.org, May 18 2016

Issue description

For the last several days at least, it is basically impossible to run a chrome build with DCHECKs enabled, as a few seconds after starting chrome dies on a DCHECK in SiteEngagementService:

[27974:27974:0518/111206:FATAL:site_engagement_service.cc(508)] Check failed: url.is_valid(). 
#0 0x7fcd8603282e base::debug::StackTrace::StackTrace()
#1 0x7fcd860950ff logging::LogMessage::~LogMessage()
#2 0x7fcd8705b8f1 SiteEngagementService::ResetScoreAndAccessTimesForURL()
#3 0x7fcd8705d30d SiteEngagementService::GetCountsAndLastVisitForOriginsComplete()
#4 0x7fcd87067064 _ZN4base8internal15RunnableAdapterIM21SiteEngagementServiceFvPN7history14HistoryServiceERKNSt7__debug8multisetI4GURLSt4lessIS8_ESaIS8_EEEbRKNS6_3mapIS8_St4pairIiNS_4TimeEESA_SaISG_IKS8_SI_EEEEEE3RunIPS2_JRKS5_SE_RKbSO_EEEvOT_DpOT0_
#5 0x7fcd87066f28 _ZN4base8internal12InvokeHelperILb1EvNS0_15RunnableAdapterIM21SiteEngagementServiceFvPN7history14HistoryServiceERKNSt7__debug8multisetI4GURLSt4lessIS9_ESaIS9_EEEbRKNS7_3mapIS9_St4pairIiNS_4TimeEESB_SaISH_IKS9_SJ_EEEEEEEE8MakeItSoINS_7WeakPtrIS3_EEJRKS6_SF_RKbSP_EEEvSS_T_DpOT0_
#6 0x7fcd87066e7e _ZN4base8internal7InvokerINS_13IndexSequenceIJLm0ELm1ELm2ELm3EEEENS0_9BindStateINS0_15RunnableAdapterIM21SiteEngagementServiceFvPN7history14HistoryServiceERKNSt7__debug8multisetI4GURLSt4lessISC_ESaISC_EEEbRKNSA_3mapISC_St4pairIiNS_4TimeEESE_SaISK_IKSC_SM_EEEEEEEFvPS6_S9_SI_bSS_EJNS_7WeakPtrIS6_EERS9_RSG_RbEEENS0_12InvokeHelperILb1EvSV_EEFvSS_EE3RunEPNS0_13BindStateBaseESS_
#7 0x7fcd86c73d56 base::Callback<>::Run()
#8 0x7fcd87051b14 base::internal::ReplyAdapter<>()
#9 0x7fcd86d9e632 _ZN4base8internal15RunnableAdapterIPFvRKNS_7VersionEP11PrefServiceEE3RunIJS4_RKS6_EEEvDpOT_
#10 0x7fcd8ad7737a _ZN4base8internal12InvokeHelperILb0EvNS0_15RunnableAdapterIPFvRKNS_8CallbackIFvRKNSt7__debug3mapI4GURLSt4pairIiNS_4TimeEESt4lessIS6_ESaIS7_IKS6_S9_EEEEELNS0_8CopyModeE1EEEPSF_EEEE8MakeItSoIJSM_SN_EEEvSQ_DpOT_
#11 0x7fcd8ad77333 _ZN4base8internal7InvokerINS_13IndexSequenceIJLm0ELm1EEEENS0_9BindStateINS0_15RunnableAdapterIPFvRKNS_8CallbackIFvRKNSt7__debug3mapI4GURLSt4pairIiNS_4TimeEESt4lessIS9_ESaISA_IKS9_SC_EEEEELNS0_8CopyModeE1EEEPSI_EEESR_JSP_NS0_12OwnedWrapperISI_EEEEENS0_12InvokeHelperILb0EvST_EEFvvEE3RunEPNS0_13BindStateBaseE
#12 0x7fcd860129ee base::Callback<>::Run()
#13 0x7fcd861de700 base::(anonymous namespace)::PostTaskAndReplyRelay::RunReplyAndSelfDestruct()
#14 0x7fcd861debe0 _ZN4base8internal15RunnableAdapterIMNS_12_GLOBAL__N_121PostTaskAndReplyRelayEFvvEE3RunIPS3_JEEEvOT_DpOT0_
#15 0x7fcd861deb29 _ZN4base8internal12InvokeHelperILb0EvNS0_15RunnableAdapterIMNS_12_GLOBAL__N_121PostTaskAndReplyRelayEFvvEEEE8MakeItSoIJPS4_EEEvS7_DpOT_
#16 0x7fcd861deaed _ZN4base8internal7InvokerINS_13IndexSequenceIJLm0EEEENS0_9BindStateINS0_15RunnableAdapterIMNS_12_GLOBAL__N_121PostTaskAndReplyRelayEFvvEEEFvPS7_EJNS0_17UnretainedWrapperIS7_EEEEENS0_12InvokeHelperILb0EvSA_EEFvvEE3RunEPNS0_13BindStateBaseE
#17 0x7fcd860129ee base::Callback<>::Run()
#18 0x7fcd8603830e base::debug::TaskAnnotator::RunTask()
#19 0x7fcd860b28bc base::MessageLoop::RunTask()
#20 0x7fcd860b2b58 base::MessageLoop::DeferOrRunPendingTask()
#21 0x7fcd860b2db2 base::MessageLoop::DoWork()
#22 0x7fcd860ca5cc base::MessagePumpGlib::HandleDispatch()
#23 0x7fcd860cad91 base::(anonymous namespace)::WorkSourceDispatch()
#24 0x7fcd77182e04 g_main_context_dispatch
#25 0x7fcd77183048 <unknown>
#26 0x7fcd771830ec g_main_context_iteration
#27 0x7fcd860ca6cf base::MessagePumpGlib::Run()
#28 0x7fcd860b22af base::MessageLoop::RunHandler()
#29 0x7fcd8615b054 base::RunLoop::Run()
#30 0x7fcd86d61b7f ChromeBrowserMainParts::MainMessageLoopRun()
#31 0x7fcd7f57a4e9 content::BrowserMainLoop::RunMainMessageLoopParts()
#32 0x7fcd7f584365 content::BrowserMainRunnerImpl::Run()
#33 0x7fcd7f574176 content::BrowserMain()
#34 0x7fcd811c1dc6 content::RunNamedProcessTypeMain()
#35 0x7fcd811c4072 content::ContentMainRunnerImpl::Run()
#36 0x7fcd811c0e82 content::ContentMain()
#37 0x7fcd86c575b2 ChromeMain
#38 0x7fcd86c57562 main
#39 0x7fcd71c3cec5 __libc_start_main
#40 0x7fcd86c57461 <unknown>

 

Comment 1 by mek@chromium.org, May 18 2016

And just disabling that particular DCHECK doesn't help since then it'll just hit another DCHECK further down the stack.
Cc: calamity@chromium.org
I'm not able to reproduce this. It's odd, because the URL triggering this DCHECK failure is sent to the site engagement service directly from the history service.

Does this happen on a fresh profile? Or with a profile that's signed in? A profile with a lot of history items? If it's happening at startup I'm guessing it must be that you have some URLs in history which are expiring, hence the call to this code path (it only triggers when the history service deletes URLs).

Comment 3 by mek@chromium.org, May 19 2016

This was with a profile that's signed in, I didn't try a fresh one, so could very well be it's something to do with whatever is in my history.
Right. That's still not a good sign. @calamity, perhaps we can change the DCHECK to a conditional, and bail out of the engagement update if the URL we get from history isn't valid? If it's triggered here, it could well be triggered elsewhere.
Project Member

Comment 5 by bugdroid1@chromium.org, May 20 2016

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

commit b30352f5c5bb51c5be8d3e147080729794f1d6a3
Author: dominickn <dominickn@chromium.org>
Date: Fri May 20 03:55:22 2016

Bail out of resetting a URL's engagement if the URL is not valid.

This speculatively addresses a DCHECK failure when the history service
expires a URL on startup and notifies the site engagement service of it.
Occasionally, the URL sent to site engagement is invalid, triggering the
DCHECK.

BUG= 612881 

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

[modify] https://crrev.com/b30352f5c5bb51c5be8d3e147080729794f1d6a3/chrome/browser/engagement/site_engagement_service.cc

Status: Fixed (was: Assigned)
If this flares up in M51 (when site engagement launches to stable), we should be able to merge a very trivial fix. Closing for now as #5 should stop this issue from happening.

Sign in to add a comment