New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 611730 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

DCHECK in history::TypedUrlSyncableService::WriteToTypedUrlSpecifics

Project Member Reported by justincohen@chromium.org, May 13 2016

Issue description

history::TypedUrlSyncableService::WriteToTypedUrlSpecifics(history::URLRow const&, std::__1::vector<history::VisitRow, std::__1::allocator<history::VisitRow> > const&, sync_pb::TypedUrlSpecifics*) at  components/history/core/browser/typed_url_syncable_service.cc


    // We should have at least one typed visit. This can sometimes happen if
    // the history DB has an inaccurate count for some reason (there's been
    // bugs in the history code in the past which has left users in the wild
    // with incorrect counts -  http://crbug.com/84258 ).
    DCHECK(typed_count > 0);


url appears to be `http://edition.cnn.com/` with 101 visits.

#3  0x0000000102d5ead0 in history::TypedUrlSyncableService::WriteToTypedUrlSpecifics(history::URLRow const&, std::__1::vector<history::VisitRow, std::__1::allocator<history::VisitRow> > const&, sync_pb::TypedUrlSpecifics*) at components/history/core/browser/typed_url_syncable_service.cc:888
#4  0x0000000102d573b4 in history::TypedUrlSyncableService::AddTypedUrlToChangeList(syncer::SyncChange::SyncChangeType, history::URLRow const&, std::__1::vector<history::VisitRow, std::__1::allocator<history::VisitRow> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<syncer::SyncChange, std::__1::allocator<syncer::SyncChange> >*) at components/history/core/browser/typed_url_syncable_service.cc:843
#5  0x0000000102d541b8 in history::TypedUrlSyncableService::MergeDataAndStartSyncing(syncer::ModelType, std::__1::vector<syncer::SyncData, std::__1::allocator<syncer::SyncData> > const&, std::__1::unique_ptr<syncer::SyncChangeProcessor, std::__1::default_delete<syncer::SyncChangeProcessor> >, std::__1::unique_ptr<syncer::SyncErrorFactory, std::__1::default_delete<syncer::SyncErrorFactory> >) at components/history/core/browser/typed_url_syncable_service.cc:184
#6  0x00000001029064b8 in sync_driver::NonUIDataTypeController::StartAssociationWithSharedChangeProcessor(scoped_refptr<sync_driver::SharedChangeProcessor> const&) at components/sync_driver/non_ui_data_type_controller.cc:381
#7  0x0000000102909300 in void base::internal::RunnableAdapter<void (sync_driver::NonUIDataTypeController::*)(scoped_refptr<sync_driver::SharedChangeProcessor> const&)>::Run<scoped_refptr<sync_driver::NonUIDataTypeController> const&, scoped_refptr<sync_driver::SharedChangeProcessor> const&>(scoped_refptr<sync_driver::NonUIDataTypeController> const&&&, scoped_refptr<sync_driver::SharedChangeProcessor> const&&&) at base/bind_internal.h:186
#8  0x00000001029091d4 in void base::internal::InvokeHelper<false, void, base::internal::RunnableAdapter<void (sync_driver::NonUIDataTypeController::*)(scoped_refptr<sync_driver::SharedChangeProcessor> const&)> >::MakeItSo<scoped_refptr<sync_driver::NonUIDataTypeController> const&, scoped_refptr<sync_driver::SharedChangeProcessor> const&>(base::internal::RunnableAdapter<void (sync_driver::NonUIDataTypeController::*)(scoped_refptr<sync_driver::SharedChangeProcessor> const&)>, scoped_refptr<sync_driver::NonUIDataTypeController> const&&&, scoped_refptr<sync_driver::SharedChangeProcessor> const&&&) at base/bind_internal.h:311
#9  0x000000010290915c in base::internal::Invoker<base::IndexSequence<0ul, 1ul>, base::internal::BindState<base::internal::RunnableAdapter<void (sync_driver::NonUIDataTypeController::*)(scoped_refptr<sync_driver::SharedChangeProcessor> const&)>, void (sync_driver::NonUIDataTypeController*, scoped_refptr<sync_driver::SharedChangeProcessor> const&), sync_driver::NonUIDataTypeController*, scoped_refptr<sync_driver::SharedChangeProcessor>&>, base::internal::InvokeHelper<false, void, base::internal::RunnableAdapter<void (sync_driver::NonUIDataTypeController::*)(scoped_refptr<sync_driver::SharedChangeProcessor> const&)> >, void ()>::Run(base::internal::BindStateBase*) at base/bind_internal.h:362
#10 0x00000001005e9400 in base::Callback<void (), (base::internal::CopyMode)1>::Run() const at base/callback.h:397
#11 0x0000000102d50024 in browser_sync::(anonymous namespace)::RunTaskOnHistoryThread::RunOnDBThread(history::HistoryBackend*, history::HistoryDatabase*) at components/history/core/browser/typed_url_data_type_controller.cc:38
#12 0x0000000102c6ce0c in history::QueuedHistoryDBTask::Run(history::HistoryBackend*, history::HistoryDatabase*) at components/history/core/browser/history_backend.cc:174
#13 0x0000000102c847a8 in history::HistoryBackend::ProcessDBTaskImpl() at components/history/core/browser/history_backend.cc:2267
#14 0x0000000102c87770 in history::HistoryBackend::ProcessDBTask(std::__1::unique_ptr<history::HistoryDBTask, std::__1::default_delete<history::HistoryDBTask> >, scoped_refptr<base::SingleThreadTaskRunner>, base::Callback<bool (), (base::internal::CopyMode)1> const&) at components/history/core/browser/history_backend.cc:2468
#15 0x0000000102cd34cc in void base::internal::RunnableAdapter<void (history::HistoryBackend::*)(std::__1::unique_ptr<history::HistoryDBTask, std::__1::default_delete<history::HistoryDBTask> >, scoped_refptr<base::SingleThreadTaskRunner>, base::Callback<bool (), (base::internal::CopyMode)1> const&)>::Run<scoped_refptr<history::HistoryBackend> const&, std::__1::unique_ptr<history::HistoryDBTask, std::__1::default_delete<history::HistoryDBTask> >, scoped_refptr<base::SingleThreadTaskRunner> const&, base::Callback<bool (), (base::internal::CopyMode)1> const&>(scoped_refptr<history::HistoryBackend> const&&&, std::__1::unique_ptr<history::HistoryDBTask, std::__1::default_delete<history::HistoryDBTask> >&&, scoped_refptr<base::SingleThreadTaskRunner> const&&&, base::Callback<bool (), (base::internal::CopyMode)1> const&&&) at base/bind_internal.h:186
#16 0x0000000102cd3220 in void base::internal::InvokeHelper<false, void, base::internal::RunnableAdapter<void (history::HistoryBackend::*)(std::__1::unique_ptr<history::HistoryDBTask, std::__1::default_delete<history::HistoryDBTask> >, scoped_refptr<base::SingleThreadTaskRunner>, base::Callback<bool (), (base::internal::CopyMode)1> const&)> >::MakeItSo<scoped_refptr<history::HistoryBackend> const&, std::__1::unique_ptr<history::HistoryDBTask, std::__1::default_delete<history::HistoryDBTask> >, scoped_refptr<base::SingleThreadTaskRunner> const&, base::Callback<bool (), (base::internal::CopyMode)1> const&>(base::internal::RunnableAdapter<void (history::HistoryBackend::*)(std::__1::unique_ptr<history::HistoryDBTask, std::__1::default_delete<history::HistoryDBTask> >, scoped_refptr<base::SingleThreadTaskRunner>, base::Callback<bool (), (base::internal::CopyMode)1> const&)>, scoped_refptr<history::HistoryBackend> const&&&, std::__1::unique_ptr<history::HistoryDBTask, std::__1::default_delete<history::HistoryDBTask> >&&, scoped_refptr<base::SingleThreadTaskRunner> const&&&, base::Callback<bool (), (base::internal::CopyMode)1> const&&&) at base/bind_internal.h:311
#17 0x0000000102cd30e0 in base::internal::Invoker<base::IndexSequence<0ul, 1ul, 2ul, 3ul>, base::internal::BindState<base::internal::RunnableAdapter<void (history::HistoryBackend::*)(std::__1::unique_ptr<history::HistoryDBTask, std::__1::default_delete<history::HistoryDBTask> >, scoped_refptr<base::SingleThreadTaskRunner>, base::Callback<bool (), (base::internal::CopyMode)1> const&)>, void (history::HistoryBackend*, std::__1::unique_ptr<history::HistoryDBTask, std::__1::default_delete<history::HistoryDBTask> >, scoped_refptr<base::SingleThreadTaskRunner>, base::Callback<bool (), (base::internal::CopyMode)1> const&), history::HistoryBackend*, base::internal::PassedWrapper<std::__1::unique_ptr<history::HistoryDBTask, std::__1::default_delete<history::HistoryDBTask> > >, scoped_refptr<base::SingleThreadTaskRunner>, base::Callback<bool (), (base::internal::CopyMode)1>&>, base::internal::InvokeHelper<false, void, base::internal::RunnableAdapter<void (history::HistoryBackend::*)(std::__1::unique_ptr<history::HistoryDBTask, std::__1::default_delete<history::HistoryDBTask> >, scoped_refptr<base::SingleThreadTaskRunner>, base::Callback<bool (), (base::internal::CopyMode)1> const&)> >, void ()>::Run(base::internal::BindStateBase*) at base/bind_internal.h:362
#18 0x00000001005e9400 in base::Callback<void (), (base::internal::CopyMode)1>::Run() const at base/callback.h:397
#19 0x000000010003dc04 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask const&) at base/debug/task_annotator.cc:51
#20 0x00000001000c2808 in base::MessageLoop::RunTask(base::PendingTask const&) at base/message_loop/message_loop.cc:484
#21 0x00000001000c2e1c in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask const&) at base/message_loop/message_loop.cc:493
#22 0x00000001000c37d0 in base::MessageLoop::DoWork() at base/message_loop/message_loop.cc:610
#23 0x000000010000920c in base::MessagePumpCFRunLoopBase::RunWork() at base/message_loop/message_pump_mac.mm:330
#24 0x0000000100009168 in ___ZN4base24MessagePumpCFRunLoopBase13RunWorkSourceEPv_block_invoke at base/message_loop/message_pump_mac.mm:307
#25 0x000000010009960c in base::mac::CallWithEHFrame(void () block_pointer) at base/mac/call_with_eh_frame.cc:33
#26 0x00000001000083b4 in base::MessagePumpCFRunLoopBase::RunWorkSource(void*) at base/message_loop/message_pump_mac.mm:306

 
Components: UI>Browser>History
Labels: Needs-Feedback
Justin, could you please specify the app version.
Cc: rpop@chromium.org
Components: Services>Sync
Owner: ----
Status: Available (was: Untriaged)
I'm no longer working on the sync team - making this available for anyone on the sync team.

In general, this is due to history database inconsistencies - in particular, I'd guess that the |urls| table has a typed_count > 0 for http://edition.cnn.com/, but the |visits| table doesn't have any visits with the PAGE_TRANSITION_TYPED flag on it. Justin, do you want to take a look and see if that is indeed the case?

It's certainly possible that the database is correct, and there's some other error in the sync logic (for example, if there haven't been any typed visits in the last 1000 visits, maybe there's some error in our handling of the truncated list of visits). But every time I've looked at this in the past, it's been due to history DB consistency errors.
This is on tip of trunk.  If the issue is with a history DB consistency error, what is the fix?

Comment 4 by gangwu@chromium.org, May 18 2016

Owner: gangwu@chromium.org

Comment 5 by gangwu@chromium.org, May 18 2016

Status: Assigned (was: Available)
Labels: -Needs-Feedback

Comment 7 by gangwu@chromium.org, Jan 17 2018

Status: Fixed (was: Assigned)
typed url is moved from SyncableService to USS, so this will not happen again. 

Sign in to add a comment