Bug 377671 - baloosearchrunner - zombie child - xdg-user-dir 100% CPU
Summary: baloosearchrunner - zombie child - xdg-user-dir 100% CPU
Status: RESOLVED FIXED
Alias: None
Product: frameworks-baloo
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: Pinak Ahuja
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-16 02:48 UTC by Gerald Cox
Modified: 2018-10-29 19:51 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Plasmashell backtrace (58.99 KB, text/plain)
2017-03-16 02:48 UTC, Gerald Cox
Details
krunner backtrace (45.09 KB, text/plain)
2017-03-16 19:02 UTC, Gerald Cox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Cox 2017-03-16 02:48:18 UTC
Created attachment 104592 [details]
Plasmashell backtrace

Description of problem:
Plasmashell - zombie child - xdg-user-dir 100% CPU

ps axo stat,ppid,pid,comm | grep -w defunct
Z     2084  6679 xdg-user-dir <defunct>

ps -e | grep 2084
 2084 ?        00:27:57 plasmashell


Version-Release number of selected component (if applicable):

kf5-plasma-5.32.0-2.fc25.x86_64

How reproducible:
Not sure what triggers... I had just rebooted about an hour ago and it just happened.


Actual results:
plasmashell process uses 100% cpu - zombie process xdg-user-dir

Expected results:
No zombie, normal cpu utilization

Additional info:
Workaround is to killall plasmashell; plasmashell from krunner
This releases the zombie and cpu returns to normal

Fedora bug:  https://bugzilla.redhat.com/show_bug.cgi?id=1432619
Comment 1 Rex Dieter 2017-03-16 13:17:06 UTC
Thread 19 (appended) appears to be the culprit, related to krunner baloo search plugin.

Fwiw, fedora's baloo file search is configured to search only document-centric directories by default, with baloofilerc:

folders[$e]=$(xdg-user-dir DESKTOP),$(xdg-user-dir DOCUMENTS),$(xdg-user-dir PICTURES),$(xdg-user-dir VIDEOS),$(xdg-user-dir MUSIC)

If calling out to xdg-user-dir like this is problematic, then perhaps we can rely solely on patching baloo:

https://src.fedoraproject.org/cgit/rpms/kf5-baloo.git/tree/baloo-5.14.0-baloofile_config.patch

which, for example, uses QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation)
to populate baloo defaults instead.



-------------------------------------


Thread 19 (Thread 0x7fdc597fb700 (LWP 5719)):
#0  0x00007fdd5d0c5bed in read () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fdd5d04a7e0 in _IO_new_file_underflow (fp=0x7fdc3c031be0) at fileops.c:600
---Type <return> to continue, or q <return> to quit---
#2  0x00007fdd5d04ba62 in __GI__IO_default_uflow (fp=0x7fdc3c031be0) at genops.c:413
#3  0x00007fdd5d045b20 in _IO_getc (fp=0x7fdc3c031be0) at getc.c:38
#4  0x00007fdd5de29e63 in QFSFileEnginePrivate::nativeRead(char*, long long) (this=0x7fdc3c047460, data=0x7fdc597f6560 "/home/gbcox/Music\n\ns\n\nDOCUMENTS_DIR=\"$HOME/Documents\"\nXDG_MUSIC_DIR=\"$HOME/Music\"\nXDG_PICTURES_DIR=\"$HOME/Pictures\"\nXDG_VIDEOS_DIR=\"$HOME/Videos\"\n\177Y\334\177", len=16384) at io/qfsfileengine_unix.cpp:320
#5  0x00007fdd5ddd340f in QFileDevice::readData(char*, long long) (this=<optimized out>, data=0x7fdc597f6560 "/home/gbcox/Music\n\ns\n\nDOCUMENTS_DIR=\"$HOME/Documents\"\nXDG_MUSIC_DIR=\"$HOME/Music\"\nXDG_PICTURES_DIR=\"$HOME/Pictures\"\nXDG_VIDEOS_DIR=\"$HOME/Videos\"\n\177Y\334\177", len=16384) at io/qfiledevice.cpp:460
#6  0x00007fdd5ddd9d29 in QIODevice::read(char*, long long) (
    this=0x7fdc3c0132b0, data=data@entry=0x7fdc597f6560 "/home/gbcox/Music\n\ns\n\nDOCUMENTS_DIR=\"$HOME/Documents\"\nXDG_MUSIC_DIR=\"$HOME/Music\"\nXDG_PICTURES_DIR=\"$HOME/Pictures\"\nXDG_VIDEOS_DIR=\"$HOME/Videos\"\n\177Y\334\177", maxSize=maxSize@entry=16384) at io/qiodevice.cpp:1055
#7  0x00007fdd5dde80c3 in QTextStreamPrivate::fillReadBuffer(long long) (this=this@entry=0x7fdc3c01b880, maxBytes=maxBytes@entry=-1) at io/qtextstream.cpp:456
#8  0x00007fdd5dde8593 in QTextStreamPrivate::read(int) (this=0x7fdc3c01b880, maxlen=maxlen@entry=2147483647) at io/qtextstream.cpp:631
#9  0x00007fdd5dde9a10 in QTextStream::readAll() (this=this@entry=0x7fdc597fa6c0) at io/qtextstream.cpp:1655
#10 0x00007fdd5ec936d3 in KConfigPrivate::expandString(QString const&) (value=...) at /usr/src/debug/kconfig-5.32.0/src/core/kconfig.cpp:193
#11 0x00007fdd5ec9ece8 in KConfigGroup::readPathEntry(char const*, QString const&) const (this=<optimized out>, key=0x7fdc5aeae1c7 "folders", aDefault=...)
    at /usr/src/debug/kconfig-5.32.0/src/core/kconfiggroup.cpp:816
#12 0x00007fdd5eca191c in KConfigGroup::readPathEntry(char const*, QStringList const&) const (this=<optimized out>, key=<optimized out>, aDefault=...)
    at /usr/src/debug/kconfig-5.32.0/src/core/kconfiggroup.cpp:828
#13 0x00007fdc5aea2fa5 in Baloo::FileIndexerConfig::buildFolderCache() () at /lib64/libKF5Baloo.so.5
#14 0x00007fdc5aea365b in Baloo::FileIndexerConfig::forceConfigUpdate() () at /lib64/libKF5Baloo.so.5
#15 0x00007fdc5aea37b0 in Baloo::FileIndexerConfig::FileIndexerConfig(QObject*) () at /lib64/libKF5Baloo.so.5
#16 0x00007fdc5aea0a00 in Baloo::IndexerConfig::IndexerConfig() () at /lib64/libKF5Baloo.so.5
#17 0x00007fdc5b0c2184 in SearchRunner::match(Plasma::RunnerContext&, QString const&, QString const&) (this=this@entry=0x55b577ce36d0, context=..., type=..., category=...)
    at /usr/src/debug/plasma-workspace-5.9.3/runners/baloo/baloosearchrunner.cpp:94
#18 0x00007fdc5b0c3241 in SearchRunner::match(Plasma::RunnerContext&) (this=0x55b577ce36d0, context=...) at /usr/src/debug/plasma-workspace-5.9.3/runners/baloo/baloosearchrunner.cpp:177
Comment 2 Gerald Cox 2017-03-16 19:02:44 UTC
Created attachment 104604 [details]
krunner backtrace

Problem just occurred again... this time with krunner as the parent taking all the CPU... cleared problem by:
killall krunner; krunner
Comment 3 Stefan Brüns 2018-10-29 19:51:49 UTC
baloo no longer runs in the same process as krunner.

Please create a new bugreport if you still face any problems.