Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-65985

Custom "Default" profile can corrupt the visited link database

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.10.0, 5.11
    • WebEngine
    • None
    • Linux x64

    Description

      Steps to reproduce:

      1. Remove visited link database first: rm ~/.local/share/quicknanobrowser/QtWebEngine/Default/Visited\ Links
      2. ./quicknanobrowser
      3. Quit
      4. Start it again: ./quicknanobrowser

      Actual result:
      quicknanobrowser asserts in debug:

      [14073:14073:0125/101958.091656:FATAL:visitedlink_master.h(504)] Check failed: used_count == used_items_ (4 vs. 3)                                                                    
      #0 0x7f94d4384126 base::debug::StackTrace::StackTrace()                                                                                                                               
      #1 0x7f94d43820ad base::debug::StackTrace::StackTrace()                                                                                                                               
      #2 0x7f94d43cc4da logging::LogMessage::~LogMessage()                                                                                                                                  
      #3 0x7f94d4624b72 visitedlink::VisitedLinkMaster::DebugValidate()                                                                                                                     
      #4 0x7f94d4622378 visitedlink::VisitedLinkMaster::OnTableLoadComplete()                                                                                                               
      #5 0x7f94d462b309 _ZN4base8internal13FunctorTraitsIMN11visitedlink17VisitedLinkMasterEFvb13scoped_refptrINS3_18LoadFromFileResultEEEvE6InvokeIRKNS_7WeakPtrIS3_EEJbS6_EEEvS8_OT_DpOT0_
      #6 0x7f94d462a89f _ZN4base8internal12InvokeHelperILb1EvE8MakeItSoIRKMN11visitedlink17VisitedLinkMasterEFvb13scoped_refptrINS5_18LoadFromFileResultEEERKNS_7WeakPtrIS5_EEJbS8_EEEvOT_OT
      0_DpOT1_                                                                                                                                                                              
      #7 0x7f94d4629330 _ZN4base8internal7InvokerINS0_9BindStateIMN11visitedlink17VisitedLinkMasterEFvb13scoped_refptrINS4_18LoadFromFileResultEEEJNS_7WeakPtrIS4_EEEEEFvbS7_EE7RunImplIRKS9
      _RKSt5tupleIJSB_EEJLm0EEEEvOT_OT0_St16integer_sequenceImJXspT1_EEEObOS7_
      #8 0x7f94d4627f7a _ZN4base8internal7InvokerINS0_9BindStateIMN11visitedlink17VisitedLinkMasterEFvb13scoped_refptrINS4_18LoadFromFileResultEEEJNS_7WeakPtrIS4_EEEEEFvbS7_EE3RunEPNS0_13B
      indStateBaseEObOS7_
      #9 0x7f94d462bc10 _ZNKR4base17RepeatingCallbackIFvb13scoped_refptrIN11visitedlink17VisitedLinkMaster18LoadFromFileResultEEEE3RunEbS5_
      #10 0x7f94d462b57a _ZN4base8internal13FunctorTraitsINS_17RepeatingCallbackIFvb13scoped_refptrIN11visitedlink17VisitedLinkMaster18LoadFromFileResultEEEEEvE6InvokeIRKS9_JRKbRKS7_EEEvOT
      _DpOT0_
      #11 0x7f94d462ab19 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKNS_17RepeatingCallbackIFvb13scoped_refptrIN11visitedlink17VisitedLinkMaster18LoadFromFileResultEEEEEJRKbRKS9_EEEv
      OT_DpOT0_
      #12 0x7f94d46299bb _ZN4base8internal7InvokerINS0_9BindStateINS_17RepeatingCallbackIFvb13scoped_refptrIN11visitedlink17VisitedLinkMaster18LoadFromFileResultEEEEEJbS8_EEEFvvEE7RunImplI
      RKSA_RKSt5tupleIJbS8_EEJLm0ELm1EEEEvOT_OT0_St16integer_sequenceImJXspT1_EEE
      #13 0x7f94d4628127 _ZN4base8internal7InvokerINS0_9BindStateINS_17RepeatingCallbackIFvb13scoped_refptrIN11visitedlink17VisitedLinkMaster18LoadFromFileResultEEEEEJbS8_EEEFvvEE3RunEPNS0
      _13BindStateBaseE
      #14 0x7f94d06f7d52 _ZNO4base12OnceCallbackIFvvEE3RunEv
      #15 0x7f94d4386975 base::debug::TaskAnnotator::RunTask()
      #16 0x7f94d45c0c83 base::internal::IncomingTaskQueue::RunTask()
      #17 0x7f94d43ecce7 base::MessageLoop::RunTask()
      #18 0x7f94d43ece6e base::MessageLoop::DeferOrRunPendingTask()
      #19 0x7f94d43ed19d base::MessageLoop::DoWork()
      #20 0x7f94d05662c6 QtWebEngineCore::(anonymous namespace)::MessagePumpForUIQt::customEvent()
      #21 0x7f94cda95d00 QObject::event()
      #22 0x7f94cea7d03d QApplicationPrivate::notify_helper()                                                                                                                               
      #23 0x7f94cea84759 QApplication::notify()                                                                                                                                             
      #24 0x7f94cda6387b QCoreApplication::notifyInternal2()                                                                                                                                
      #25 0x7f94cda69a93 QCoreApplicationPrivate::sendPostedEvents()                                                                                                                        
      #26 0x7f94cda6a110 QCoreApplication::sendPostedEvents()                                                                                                                               
      #27 0x7f94cdac0c9a postEventSourceDispatch()                                                                                                                                          
      #28 0x7f94c7ba5797 g_main_context_dispatch                                                                                                                                            
      #29 0x7f94c7ba5a00 <unknown>                                                                                                                                                          
      #30 0x7f94c7ba5aac g_main_context_iteration                                                                                                                                           
      #31 0x7f94cdac05be QEventDispatcherGlib::processEvents()                                                                                                                              
      #32 0x7f94c61a2e6d QPAEventDispatcherGlib::processEvents()                                                                                                                            
      #33 0x7f94cda6179d QEventLoop::processEvents()                                                                                                                                        
      #34 0x7f94cda61beb QEventLoop::exec()                                                                                                                                                 
      #35 0x7f94cda6ba86 QCoreApplication::exec()                                                                                                                                           
      #36 0x7f94ce48a608 QGuiApplication::exec()                                                                                                                                            
      #37 0x7f94cea7cf1d QApplication::exec()                                                                                                                                               
      #38 0x561c48d4b439 <unknown>
      #39 0x7f94ccc4bfe1 __libc_start_main                                                                                                                                                  
      #40 0x561c48d4ae7a <unknown>
      

      devTools URL is added to the database: chrome-devtools://devtools/bundled/inspector.html but the updated used_items_ counter seems to be not written into the file. Subsequent loads seem to use another visited link manager and the counter starts from 0. Thus the counter is not in sync with the count of the added items.

      I couldn't reproduce this with simplebrowser (widget) so far. 5.10 is not affected since it doesn't support devtools frontend but it asserts too if the database is already corrupted by another version.

      The assert can be reproduced with the attached examples in quick and widget too. Moreover, 5.10 is also affected.

      Attachments

        1. main.cpp
          1 kB
        2. main.qml
          0.9 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              pvarga Peter Varga
              pvarga Peter Varga
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes