Bug 497299 - Loop Mounts crash Plasmashell in Solid::StorageAccess::filePath
Summary: Loop Mounts crash Plasmashell in Solid::StorageAccess::filePath
Status: RESOLVED FIXED
Alias: None
Product: frameworks-solid
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.8.0
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords: drkonqi
: 497335 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-12-10 21:58 UTC by Parag W
Modified: 2024-12-14 09:39 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.9.1
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/105369/events/4631c5966e304e4bbd5f01c619fc912c/


Attachments
New crash information added by DrKonqi (182.51 KB, text/plain)
2024-12-10 21:58 UTC, Parag W
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Parag W 2024-12-10 21:58:24 UTC
Application: plasmashell (6.2.80)
 (Compiled from sources)
ApplicationNotResponding [ANR]: false
Qt Version: 6.8.1
Frameworks Version: 6.10.0
Operating System: Linux 6.12.4-arch1-1 x86_64
Windowing System: Wayland
Distribution: "Arch Linux"
DrKonqi: 6.1.90 [CoredumpBackend]

-- Information about the crash:
losetup --partscan /dev/loop1 chromeos_15393.58.0_reven_recovery_stable-channel_mp-v2.bin

The boot a Virt Manager VM from it - every time VM starts and stops Plasma will crash.

The crash can be reproduced every time.

-- Backtrace (Reduced):
#6  Solid::StorageAccess::filePath (this=0x0) at /data/kde/src/solid/src/solid/devices/frontend/storageaccess.cpp:59
#7  0x0000748446e41251 in Solid::Device::storageAccessFromPath (path=...) at /data/kde/src/solid/src/solid/devices/frontend/devicemanager.cpp:164
#8  0x000074843d761de6 in KFilePlacesItem::onAccessibilityChanged (this=this@entry=0x748268076380, isAccessible=<optimized out>) at /usr/src/debug/kio/kio-6.8.0/src/filewidgets/kfileplacesitem.cpp:604
#9  0x000074843d766f86 in KFilePlacesItem::updateDeviceInfo (this=<optimized out>, udi=...) at /usr/src/debug/kio/kio-6.8.0/src/filewidgets/kfileplacesitem.cpp:560
#10 KFilePlacesItem::KFilePlacesItem (this=<optimized out>, manager=<optimized out>, address=..., udi=..., parent=<optimized out>, this=<optimized out>, manager=<optimized out>, address=<optimized out>, udi=<optimized out>, parent=<optimized out>) at /usr/src/debug/kio/kio-6.8.0/src/filewidgets/kfileplacesitem.cpp:49


Reported using DrKonqi
Comment 1 Parag W 2024-12-10 21:58:26 UTC
Created attachment 176502 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Nate Graham 2024-12-10 22:50:31 UTC
Looks largely the same as the backtrace from Bug 492578, but that was supposed to have been fixed in Frameworks 6.8. Since you've got something newer than that, and we don't have ten trillion new bug reports about this from other users, it seems likely that your issue is related but slightly different.
Comment 3 Parag W 2024-12-11 15:08:42 UTC
Something that caught my eye in the trace I uploaded is that the debug/source information for crashing function Solid::StorageAccess::d_func is correctly pointing to my local KDE compilation path, however down later for  KFilePlacesItem::onAccessibilityChanged it change to pointing to debuginfod downloaded system package debuginfo - the source refers to  /usr/src/debug/kio/kio-6.8.0/src/filewidgets/kfileplacesitem.cpp:560 not /data/kde/src/... as it should. Not sure if it's just a DrKonqi / debugger paths issue or am I actually somehow loading system KIO libraries which wouldn't be all that great? LDD on plasmashell shows KIO linked from my $HOME/kde/usr/lib  installation path so that's further perplexing.

Thread 1 (Thread 0x74837cff96c0 (LWP 8863)):
[KCrash Handler]
#5  0x0000748446e49755 in Solid::StorageAccess::d_func (this=<optimized out>) at /data/kde/src/solid/src/solid/devices/frontend/storageaccess.h:37
#6  Solid::StorageAccess::filePath (this=0x0) at /data/kde/src/solid/src/solid/devices/frontend/storageaccess.cpp:59
#7  0x0000748446e41251 in Solid::Device::storageAccessFromPath (path=...) at /data/kde/src/solid/src/solid/devices/frontend/devicemanager.cpp:164
#8  0x000074843d761de6 in KFilePlacesItem::onAccessibilityChanged (this=this@entry=0x748268076380, isAccessible=<optimized out>) at /usr/src/debug/kio/kio-6.8.0/src/filewidgets/kfileplacesitem.cpp:604
#9  0x000074843d766f86 in KFilePlacesItem::updateDeviceInfo (this=<optimized out>, udi=...) at /usr/src/debug/kio/kio-6.8.0/src/filewidgets/kfileplacesitem.cpp:560
Comment 4 TraceyC 2024-12-11 18:10:37 UTC
Searchable backtrace

Thread 1 (Thread 0x74837cff96c0 (LWP 8863)):
[KCrash Handler]
#5  0x0000748446e49755 in Solid::StorageAccess::d_func (this=<optimized out>) at /data/kde/src/solid/src/solid/devices/frontend/storageaccess.h:37
#6  Solid::StorageAccess::filePath (this=0x0) at /data/kde/src/solid/src/solid/devices/frontend/storageaccess.cpp:59
#7  0x0000748446e41251 in Solid::Device::storageAccessFromPath (path=...) at /data/kde/src/solid/src/solid/devices/frontend/devicemanager.cpp:164
#8  0x000074843d761de6 in KFilePlacesItem::onAccessibilityChanged (this=this@entry=0x748268076380, isAccessible=<optimized out>) at /usr/src/debug/kio/kio-6.8.0/src/filewidgets/kfileplacesitem.cpp:604
#9  0x000074843d766f86 in KFilePlacesItem::updateDeviceInfo (this=<optimized out>, udi=...) at /usr/src/debug/kio/kio-6.8.0/src/filewidgets/kfileplacesitem.cpp:560
#10 KFilePlacesItem::KFilePlacesItem (this=<optimized out>, manager=<optimized out>, address=..., udi=..., parent=<optimized out>, this=<optimized out>, manager=<optimized out>, address=<optimized out>, udi=<optimized out>, parent=<optimized out>) at /usr/src/debug/kio/kio-6.8.0/src/filewidgets/kfileplacesitem.cpp:49
#11 0x000074843d76bed0 in KFilePlacesModelPrivate::loadBookmarkList (this=<optimized out>) at /usr/src/debug/kio/kio-6.8.0/src/filewidgets/kfileplacesmodel.cpp:867
#12 KFilePlacesModelPrivate::reloadBookmarks (this=<optimized out>) at /usr/src/debug/kio/kio-6.8.0/src/filewidgets/kfileplacesmodel.cpp:764
#13 0x0000748443db1b29 in QtPrivate::QSlotObjectBase::call (this=0x748268011120, r=0x748268001540, a=0x74837cff7e60, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:486
#14 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4124
#15 0x0000748446e36f95 in Solid::DeviceNotifier::deviceRemoved (this=<optimized out>, _t1=<optimized out>) at /fastdata/compiles/kde/build/solid/src/solid/KF6Solid_autogen/include/moc_devicenotifier.cpp:164
#16 0x0000748443db1b29 in QtPrivate::QSlotObjectBase::call (this=0x748268008a40, r=0x74826800b640, a=0x74837cff7f60, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:486
#17 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4124
#18 0x0000748446e4bd35 in Solid::Ifaces::DeviceManager::deviceRemoved (this=<optimized out>, _t1=<optimized out>) at /fastdata/compiles/kde/build/solid/src/solid/KF6Solid_autogen/include/moc_devicemanager.cpp:164
#19 0x0000748446e73554 in Solid::Backends::UDisks2::Manager::slotInterfacesRemoved (this=<optimized out>, object_path=<optimized out>, interfaces=<optimized out>) at /data/kde/src/solid/src/solid/devices/backends/udisks2/udisksmanager.cpp:241
#20 Solid::Backends::UDisks2::Manager::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /fastdata/compiles/kde/build/solid/src/solid/KF6Solid_autogen/include/moc_udisksmanager.cpp:113
#21 0x0000748443db1d7a in doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4136
#22 0x0000748446e866b9 in OrgFreedesktopDBusObjectManagerInterface::InterfacesRemoved (this=<optimized out>, _t1=<optimized out>, _t2=<optimized out>) at /fastdata/compiles/kde/build/solid/src/solid/KF6Solid_autogen/include/moc_manager.cpp:203
#23 OrgFreedesktopDBusObjectManagerInterface::qt_static_metacall (_o=_o@entry=0x7482680083b8, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=1, _a=_a@entry=0x74837cff83c8) at /fastdata/compiles/kde/build/solid/src/solid/KF6Solid_autogen/include/moc_manager.cpp:115
#24 0x0000748446e89c83 in OrgFreedesktopDBusObjectManagerInterface::qt_metacall (this=0x7482680083b8, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x74837cff83c8) at /fastdata/compiles/kde/build/solid/src/solid/KF6Solid_autogen/include/moc_manager.cpp:181
#25 0x0000748444dbd8a2 in QDBusConnectionPrivate::deliverCall (this=0x74843800e040, object=0x7482680083b8, msg=..., metaTypes=<optimized out>, slotIdx=6) at /usr/src/debug/qt6-base/qtbase/src/dbus/qdbusintegrator.cpp:1008
#26 0x0000748443da2d9a in QObject::event (this=0x7482680083b8, e=0x7484380c5940) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:1419
#27 0x00007484462fe78a in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x7482680083b8, e=0x7484380c5940) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3296
#28 0x0000748443d57ac8 in QCoreApplication::notifyInternal2 (receiver=0x7482680083b8, event=event@entry=0x7484380c5940) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1168
#29 0x0000748443d58555 in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1612
#30 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5e8578cb7ac0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1968
#31 0x0000748443fc4f7c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1800
#32 postEventSourceDispatch (s=0x748268000f50) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246
#33 0x0000748442ffa559 in g_main_dispatch (context=0x748268000c90) at ../glib/glib/gmain.c:3357
#34 0x000074844305d157 in g_main_context_dispatch_unlocked (context=0x748268000c90) at ../glib/glib/gmain.c:4208
#35 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x748268000c90, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4273
#36 0x0000748442ff9a55 in g_main_context_iteration (context=0x748268000c90, may_block=1) at ../glib/glib/gmain.c:4338
#37 0x0000748443fc22fd in QEventDispatcherGlib::processEvents (this=0x748268000ba0, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
#38 0x0000748443d61ee6 in QEventLoop::processEvents (this=0x74837cff8ab0, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:103
#39 QEventLoop::exec (this=0x74837cff8ab0, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:194
#40 0x0000748443e58082 in QThread::exec (this=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread.cpp:621
#41 QThread::run (this=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread.cpp:742
#42 0x0000748443ed90cd in operator() (__closure=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:354
#43 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:290
#44 QThreadPrivate::start (arg=0x5e85772fa060) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:318
#45 0x00007484436a339d in start_thread (arg=<optimized out>) at pthread_create.c:447
#46 0x000074844372849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
Comment 5 Nate Graham 2024-12-11 21:10:31 UTC
*** Bug 497335 has been marked as a duplicate of this bug. ***
Comment 6 Bug Janitor Service 2024-12-11 22:15:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/solid/-/merge_requests/193
Comment 7 Nicolas Fella 2024-12-12 09:06:20 UTC
Git commit 2f8825b489ecc69bed67a49abdcb643d1fa42b4a by Nicolas Fella.
Committed on 11/12/2024 at 22:07.
Pushed by nicolasfella into branch 'master'.

Add null check for StorageAccess interface in storageAccessFromPath

In slotInterfacesRemoved we do a remove+add cycle

During that cycle the backend object is null, so querying the StorageAccess
interface will return null.

This means that when something calls storageAccessFromPath in reaction to
the removed signal we will get a null StorageAccess.

The overall design is a bit shaky here, but we can handle it more gracefully
by checking the result for null
Related: bug 492578

SENTRY: PLASMA-WORKSPACE-11Q1

SENTRY: KDECONNECT-KDE-BK

SENTRY: DOLPHIN-320

SENTRY: KDED-7M

SENTRY: FALLTHROUGH-62S

SENTRY: KATE-Y3

SENTRY: KDENLIVE-VR

SENTRY: XDG-DESKTOP-PORTAL-KDE-3R

SENTRY: KDEVELOP-93

SENTRY: KRUNNER-GD

SENTRY: PLASMA-WORKSPACE-1986

SENTRY: ELISA-9H

M  +5    -0    src/solid/devices/frontend/devicemanager.cpp

https://invent.kde.org/frameworks/solid/-/commit/2f8825b489ecc69bed67a49abdcb643d1fa42b4a
Comment 8 Nicolas Fella 2024-12-12 09:08:15 UTC
Git commit 8bcf33708d2ee6d3756918df130df50fbc08a500 by Nicolas Fella.
Committed on 12/12/2024 at 09:07.
Pushed by nicolasfella into branch 'kf5'.

Add null check for StorageAccess interface in storageAccessFromPath

In slotInterfacesRemoved we do a remove+add cycle

During that cycle the backend object is null, so querying the StorageAccess
interface will return null.

This means that when something calls storageAccessFromPath in reaction to
the removed signal we will get a null StorageAccess.

The overall design is a bit shaky here, but we can handle it more gracefully
by checking the result for null
Related: bug 492578

SENTRY: PLASMA-WORKSPACE-11Q1

SENTRY: KDECONNECT-KDE-BK

SENTRY: DOLPHIN-320

SENTRY: KDED-7M

SENTRY: FALLTHROUGH-62S

SENTRY: KATE-Y3

SENTRY: KDENLIVE-VR

SENTRY: XDG-DESKTOP-PORTAL-KDE-3R

SENTRY: KDEVELOP-93

SENTRY: KRUNNER-GD

SENTRY: PLASMA-WORKSPACE-1986

SENTRY: ELISA-9H
(cherry picked from commit 2f8825b489ecc69bed67a49abdcb643d1fa42b4a)

M  +5    -0    src/solid/devices/frontend/devicemanager.cpp

https://invent.kde.org/frameworks/solid/-/commit/8bcf33708d2ee6d3756918df130df50fbc08a500
Comment 9 Nicolas Fella 2024-12-14 09:26:54 UTC
Git commit 11a21dfad782c3862f6a3fba9bcf4fd5c5005777 by Nicolas Fella.
Committed on 13/12/2024 at 16:15.
Pushed by nicolasfella into branch 'Frameworks/6.9'.

Add null check for StorageAccess interface in storageAccessFromPath

In slotInterfacesRemoved we do a remove+add cycle

During that cycle the backend object is null, so querying the StorageAccess
interface will return null.

This means that when something calls storageAccessFromPath in reaction to
the removed signal we will get a null StorageAccess.

The overall design is a bit shaky here, but we can handle it more gracefully
by checking the result for null
Related: bug 492578

SENTRY: PLASMA-WORKSPACE-11Q1

SENTRY: KDECONNECT-KDE-BK

SENTRY: DOLPHIN-320

SENTRY: KDED-7M

SENTRY: FALLTHROUGH-62S

SENTRY: KATE-Y3

SENTRY: KDENLIVE-VR

SENTRY: XDG-DESKTOP-PORTAL-KDE-3R

SENTRY: KDEVELOP-93

SENTRY: KRUNNER-GD

SENTRY: PLASMA-WORKSPACE-1986

SENTRY: ELISA-9H
(cherry picked from commit 2f8825b489ecc69bed67a49abdcb643d1fa42b4a)

M  +5    -0    src/solid/devices/frontend/devicemanager.cpp

https://invent.kde.org/frameworks/solid/-/commit/11a21dfad782c3862f6a3fba9bcf4fd5c5005777