Bug 440082 - Removable Media Tab Refuses to Load, Crashes System Settings
Summary: Removable Media Tab Refuses to Load, Crashes System Settings
Status: REOPENED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_deviceautomounter (show other bugs)
Version: 6.0.2
Platform: Kubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Torrie Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-20 19:22 UTC by dev.lh
Modified: 2024-03-15 10:06 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dev.lh 2021-07-20 19:22:56 UTC
SUMMARY
The removable devices tab simply refuses to load, but that consistently.
No stdout logs are produced, the application seems deadlocked and needs to be closed externally.

STEPS TO REPRODUCE
I do not know how far that was responsible for it, but the problems occurred after I mounted a new webcam via USB for the first time. Since then, this tab simply won't open, even when the webcam was removed again, and subsequently crashes the entire application. I do not know, however, whether the problem existed before as well, or only since then.

1. Open system settings
(i. Mount webcam?)
2. Navigate to removable media tab
3. Click on this tab
4. Enjoy the crash

OBSERVED RESULT
Application becomes deadlocked and has to be terminated externally


EXPECTED RESULT
Program should not deadlock.


SOFTWARE/OS VERSIONS
Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.8.0-59-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-9700K CPU @ 3.60GHz
Memory: 15,5 GiB of RAM

ADDITIONAL INFORMATION
My best guess for how this issue came to be is that some system resource is requested that simply is never accessible, resulting in the application waiting forever to get access to that resource.
Comment 1 David Edmundson 2021-07-21 08:35:11 UTC
Can you get a backtrace for the crash?
Comment 2 Bug Janitor Service 2021-08-05 04:33:39 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 2021-08-20 04:36:38 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 minsens 2021-10-09 08:52:46 UTC
Hi,

I found this ticket after I had a similar problem. Not sure how to get a backtrace when the program hangs, but this is the output when I start the system settings from the terminal:

$ systemsettings5 --version
systemsettings 5.22.5
$ systemsettings5
kf.coreaddons: A plugin with the keyword "kwinoptions" was already registered. A keyword must be unique!
kf.coreaddons: Two plugins with the same interface( QObject ) were registered. Use keywords to identify the plugins.
kf.coreaddons: Two plugins with the same interface( QObject ) were registered. Use keywords to identify the plugins.
kf.coreaddons: Two plugins with the same interface( QObject ) were registered. Use keywords to identify the plugins.
QQmlEngine::setContextForObject(): Object already has a QQmlContext
file:///usr/lib64/qt5/qml/org/kde/kirigami.2/BasicListItem.qml:279:18: QML QQuickItem*: Binding loop detected for property "implicitWidth"
file:///usr/lib64/qt5/qml/org/kde/kirigami.2/BasicListItem.qml:279:18: QML QQuickItem*: Binding loop detected for property "implicitWidth"
file:///usr/lib64/qt5/qml/org/kde/kirigami.2/BasicListItem.qml:279:18: QML QQuickItem*: Binding loop detected for property "implicitWidth"
file:///usr/lib64/qt5/qml/org/kde/kirigami.2/BasicListItem.qml:279:18: QML QQuickItem*: Binding loop detected for property "implicitWidth"
file:///usr/lib64/qt5/qml/org/kde/kirigami.2/BasicListItem.qml:279:18: QML QQuickItem*: Binding loop detected for property "implicitWidth"
QQmlEngine::setContextForObject(): Object already has a QQmlContext
QQmlEngine::setContextForObject(): Object already has a QQmlContext
---------- click on removable storage ----------
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/ldap.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/ldap.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/sieve.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/sieve.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/about.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/about.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/activities.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/activities.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/bookmarks.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/bookmarks.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/filenamesearch.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/filenamesearch.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/filter.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/filter.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/fish.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/fish.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/man.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/man.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/mtp.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/mtp.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/network.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/network.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/nfs.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/nfs.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/recentdocuments.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/recentdocuments.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/settings.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/settings.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/sftp.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/sftp.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/thumbnail.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/thumbnail.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/applications.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/applications.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/desktop.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/desktop.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/videodvd.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/videodvd.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/akonadi.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/akonadi.so'"
kf.coreaddons: no metadata found in "/usr/lib64/qt5/plugins/kf5/kio/pop3.so" "Failed to extract plugin meta data from '/usr/lib64/qt5/plugins/kf5/kio/pop3.so'"
---------- now hangs ----------

After some investigation, I found what the problem was in my case. Checking ~/.config/kded_device_automounterrc I found about 15000 entries from docker. No idea why exactly they where there. I deleted almost everything, leaving only:

[General]
AutomountEnabled=true
AutomountOnPlugin=false

And then the system settings did not hang anymore when clicking on removable storage. So in my case it was not a real deadlock, but it just took so long to process all entries that it looked like one (I tested leaving around 2000 entries and after some waiting the system settings managed to open).

I would not really consider this KDE's fault, but maybe there can be something done to prevent so many entries in that file? Or maybe warn the user that the dialog is about to load more than 1000 entries so that the user does not think it is a deadlock?
Comment 5 David Edmundson 2021-10-09 23:27:06 UTC
Can you include one line from it?
And output of "mount" when docker has a drive open. Maybe we can blacklist those entries.
Comment 6 minsens 2021-10-10 09:33:47 UTC
Here are some sample entries from ~/.config/kded_device_automounterrc:

[Devices][/org/kde/fstab/overlay/var/lib/docker/overlay2/05db075ae7e2f84931e0db4f350d20dc24192aea0e6fad77b3bcc042636733f8/merged]
EverMounted=true
LastSeenMounted=true

[Devices][/org/kde/fstab/overlay/var/lib/docker/overlay2/05f3b64c60b5bd92391ccabb189d7f97e571ea9856e230980b7859106e6c4af4-init/merged]
EverMounted=true
LastSeenMounted=true

[Devices][/org/kde/fstab/overlay/var/lib/docker/overlay2/05f3b64c60b5bd92391ccabb189d7f97e571ea9856e230980b7859106e6c4af4/merged]
EverMounted=true
LastSeenMounted=true

[Devices][/org/kde/fstab/overlay/var/lib/docker/overlay2/05f4c3ae55b738eb2bfd07f6abab5b16d0a84b1b6177a06cdb1b46318999adbf-init/merged]
EverMounted=true
ForceAttachAutomount=false
ForceLoginAutomount=false
LastSeenMounted=true

[Devices][/org/kde/fstab/overlay/var/lib/docker/overlay2/opaque-bug-check187327955/merged]
EverMounted=true
LastSeenMounted=true

Here the mount output:
$ mount
[...]
overlay on /var/lib/docker/overlay2/1ad791d79d996ae5def05a54c62e18b95707887f6d5bf7666b3a5419ed75690b/merged type overlay (rw,relatime,lowerdir=/var/lib/docker/overlay2/l/IIF2X3X5HXAAYXBA3KY7XMORN5:/var/lib/docker/overlay2/l/MK75CYNAXTVFC33OFEESMRWOMJ:/var/lib/docker/overlay2/l/N4A4R6JRJHBM55LY7OBJ45REQY:/var/lib/docker/overlay2/l/7UW5IVHAL7I6DNNAJX6A2ATYL5,upperdir=/var/lib/docker/overlay2/1ad791d79d996ae5def05a54c62e18b95707887f6d5bf7666b3a5419ed75690b/diff,workdir=/var/lib/docker/overlay2/1ad791d79d996ae5def05a54c62e18b95707887f6d5bf7666b3a5419ed75690b/work,xino=off)
shm on /var/lib/docker/containers/e08aa4cf373af883dae1b828b54c01dda17aba375ce98ddca383a829f55cea0d/mounts/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
nsfs on /run/docker/netns/9bf7b0e054cf type nsfs (rw)

Note that the mount output does not correspond to the sample entries above.

I think blacklisting something here might be a good idea. However, I think the most general solution would be to somehow handle the case if the ~/.config/kded_device_automounterrc file has gotten very large for whatever reason.
Comment 7 minsens 2021-10-10 10:35:27 UTC
To complicate things: I just reinstalled docker because of unrelated reasons and now cannot reproduce the generation of these entries in either mount or ~/.config/kded_device_automounterrc so make of that what you will.

In any case, I think handling the bloating of ~/.config/kded_device_automounterrc would be the better approach. The original poster of this issue might not have done anything with docker, but their webcam might have generated loads of entries for some reason.
Comment 8 Philipp A. 2022-06-21 15:11:10 UTC
I ran into this as well: A freeze because of a huge number of entries.

I think the problem is that it creates config entries for everything it sees, but that’s what ~/.cache is for.

Config entries should only be generated on user interaction.
Comment 9 statikeffeck 2022-09-14 15:15:29 UTC
(In reply to Philipp A. from comment #8)
> I ran into this as well: A freeze because of a huge number of entries.
> 
> I think the problem is that it creates config entries for everything it
> sees, but that’s what ~/.cache is for.
> 
> Config entries should only be generated on user interaction.

I also experienced this bug, and I heavily used docker for work. Sure enough, checking the `~/.config/kded_device_automounterrc` file I see 18000 lines, mostly those docker overlay entries which I don't care about. Would be great to turn these off somehow, but for now I can periodically trim it if I can remember.

After trimming out all those extra lines, the panel works in system settings.
Comment 10 gudvinr+kde 2024-03-15 10:06:57 UTC
Jesus fuck. Apparently it's still happening. After I was unable to open auto-mount menu, hours of frustrating searches led me to this issue.

Not only it shouldn't add those entries, fixing issue must also drop existing entries spammed over time.

Operating System: Arch Linux 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.6.21-1-lts (64-bit)
Graphics Platform: X11