Bug 411349 - Dolphin 100% CPU core usage
Summary: Dolphin 100% CPU core usage
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 22.04.1
Platform: Other Linux
: NOR grave
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-27 13:18 UTC by Germano Massullo
Modified: 2023-10-11 06:46 UTC (History)
9 users (show)

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


Attachments
General configuration of Dolphin (215.07 KB, image/png)
2022-05-05 18:30 UTC, Emanuele Spirito
Details
Contents of the open Dolphin session while core usage became higher than normal (171.14 KB, image/png)
2022-05-05 18:31 UTC, Emanuele Spirito
Details
Core usage of Dolphin in system-monitor (178.81 KB, image/png)
2022-05-05 18:32 UTC, Emanuele Spirito
Details
Another image of the core usage lasting in time (222.15 KB, image/png)
2022-05-05 18:32 UTC, Emanuele Spirito
Details
Core usage returned normal (226.76 KB, image/png)
2022-05-05 18:35 UTC, Emanuele Spirito
Details
perf top (474.12 KB, image/jpeg)
2022-08-01 11:31 UTC, Germano Massullo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Germano Massullo 2019-08-27 13:18:18 UTC
SUMMARY
Dolphin uses 100% of a CPU core. The current folder contains a lot of images, but the preview has been disabled in Dolphin


(gdb) Quit
(gdb) bt
#0  0x00007ffcd7d175d1 in ?? ()
#1  0x00007fccf02ae2c3 in __GI___clock_gettime (clock_id=clock_id@entry=1, tp=tp@entry=0x7ffcd7c2c0f0) at ../sysdeps/unix/clock_gettime.c:115
#2  0x00007fccee28a569 in qt_clock_gettime (ts=0x7ffcd7c2c0f0, clock=1) at kernel/qelapsedtimer_unix.cpp:220
#3  do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at kernel/qelapsedtimer_unix.cpp:166
#4  QElapsedTimer::nsecsElapsed (this=this@entry=0x7fccee4ee708 <(anonymous namespace)::Q_QGS_staticQMimeDatabase::innerFunction()::holder+8>) at kernel/qelapsedtimer_unix.cpp:220
#5  0x00007fccee28a5ad in QElapsedTimer::elapsed (this=this@entry=0x7fccee4ee708 <(anonymous namespace)::Q_QGS_staticQMimeDatabase::innerFunction()::holder+8>) at kernel/qelapsedtimer_unix.cpp:228
#6  0x00007fccee2f065d in QMimeDatabasePrivate::shouldCheck (this=0x7fccee4ee700 <(anonymous namespace)::Q_QGS_staticQMimeDatabase::innerFunction()::holder>) at mimetypes/qmimedatabase.cpp:89
#7  0x00007fccee2f1d2d in QMimeDatabasePrivate::providers (this=this@entry=0x7fccee4ee700 <(anonymous namespace)::Q_QGS_staticQMimeDatabase::innerFunction()::holder>) at mimetypes/qmimedatabase.cpp:159
#8  0x00007fccee2f1f1b in QMimeDatabasePrivate::mimeTypeForName (this=0x7fccee4ee700 <(anonymous namespace)::Q_QGS_staticQMimeDatabase::innerFunction()::holder>, nameOrAlias=...)
    at mimetypes/qmimedatabase.cpp:182
#9  0x00007fccee2f20a5 in QMimeDatabase::mimeTypeForName (this=this@entry=0x7ffcd7c2c2e8, nameOrAlias=...) at mimetypes/qmimedatabase.cpp:511
#10 0x00007fccefdb702f in KIO::PreviewJobPrivate::startPreview (this=0x5601137c0610) at /usr/src/debug/kf5-kio-5.59.0-1.fc30.x86_64/src/widgets/previewjob.cpp:350
#11 0x00007fccefdb8a09 in KIO::PreviewJob::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
    at /usr/src/debug/kf5-kio-5.59.0-1.fc30.x86_64/src/widgets/previewjob.h:244
#12 0x00007fccee260bfa in QObject::event (this=0x5601136967d0, e=<optimized out>) at kernel/qobject.cpp:1260
#13 0x00007fcceec70af6 in QApplicationPrivate::notify_helper (this=this@entry=0x560112819070, receiver=receiver@entry=0x5601136967d0, e=e@entry=0x560113c354f0) at kernel/qapplication.cpp:3737
#14 0x00007fcceec79e80 in QApplication::notify (this=0x7ffcd7c2ca20, receiver=0x5601136967d0, e=0x560113c354f0) at kernel/qapplication.cpp:3483
#15 0x00007fccee235ae8 in QCoreApplication::notifyInternal2 (receiver=0x5601136967d0, event=0x560113c354f0) at kernel/qcoreapplication.cpp:1084
#16 0x00007fccee238a93 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x56011280ec20) at kernel/qcoreapplication.cpp:1821
#17 0x00007fccee28ae47 in postEventSourceDispatch (s=s@entry=0x5601128cd940) at kernel/qeventdispatcher_glib.cpp:276
#18 0x00007fccec0f6edd in g_main_dispatch (context=0x7fccd4004fd0) at ../glib/gmain.c:3189
#19 g_main_context_dispatch (context=context@entry=0x7fccd4004fd0) at ../glib/gmain.c:3854
#20 0x00007fccec0f7270 in g_main_context_iterate (context=context@entry=0x7fccd4004fd0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:3927
#21 0x00007fccec0f7313 in g_main_context_iteration (context=0x7fccd4004fd0, may_block=may_block@entry=1) at ../glib/gmain.c:3988
#22 0x00007fccee28abd5 in QEventDispatcherGlib::processEvents (this=0x5601128c2520, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#23 0x00007fccee2349eb in QEventLoop::exec (this=this@entry=0x7ffcd7c2c920, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#24 0x00007fccee23c726 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#25 0x00007fccee6d7320 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1784
#26 0x00007fcceec70a69 in QApplication::exec () at kernel/qapplication.cpp:2893
#27 0x00007fccf03b3f98 in kdemain (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/dolphin-19.04.2-1.fc30.x86_64/src/main.cpp:168
--Type <RET> for more, q to quit, c to continue without paging--
#28 0x00007fccf01c8f33 in __libc_start_main (main=0x560112298070 <main>, argc=1, argv=0x7ffcd7c2cba8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffcd7c2cb98)
    at ../csu/libc-start.c:308
#29 0x00005601122980ae in _start ()


SOFTWARE/OS VERSIONS
Fedora 30
Dolphin 19.04.2
Linux/KDE Plasma: 5.15.5
KDE Frameworks 5.59.0
Qt 5.12.4
Comment 1 Méven Car 2019-09-03 12:36:42 UTC
This seems to be due to some file previewing.

The CPU usage could be due a single file, could you find the file causing the issue ?

Has the preview been disable in the information panel as well ?
Do you have tooltip enabled (Settings > General "Show tooltips") ?
Comment 2 Bug Janitor Service 2019-09-18 04:33:09 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Bug Janitor Service 2019-10-03 04:33:13 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 4 Germano Massullo 2019-10-04 08:09:46 UTC
> Do you have tooltip enabled (Settings > General "Show tooltips") ?
No
Comment 5 Méven Car 2019-10-08 10:08:07 UTC
The CPU usage could be due a single file, could you find the file causing the issue ?

Has the preview been disabled in the information panel as well ?
Comment 6 Germano Massullo 2019-10-08 10:16:26 UTC
(In reply to Méven Car from comment #5)
> The CPU usage could be due a single file, could you find the file causing
> the issue ?

I don't remember which folder caused the problem

> Has the preview been disabled in the information panel as well ?

There is no information panel enabled
Comment 7 Vasiliy Glazov 2020-04-02 17:54:09 UTC
I also have this bug in Fedora 31.
Dolphin load 100% one core not immediately after startup and on any open folder without pictures.

But on other my system I don't see this.
Comment 8 Méven Car 2020-04-19 15:38:04 UTC
> I also have this bug in Fedora 31.
> Dolphin load 100% one core not immediately after startup and on any open folder without > pictures.

> But on other my system I don't see this.

We need a backtrace or a file to diagnose, we cannot even confirm your bug is related to this one.

Regarding this bug and code it points to in previewjob.cpp:

>                     QMimeDatabase db;
>                    // check mime type inheritance, resolve aliases
>                    const QMimeType mimeInfo = db.mimeTypeForName(mimeType);
>                    if (mimeInfo.isValid()) {

According to the backtrace in first comment, a file triggers a crash in QMimeDatabase.
So this could be a Qt bug, we would need to find the file triggering the bug ideally to move forward.
Comment 9 Tonurics 2020-09-08 19:02:06 UTC
I'm also seeing this issue on Dolphin 20.081

It appears to be related to the Folders panel. If I navigate to a folder that has sub-folders that can't be expand: Dolphin appears to endlessly loop, rechecking the sub-folders, testing to see if they can be expanded: the expanding arrows targets can be seen flashing [many times a second] next to any folder icons that can't expand. Which coincides with Dolphin using 100% CPU usage.

As soon as the expanded folder is collapsed in the Folders panel and it no longer shows non-expanding folders: the CPU usage drops to normal.
Comment 10 Méven Car 2020-10-30 08:44:05 UTC
(In reply to Tonurics from comment #9)
> I'm also seeing this issue on Dolphin 20.081
> 
> It appears to be related to the Folders panel. If I navigate to a folder
> that has sub-folders that can't be expand: Dolphin appears to endlessly
> loop, rechecking the sub-folders, testing to see if they can be expanded:
> the expanding arrows targets can be seen flashing [many times a second] next
> to any folder icons that can't expand. Which coincides with Dolphin using
> 100% CPU usage.
> 
> As soon as the expanded folder is collapsed in the Folders panel and it no
> longer shows non-expanding folders: the CPU usage drops to normal.

That's very interesting and should quite help fix this issue although it should be in another bug since this is clearly relating to another component.
What's "sub-folders that can't be expand" ? Is that because of file access permissions ?
Comment 11 Tonurics 2020-10-30 09:47:41 UTC
(In reply to Méven Car from comment #10)
> That's very interesting and should quite help fix this issue although it
> should be in another bug since this is clearly relating to another component.
> What's "sub-folders that can't be expand" ? Is that because of file access
> permissions ?

Hello Méven,

I'm referring simply to a folder that does not contain a sub-folder.

I agree, that I think it's related to a different component. Having said that, I ended up created a separate Bug report making my comment here.

See: https://bugs.kde.org/show_bug.cgi?id=426617 for more information, along with attachments that might help.
Comment 12 Kabus 2021-04-06 00:41:00 UTC
Same issue here, the fan rise it's maximum level and noise wehen open Dolphin, but my cpu reachs only 25% instead (i7 7600u)
Comment 13 Emanuele Spirito 2022-05-05 18:30:09 UTC
Same problem on my system (Dolphin version 21.12.2.1-1.fc35). I have found a possible clue on the problem. During the 100% usage of a core, I tried different window views. I had no preview setting, no subfolder (I read the comment of @Tonurics). I had a file selected, but by deselecting it, nothing change. The core usage returned normal (near 2%) after I changed the view of Dolphin from "icon view" to "detailed view" (I tried also the "compact view" but that change didn't make anything in core usage). 
I've attached my screenshot so you can see this report in a visual media way. 

Other system information:
Operating System: Fedora Linux 35
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Kernel Version: 5.16.18-200.fc35.x86_64 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-1065G7 CPU @ 1.30GHz
Memory: 7.5 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Plus Graphics
Comment 14 Emanuele Spirito 2022-05-05 18:30:57 UTC
Created attachment 148586 [details]
General configuration of Dolphin
Comment 15 Emanuele Spirito 2022-05-05 18:31:48 UTC
Created attachment 148587 [details]
Contents of the open Dolphin session while core usage became higher than normal
Comment 16 Emanuele Spirito 2022-05-05 18:32:23 UTC
Created attachment 148588 [details]
Core usage of Dolphin in system-monitor
Comment 17 Emanuele Spirito 2022-05-05 18:32:57 UTC
Created attachment 148589 [details]
Another image of the core usage lasting in time
Comment 18 Emanuele Spirito 2022-05-05 18:35:15 UTC
Created attachment 148590 [details]
Core usage returned normal

Important: see (above left in the screen) that, respect to other screenshots, I changed Dolphin view from "icon view" to "detailed view"
Comment 19 Méven Car 2022-05-07 18:09:04 UTC
(In reply to Emanuele Spirito from comment #18)
> Created attachment 148590 [details]
> Core usage returned normal
> 
> Important: see (above left in the screen) that, respect to other
> screenshots, I changed Dolphin view from "icon view" to "detailed view"

Thank you for the effort of providing information.

Screenshots have low value unfortunately, and don’t help finding out the origin of the issue.
We can’t confirm what your are experiencing is the same bug.

> The core usage returned normal (near 2%) after I changed the view of Dolphin from "icon view" to "detailed view" (I tried also the "compact view" but that change didn't make anything in core usage). 

This is a clue, the Icon View and compact are internally using the same code, whereas details is separated.
The most important information though is to find a reliable way to reproduce the symptoms that a developer could reproduce then.
Until we don’t a way to reproduce or pinpoint the origin of the issue, we are clueless. 

The recommended path to give actionable intel here, would be a trace using gdb or https://github.com/KDAB/hotspot. Those technics require debugging symbols. It might be out of your skill.

It still helps to update bugs to inform devs which bugs are still effectively hurting users and which ones are more common.
So thanks for the effort anyway.

This bug is too generic now, the original trace was good but I couldn’t do anything with, since I can’t reproduce, browsing files and folders.
The second bug reported here got fixed https://bugs.kde.org/show_bug.cgi?id=426617
And you Emanuele might be experiencing a third with the same kind of symptoms but a different origin as far as I can tell.
Comment 20 Emanuele Spirito 2022-05-08 15:29:08 UTC
> The most important information though is to find a reliable way to reproduce
> the symptoms that a developer could reproduce then.
> Until we don’t a way to reproduce or pinpoint the origin of the issue, we
> are clueless. 

I know, I was trying to explain in the most complete way the issue so maybe any expert reading could find a clue to the solution I cannot see. 

> The recommended path to give actionable intel here, would be a trace using
> gdb or https://github.com/KDAB/hotspot. Those technics require debugging
> symbols. It might be out of your skill.

I had a look to that link but I think you are right, this is quite hard for me. 

> It still helps to update bugs to inform devs which bugs are still
> effectively hurting users and which ones are more common.
> So thanks for the effort anyway.

You are welcome, I'll stay tuned so if I can find the way to reproduce the bug I'll tell you.
Comment 21 Germano Massullo 2022-08-01 11:31:20 UTC
Created attachment 151046 [details]
perf top

perf top while running Dolphin dolphin-22.04.1-1.fc36.x86_64
Comment 22 quazgar 2023-10-11 06:46:08 UTC
(In reply to Méven Car from comment #19)
> The recommended path to give actionable intel here, would be a trace using
> gdb or https://github.com/KDAB/hotspot. Those technics require debugging
> symbols. It might be out of your skill.

I will try to think of creating a backtrace when I run into this bug again. To me it happens every now and then, once every few months to noticeably make keyboard input sluggish.