Bug 378754 - /usr/bin/baloo_file_extractor consuming 100 %, seemingly concatenating symlink loop to endless path.
Summary: /usr/bin/baloo_file_extractor consuming 100 %, seemingly concatenating symlin...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: Baloo File Daemon (show other bugs)
Version: 5.33.0
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Pinak Ahuja
URL:
Keywords:
: 359888 364574 384088 384372 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-04-13 19:34 UTC by Jan-Matthias Braun
Modified: 2018-10-19 02:21 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Matthias Braun 2017-04-13 19:34:47 UTC
out=<synthetic pointer>: 0x1f57b82 "e/lib/wine/prog/drive_c/users/user/Meine Dokumente/lib/wine/prog/drive_c/users/user/Meine Dokumente/lib/wine/prog/drive_c/users/user/Meine Dokumente/lib/wine/prog/drive_c/users/user/Meine Doku"..., ba=<synthetic pointer>...) at /usr/include/qt5/QtCore/qstringbuilder.h:353
353             while (a != end)
(gdb) #0  QConcatenable<QByteArray>::appendTo (
    out=<synthetic pointer>: 0x1f57b82 "e/lib/wine/prog/drive_c/users/user/Meine Dokumente/lib/wine/prog/drive_c/users/user/Meine Dokumente/lib/wine/prog/drive_c/users/user/Meine Dokumente/lib/wine/prog/drive_c/users/user/Meine Doku"..., ba=<synthetic pointer>...) at /usr/include/qt5/QtCore/qstringbuilder.h:353
[…]

Here, in ~/wine/prog/drive_c, Meine Dokumente is a symlink to ~/. The parameter implies, that the concatenation is going on for quite some time by now.
Comment 1 Jan-Matthias Braun 2017-04-13 19:39:19 UTC
Full backtrace:

(gdb) #0  QConcatenable<QByteArray>::appendTo (                                                                                                                                                           
    out=<synthetic pointer>: 0x2569886 "e/lib/wine/prog/drive_c/users/user/Meine Dokumente/lib/wine/prog/drive_c/users/user/Meine Dokumente/lib/wine/prog/drive_c/users/user/Meine Dokumente/lib/wine/prog/drive_c/users/user/Meine Doku"..., ba=<synthetic pointer>...) at /usr/include/qt5/QtCore/qstringbuilder.h:354                                                                                    
#1  QConcatenable<QStringBuilder<QStringBuilder<QByteArray, char>, QByteArray> >::appendTo<char> (                                                                                                        
    out=<synthetic pointer>: 0x2569886 "e/lib/wine/prog/drive_c/users/user/Meine Dokumente/lib/wine/prog/drive_c/users/user/Meine Dokumente/lib/wine/prog/drive_c/users/user/Meine Dokumente/lib/wine/prog/drive_c/users/user/Meine Doku"..., p=...) at /usr/include/qt5/QtCore/qstringbuilder.h:372                                                                                                        
#2  QStringBuilder<QStringBuilder<QByteArray, char>, QByteArray>::convertTo<QByteArray> (this=<optimized out>) at /usr/include/qt5/QtCore/qstringbuilder.h:118                                            
#3  QStringBuilder<QStringBuilder<QByteArray, char>, QByteArray>::operator QByteArray (this=<optimized out>) at /usr/include/qt5/QtCore/qstringbuilder.h:131                                              
#4  Baloo::DocumentUrlDB::get (this=this@entry=0x7ffd9a75ece0, docId=docId@entry=12580650699783686) at /var/tmp/portage/kde-frameworks/baloo-5.33.0/work/baloo-5.33.0/src/engine/documenturldb.cpp:145    
#5  0x00007f5767eb76e1 in Baloo::Transaction::documentUrl (this=<optimized out>, id=id@entry=12580650699783686)                                                                                           
    at /var/tmp/portage/kde-frameworks/baloo-5.33.0/work/baloo-5.33.0/src/engine/transaction.cpp:104                                                                                                      
#6  0x00000000004089b8 in Baloo::App::processNextFile (this=0x7ffd9a75f340) at /var/tmp/portage/kde-frameworks/baloo-5.33.0/work/baloo-5.33.0/src/file/extractor/app.cpp:85                               
#7  0x00007f5766d22646 in QSingleShotTimer::timerEvent(QTimerEvent*) () from /usr/lib64/libQt5Core.so.5                                                                                                   
#8  0x00007f5766d17a1b in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5                                                                                                                      
#9  0x00007f57675074bc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007f576750e659 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#11 0x00007f5766cf103a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#12 0x00007f5766d3b773 in QTimerInfoList::activateTimers() () from /usr/lib64/libQt5Core.so.5
#13 0x00007f5766d3bce4 in timerSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/libQt5Core.so.5
#14 0x00007f5763ae8177 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#15 0x00007f5763ae83a8 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#16 0x00007f5763ae844c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#17 0x00007f5766d3c0ef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#18 0x00007f5766cf00ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#19 0x00007f5766cf784d in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#20 0x0000000000407acc in main (argc=<optimized out>, argv=0x7ffd9a75f528) at /var/tmp/portage/kde-frameworks/baloo-5.33.0/work/baloo-5.33.0/src/file/extractor/main.cpp:57
Comment 2 Jan-Matthias Braun 2017-04-13 20:13:07 UTC
When the indexer suspends on a laptop running from battery, the extractor process can continue to run and burns battery runtime.
Comment 3 Jan-Matthias Braun 2017-04-17 22:08:01 UTC
The indexer is ignoring the exclude hint on the parent directory. I don't know if this could be connected to https://bugs.kde.org/show_bug.cgi?id=378884 .
Comment 4 Stefan Brüns 2018-05-03 22:37:34 UTC
Git commit f57c4bc27b81f2b40d910d376a0bb531cd8472c6 by Stefan Brüns.
Committed on 03/05/2018 at 22:37.
Pushed by bruns into branch 'master'.

Avoid infinite loops when fetching the URL from DocumentUrlDB

Summary:
Some users apparently have DBs which contain infinite loops in the idTree
(a parentId pointing to itself or one of its children). This manifests in
either crashes due to exhausted memory and/or the process being stuck
with 100% CPU load.

The problem can only be completely solved by either recreating the DB, or
by cleaning the DB from any problematic records. As in interim solution,
stop the code from crashing.
Related: bug 385846, bug 391258, bug 393181

Reviewers: #baloo, michaelh, #frameworks, ngraham

Reviewed By: ngraham

Subscribers: ngraham, #frameworks

Tags: #frameworks, #baloo

Differential Revision: https://phabricator.kde.org/D12335

M  +10   -2    src/engine/documenturldb.cpp

https://commits.kde.org/baloo/f57c4bc27b81f2b40d910d376a0bb531cd8472c6
Comment 5 Nate Graham 2018-05-26 22:29:49 UTC
*** Bug 384372 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2018-05-29 04:12:18 UTC
*** Bug 364574 has been marked as a duplicate of this bug. ***
Comment 7 Stefan Brüns 2018-10-16 18:18:12 UTC
*** Bug 359888 has been marked as a duplicate of this bug. ***
Comment 8 Stefan Brüns 2018-10-16 23:51:33 UTC
*** Bug 384088 has been marked as a duplicate of this bug. ***