Bug 476760 - Plasmashell crashes in Solid DataEngine (Plasma::DataEngine::sourceRemoved) when shutting down after unplugging one drive from a two-drive Btrfs RAID
Summary: Plasmashell crashes in Solid DataEngine (Plasma::DataEngine::sourceRemoved) w...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: DataEngines (show other bugs)
Version: master
Platform: Debian stable Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-09 16:13 UTC by d7ghrrkcz
Modified: 2024-08-26 22:11 UTC (History)
1 user (show)

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


Attachments
1. kwin_x11 crash (32.46 KB, text/plain)
2023-11-09 16:14 UTC, d7ghrrkcz
Details
2. plasmashell crash (115.97 KB, text/plain)
2023-11-09 16:14 UTC, d7ghrrkcz
Details
3. another plasmashell crash 44 seconds later (22.66 KB, text/plain)
2023-11-09 16:15 UTC, d7ghrrkcz
Details
4. Another plasmashell crash 1 sec later (22.93 KB, text/plain)
2023-11-09 16:16 UTC, d7ghrrkcz
Details
5. another plasmashell crash 20 minutes later (38.48 KB, text/plain)
2023-11-09 16:18 UTC, d7ghrrkcz
Details
6. Part from dmesg (with comments) (3.71 KB, text/plain)
2023-11-09 16:21 UTC, d7ghrrkcz
Details
7. journalctl (1.45 MB, text/plain)
2023-11-09 17:41 UTC, d7ghrrkcz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description d7ghrrkcz 2023-11-09 16:13:47 UTC
SUMMARY
***

Crash of kwin_x11 and plasmashell when /home have brief timeout

STEPS TO REPRODUCE
1. Install Debian Stable with /home partition mounted as Btrfs Raid1 on two physical disks
2. Unplug one drive from Btrfs. Filesystem will hang briefly, will output timeout errors in Dmesg
3. After brief pause, /home will continue to work in Btrfs Raid1 degraded mode. It's Raid1, so work on the desktop can continue no problem, until I end my session and shutdown the computer.
4. However, plasmashell and kwin-x11 will crash when this happens.

OBSERVED RESULT
Crash of kwin_x11 and plasmashell (signal 11 SEGV and signal 7 BUS)

EXPECTED RESULT
No crashes, other desktop apps can survive brief inaccessibility of /home partition, plasmashell should too.

SOFTWARE/OS VERSIONS

Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-13-amd64 (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: AMD Radeon RX 6800 XT
Manufacturer: ASUS

ADDITIONAL INFORMATION
attachments in separate messages below.
Comment 1 d7ghrrkcz 2023-11-09 16:14:26 UTC
Created attachment 162978 [details]
1. kwin_x11 crash
Comment 2 d7ghrrkcz 2023-11-09 16:14:41 UTC
Created attachment 162979 [details]
2. plasmashell crash
Comment 3 d7ghrrkcz 2023-11-09 16:15:37 UTC
Created attachment 162980 [details]
3. another plasmashell crash 44 seconds later
Comment 4 d7ghrrkcz 2023-11-09 16:16:45 UTC
Created attachment 162981 [details]
4. Another plasmashell crash 1 sec later
Comment 5 d7ghrrkcz 2023-11-09 16:18:22 UTC
Created attachment 162982 [details]
5. another plasmashell crash 20 minutes later
Comment 6 d7ghrrkcz 2023-11-09 16:21:19 UTC
Created attachment 162983 [details]
6. Part from dmesg (with comments)
Comment 7 d7ghrrkcz 2023-11-09 17:41:47 UTC
Created attachment 162988 [details]
7. journalctl

Result of:
sudo journalctl -b -1
I cut lines before the crash, but full log from crash to the end, when I shutdown my computer to fix the downed hard drive.
Comment 8 Nate Graham 2023-11-09 20:03:43 UTC
The Plasma and KWin crashes are different; please submit a new bug report for the KWin crashes. Details of the Plasma crash:

#0  __GI___pthread_sigmask (how=1, newmask=<optimized out>, oldmask=0x0) at ./nptl/pthread_sigmask.c:43
#1  0x00007fc6f165b1b9 in __GI___sigprocmask (how=<optimized out>, set=<optimized out>, oset=<optimized out>) at ../sysdeps/unix/sysv/linux/sigprocmask.c:25
#2  0x00007fc6f3c29e9b in KCrash::setCrashHandler(void (*)(int)) () from /lib/x86_64-linux-gnu/libKF5Crash.so.5
#3  0x00007fc6f3c2ab3e in KCrash::defaultCrashHandler(int) () from /lib/x86_64-linux-gnu/libKF5Crash.so.5
#4  <signal handler called>
#5  QSpecialInteger<QLittleEndianStorageType<unsigned int> >::operator unsigned int (this=0x7fc64041aa4c) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qendian.h:290
#6  QV4::CppStackFrame::setupJSFrame (function=..., newTarget=..., thisObject=..., scope=0x7fc6c3657880, stackSpace=0x7fc6d83c1510, this=0x7ffe6c661cb0)
    at jsruntime/qv4stackframe_p.h:119
#7  QV4::Function::call (this=this@entry=0x55b9bf9638c0, thisObject=0x7fc6d83c14f0, argv=argv@entry=0x7fc6d83c1508, argc=1, context=<optimized out>)
    at jsruntime/qv4function.cpp:62
#8  0x00007fc6f30e144d in QQmlJavaScriptExpression::evaluate (this=this@entry=0x55b9bf5d1f00, callData=callData@entry=0x7fc6d83c14d8, isUndefined=isUndefined@entry=0x0)
    at qml/qqmljavascriptexpression.cpp:212
#9  0x00007fc6f3092baf in QQmlBoundSignalExpression::evaluate (this=<optimized out>, a=a@entry=0x7ffe6c6638d0)
    at ../../include/QtQml/5.15.8/QtQml/private/../../../../../src/qml/jsruntime/qv4jscall_p.h:95
#10 0x00007fc6f30942f8 in QQmlBoundSignal_callback (e=0x55b9be8b6380, a=0x7ffe6c6638d0)
    at ../../include/QtQml/5.15.8/QtQml/private/../../../../../src/qml/qml/qqmlboundsignalexpressionpointer_p.h:69
#11 0x00007fc6f30c677f in QQmlNotifier::emitNotify (endpoint=<optimized out>, a=0x7ffe6c6638d0) at qml/qqmlnotifier.cpp:104
#12 0x00007fc6f1ae8a8d in doActivate<false> (sender=0x55b9bfcaa340, signal_index=5, argv=0x7ffe6c6638d0) at kernel/qobject.cpp:3815
#13 0x00007fc6f1ae21ef in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7fc6dcd79ba0 <Plasma::DataSource::staticMetaObject>, 
    local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffe6c6638d0) at kernel/qobject.cpp:3983
#14 0x00007fc6dcd35535 in Plasma::DataSource::sourceRemoved (this=<optimized out>, _t1=...)
    at ./obj-x86_64-linux-gnu/src/declarativeimports/core/corebindingsplugin_autogen/EWIEGA46WW/moc_datasource.cpp:426
#15 0x00007fc6f1ae8f4f in QtPrivate::QSlotObjectBase::call (a=0x7ffe6c6639c0, r=0x55b9bfcaa340, this=0x55b9be8b6780)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#16 doActivate<false> (sender=0x55b9bf95ae40, signal_index=4, argv=0x7ffe6c6639c0) at kernel/qobject.cpp:3923
#17 0x00007fc6f3e03345 in Plasma::DataEngine::sourceRemoved(QString const&) () from /lib/x86_64-linux-gnu/libKF5Plasma.so.5
#18 0x00007fc6f3e05642 in Plasma::DataEngine::removeSource(QString const&) () from /lib/x86_64-linux-gnu/libKF5Plasma.so.5
#19 0x00007fc6f1ae8f4f in QtPrivate::QSlotObjectBase::call (a=0x7ffe6c663ae0, r=0x55b9bf95ae40, this=0x55b9bf4d40d0)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#20 doActivate<false> (sender=0x55b9be626c50, signal_index=4, argv=0x7ffe6c663ae0) at kernel/qobject.cpp:3923
#21 0x00007fc6f1ae21ef in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7fc6f3d0bd20 <Solid::DeviceNotifier::staticMetaObject>, 
    local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffe6c663ae0) at kernel/qobject.cpp:3983
#22 0x00007fc6f3c704e5 in Solid::DeviceNotifier::deviceRemoved (this=<optimized out>, _t1=...)
    at ./obj-x86_64-linux-gnu/src/solid/KF5Solid_autogen/include/moc_devicenotifier.cpp:151
#23 0x00007fc6f1ae8f7c in doActivate<false> (sender=0x55b9bf5ca620, signal_index=4, argv=0x7ffe6c663bd0) at kernel/qobject.cpp:3935
#24 0x00007fc6f1ae21ef in QMetaObject::activate (sender=sender@entry=0x55b9bf5ca620, m=m@entry=0x7fc6f3d0b500 <Solid::Ifaces::DeviceManager::staticMetaObject>, 
    local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffe6c663bd0) at kernel/qobject.cpp:3983
#25 0x00007fc6f3c5dea5 in Solid::Ifaces::DeviceManager::deviceRemoved (this=this@entry=0x55b9bf5ca620, _t1=...)
    at ./obj-x86_64-linux-gnu/src/solid/KF5Solid_autogen/3PYKXLVNWF/moc_devicemanager.cpp:151
#26 0x00007fc6f3c9dbce in Solid::Backends::UDisks2::Manager::slotInterfacesRemoved (this=0x55b9bf5ca620, object_path=..., interfaces=...)
    at ./src/solid/devices/backends/udisks2/udisksmanager.cpp:240
#27 0x00007fc6f1ae8f7c in doActivate<false> (sender=0x55b9bf5ca638, signal_index=4, argv=0x7ffe6c663db0) at kernel/qobject.cpp:3935
#28 0x00007fc6f1ae21ef in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7fc6f3d0b9c0 <OrgFreedesktopDBusObjectManagerInterface::staticMetaObject>, 
    local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffe6c663db0) at kernel/qobject.cpp:3983
#29 0x00007fc6f3c64779 in OrgFreedesktopDBusObjectManagerInterface::InterfacesRemoved (_t2=..., _t1=..., this=<optimized out>)
    at ./obj-x86_64-linux-gnu/src/solid/KF5Solid_autogen/W35TJJ7QHF/moc_manager.cpp:189
#30 OrgFreedesktopDBusObjectManagerInterface::qt_static_metacall (_o=_o@entry=0x55b9bf5ca638, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=1, 
    _a=_a@entry=0x7ffe6c663f00) at ./obj-x86_64-linux-gnu/src/solid/KF5Solid_autogen/W35TJJ7QHF/moc_manager.cpp:94
#31 0x00007fc6f3c699d3 in OrgFreedesktopDBusObjectManagerInterface::qt_metacall (this=0x55b9bf5ca638, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7ffe6c663f00)
    at ./obj-x86_64-linux-gnu/src/solid/KF5Solid_autogen/W35TJJ7QHF/moc_manager.cpp:168
#32 0x00007fc6f259261b in QDBusConnectionPrivate::deliverCall (this=<optimized out>, object=<optimized out>, msg=..., metaTypes=..., slotIdx=<optimized out>)
    at ../../include/QtCore/../../src/corelib/tools/qvarlengtharray.h:189
#33 0x00007fc6f1add6f0 in QObject::event (this=0x55b9bf5ca638, e=0x7fc6bc04b520) at kernel/qobject.cpp:1347
#34 0x00007fc6f2762fae in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007fc6f1ab16f8 in QCoreApplication::notifyInternal2 (receiver=0x55b9bf5ca638, event=0x7fc6bc04b520) at kernel/qcoreapplication.cpp:1064
#36 0x00007fc6f1ab18be in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#37 0x00007fc6f1ab4681 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55b9be016f50) at kernel/qcoreapplication.cpp:1821
#38 0x00007fc6f1ab4b08 in QCoreApplication::sendPostedEvents (receiver=<optimized out>, event_type=<optimized out>) at kernel/qcoreapplication.cpp:1680
#39 0x00007fc6f1b0a153 in postEventSourceDispatch (s=0x55b9be17ab90) at kernel/qeventdispatcher_glib.cpp:277
#40 0x00007fc6f04527a9 in g_main_dispatch (context=0x7fc6e4005010) at ../../../glib/gmain.c:3454
#41 g_main_context_dispatch (context=context@entry=0x7fc6e4005010) at ../../../glib/gmain.c:4172
#42 0x00007fc6f0452a38 in g_main_context_iterate (context=context@entry=0x7fc6e4005010, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../../../glib/gmain.c:4248
#43 0x00007fc6f0452acc in g_main_context_iteration (context=0x7fc6e4005010, may_block=1) at ../../../glib/gmain.c:4313
#44 0x00007fc6f1b09836 in QEventDispatcherGlib::processEvents (this=0x55b9be17fab0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#45 0x00007fc6f1ab017b in QEventLoop::exec (this=this@entry=0x7ffe6c664340, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#46 0x00007fc6f1ab82d6 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#47 0x000055b9bd2a3dc3 in ?? ()
#48 0x00007fc6f16461ca in __libc_start_call_main (main=main@entry=0x55b9bd2a2ee0, argc=argc@entry=2, argv=argv@entry=0x7ffe6c664618)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#49 0x00007fc6f1646285 in __libc_start_main_impl (main=0x55b9bd2a2ee0, argc=2, argv=0x7ffe6c664618, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7ffe6c664608) at ../csu/libc-start.c:360
#50 0x000055b9bd2a3ee1 in ?? ()
Comment 9 d7ghrrkcz 2023-11-10 09:54:33 UTC
Thanks for your reply Nate,

New bug has been submitted:
https://bugs.kde.org/show_bug.cgi?id=476783

Hope that helps!
Comment 10 Nate Graham 2024-08-26 22:11:29 UTC
The Solid DataEngine has been removed for Plasma 6.2 and replaced with different code, which means that the issue reported here is no longer possible to experience.