Bug 487727 - drkonqi causes 100% cpu load whenever I type in my password.
Summary: drkonqi causes 100% cpu load whenever I type in my password.
Status: RESOLVED FIXED
Alias: None
Product: drkonqi
Classification: Applications
Component: general (show other bugs)
Version: git-stable-Plasma/6.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-29 07:22 UTC by Dashon
Modified: 2024-06-19 19:03 UTC (History)
2 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 Dashon 2024-05-29 07:22:20 UTC
SUMMARY
Hey, I'm beta testing plasma 6.1 on arch and prior to the update to plasma 6.1 beta drkonqi would work properly. As in it would open after kwin crashes and give me a password prompt that would then walk me through the report crash steps. However after the update to 6.1 beta. After I type in my password, nothing happens and instead I see the drkonqi-polkit-helper process taking up 100% cpu usage of a single core seemingly until I kill the process

STEPS TO REPRODUCE
1. Cause kwin or some other kde app that reports to dr. konqi to crash.
2. Type in your password.

OBSERVED RESULT
Nothing happens. The window closes and that is it.

EXPECTED RESULT
The report crash window usually opens up after that.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.0.90
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.9.1-zen1-2-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3080/PCIe/SSE2
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C95
System Version: 1.0
Comment 1 Harald Sitter 2024-05-29 09:15:42 UTC
You get a password prompt on startup of drkonqi?
Comment 2 Dashon 2024-05-30 06:53:51 UTC
(In reply to Harald Sitter from comment #1)
> You get a password prompt on startup of drkonqi?

Yes, but only when kwin crashes.
Comment 3 Harald Sitter 2024-06-03 08:20:56 UTC
Ah! Yeah, that'd be normal. The password is for the polkit-helper and the polkit-helper decompresses data, so it'd be using a cpu core. The cpu load should eventually stop when tracing is complete - may be multiple minutes.

The concerning bit is probably that the drkonqi UI doesn't come up.

Any useful output in journalctl when this happens?
Comment 4 Dashon 2024-06-03 08:37:41 UTC
(In reply to Harald Sitter from comment #3)
> Ah! Yeah, that'd be normal. The password is for the polkit-helper and the
> polkit-helper decompresses data, so it'd be using a cpu core. The cpu load
> should eventually stop when tracing is complete - may be multiple minutes.
> 
> The concerning bit is probably that the drkonqi UI doesn't come up.
> 
> Any useful output in journalctl when this happens?

I'll look the next time it happens. The GUI did come up the last time though. I believe the tracing that you mentioned though takes so long atht it always gives me some message along the lines of it timing out and a button that says retry pops up.
Comment 5 Harald Sitter 2024-06-03 22:35:59 UTC
If a timeout occurs I'd also be interested in how long it took. Also how many CPU cores and RAM do you have, and is this with a HDD or an SSD?
Comment 6 Dashon 2024-06-03 22:39:05 UTC
(In reply to Harald Sitter from comment #5)
> If a timeout occurs I'd also be interested in how long it took. Also how
> many CPU cores and RAM do you have, and is this with a HDD or an SSD?

It is an nvme ssd. The cpu and ram information are in my initial post under software/os versions:
Comment 7 Dashon 2024-06-03 22:40:03 UTC
I'll also try and time how long the timeout takes. Kwin crashes for me about once a day, so I should have it the requested info by tomorrow.
Comment 8 Dashon 2024-06-04 09:21:53 UTC
When plasmashell crashed earlier today. The UI came up. However when kwin crashed only the password prompt came up. I typed in the password and so far it has been running for about 22 minutes. I tried to open iotop to see if anything was being written to disk. Such as downloading debug symbols or what not like it used to, but there is no io from any process related to dr konqi. I think I'll let the process run for about an hour and see if anything happens.
Comment 9 Dashon 2024-06-04 10:16:21 UTC
I let the process run for 1 hour and 13 minutes before forcibly killing it. In journalctl I found this block related to dr konqi. Not sure how relevant it is though.
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 ELF object binary architecture: AMD x86-64
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #10 0x00007bc05d92a0dc n/a (libc.so.6 + 0x1160dc)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #9  0x00007bc05d8a6ded n/a (libc.so.6 + 0x92ded)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #8  0x00007bc05e0c96e7 n/a (libQt6Core.so.6 + 0x2c96e7)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #7  0x00007bc05e03aff5 n/a (libQt6Core.so.6 + 0x23aff5)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #6  0x00007bc0607f0cf0 n/a (libkwin.so.6 + 0x3f0cf0)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #5  0x00007bc05d8ac3c9 pthread_once (libc.so.6 + 0x983c9)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #4  0x00007bc05d8ac34b n/a (libc.so.6 + 0x9834b)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #3  0x00007bc0607e8556 n/a (libkwin.so.6 + 0x3e8556)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #2  0x00007bc0607f36e4 n/a (libkwin.so.6 + 0x3f36e4)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #1  0x00007bc05d8a6552 pthread_cond_clockwait (libc.so.6 + 0x92552)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #0  0x00007bc05d8a34e9 n/a (libc.so.6 + 0x8f4e9)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 Stack trace of thread 2918:
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #5  0x00007bc05d92a0dc n/a (libc.so.6 + 0x1160dc)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #4  0x00007bc05d8a6ded n/a (libc.so.6 + 0x92ded)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #3  0x00007bc057450103 n/a (libpipewire-0.3.so.0 + 0x1c103)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #2  0x00007bc057501a21 n/a (libspa-support.so + 0x6a21)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #1  0x00007bc057510197 n/a (libspa-support.so + 0x15197)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #0  0x00007bc05d92a4e2 epoll_wait (libc.so.6 + 0x1164e2)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 Stack trace of thread 2887:
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #10 0x00007bc05d92a0dc n/a (libc.so.6 + 0x1160dc)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #9  0x00007bc05d8a6ded n/a (libc.so.6 + 0x92ded)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #8  0x00007bc05e0c96e7 n/a (libQt6Core.so.6 + 0x2c96e7)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #7  0x00007bc05e03aff5 n/a (libQt6Core.so.6 + 0x23aff5)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #6  0x00007bc0607f0cf0 n/a (libkwin.so.6 + 0x3f0cf0)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #5  0x00007bc05d8ac3c9 pthread_once (libc.so.6 + 0x983c9)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #4  0x00007bc05d8ac34b n/a (libc.so.6 + 0x9834b)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #3  0x00007bc0607e8556 n/a (libkwin.so.6 + 0x3e8556)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #2  0x00007bc0607f36e4 n/a (libkwin.so.6 + 0x3f36e4)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #1  0x00007bc05d8a6552 pthread_cond_clockwait (libc.so.6 + 0x92552)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #0  0x00007bc05d8a34e9 n/a (libc.so.6 + 0x8f4e9)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 Stack trace of thread 2926:
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #11 0x00007bc05d92a0dc n/a (libc.so.6 + 0x1160dc)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #10 0x00007bc05d8a6ded n/a (libc.so.6 + 0x92ded)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #9  0x00007bc05e0c96e7 n/a (libQt6Core.so.6 + 0x2c96e7)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #8  0x00007bc05e03aff5 n/a (libQt6Core.so.6 + 0x23aff5)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #7  0x00007bc0607f0cf0 n/a (libkwin.so.6 + 0x3f0cf0)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #6  0x00007bc05d8ac3c9 pthread_once (libc.so.6 + 0x983c9)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #5  0x00007bc05d8ac34b n/a (libc.so.6 + 0x9834b)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #4  0x00007bc0607e8556 n/a (libkwin.so.6 + 0x3e8556)
Jun 04 03:57:34 Desktop6123 drkonqi-polkit-helper[472729]:                 #3  0x00007bc0607f3a9e n/a (libkwin.so.6 + 0x3f3a9e)
Comment 10 Bug Janitor Service 2024-06-04 13:02:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/drkonqi/-/merge_requests/241
Comment 11 Harald Sitter 2024-06-05 13:26:20 UTC
Git commit 97390be3fe3e5e615c74fbdb41e53eaa2cd26358 by Harald Sitter.
Committed on 05/06/2024 at 13:24.
Pushed by sitter into branch 'master'.

polkit: correctly call fcntl

bit of a doozy this. fcntl requires a third argument as start position
for finding a free file descriptor. the previous incorrect call happened
to work in debug builds (presumably because the invalid memory would be
0x0) but failed in release builds (presumably because the invalid memory
would be some random large value).

explicitly set the target fd argument to at least 0 since we don't
really care what number the fd is so long as it is valid.

M  +1    -1    src/coredump/polkit/main.cpp

https://invent.kde.org/plasma/drkonqi/-/commit/97390be3fe3e5e615c74fbdb41e53eaa2cd26358
Comment 12 Harald Sitter 2024-06-05 13:26:26 UTC
Git commit 245cc609efe36b100a29aadff60a0277bedc8de5 by Harald Sitter.
Committed on 05/06/2024 at 13:24.
Pushed by sitter into branch 'master'.

polkit: don't ignore fcntl errors

treat them as internal errors and warn about them

previously we'd ingore the errors and use an invalid fd, this would later manifest
in infinite write loops on the invalid file descriptor (i.e. all writes fail
because the fd is garbage leading to an effective inifinite loop while trying
to write segments in coredumpexcavator.cpp)

M  +9    -1    src/coredump/polkit/main.cpp

https://invent.kde.org/plasma/drkonqi/-/commit/245cc609efe36b100a29aadff60a0277bedc8de5
Comment 13 Bug Janitor Service 2024-06-05 13:27:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/drkonqi/-/merge_requests/242
Comment 14 Harald Sitter 2024-06-05 13:30:29 UTC
Git commit 7e45b8529f0f4846965dad86988dbaf42394969a by Harald Sitter.
Committed on 05/06/2024 at 13:27.
Pushed by sitter into branch 'Plasma/6.1'.

polkit: correctly call fcntl

bit of a doozy this. fcntl requires a third argument as start position
for finding a free file descriptor. the previous incorrect call happened
to work in debug builds (presumably because the invalid memory would be
0x0) but failed in release builds (presumably because the invalid memory
would be some random large value).

explicitly set the target fd argument to at least 0 since we don't
really care what number the fd is so long as it is valid.
(cherry picked from commit 97390be3fe3e5e615c74fbdb41e53eaa2cd26358)

M  +1    -1    src/coredump/polkit/main.cpp

https://invent.kde.org/plasma/drkonqi/-/commit/7e45b8529f0f4846965dad86988dbaf42394969a
Comment 15 Harald Sitter 2024-06-05 13:30:38 UTC
Git commit f6f43a575f882e888270a2fe82d5b0fded586c1c by Harald Sitter.
Committed on 05/06/2024 at 13:27.
Pushed by sitter into branch 'Plasma/6.1'.

polkit: don't ignore fcntl errors

treat them as internal errors and warn about them

previously we'd ingore the errors and use an invalid fd, this would later manifest
in infinite write loops on the invalid file descriptor (i.e. all writes fail
because the fd is garbage leading to an effective inifinite loop while trying
to write segments in coredumpexcavator.cpp)
(cherry picked from commit 245cc609efe36b100a29aadff60a0277bedc8de5)

M  +9    -1    src/coredump/polkit/main.cpp

https://invent.kde.org/plasma/drkonqi/-/commit/f6f43a575f882e888270a2fe82d5b0fded586c1c
Comment 16 Dashon 2024-06-19 19:03:24 UTC
Just wanted to confirm that this bug is indeed fixed.