Bug 482937

Summary: Dolphin crashes when ejecting unmounted cdrom via physical button
Product: [Applications] dolphin Reporter: Alexandre Gauthier <alex>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: crash CC: kfm-devel
Priority: NOR Keywords: drkonqi, qt6
Version: 24.02.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Alexandre Gauthier 2024-03-09 00:38:48 UTC
Application: dolphin (24.02.0)

Qt Version: 6.6.2
Frameworks Version: 6.0.0
Operating System: Linux 6.5.0-25-generic x86_64
Windowing System: Wayland
Distribution: KDE neon 6.0
DrKonqi: 6.0.0 [KCrashBackend]

-- Information about the crash:
I was dumping old CDs off of a usb dvd drive to images, for archival purposes.
After finishing the raw dump via command line tools (which just reads the block device), and then copying the resultant image files to storage via Dolphin over cifs kio, I briefly checked that the media had not been mounted (it hadn't) and pressed the physical eject button on the drive to get my disc back.

Dolphin immediately crashed with the following stack trace.

I can reproduce this somewhat reliably, as it does not systematically occurs, but reoccurs the majority of the time.
I in fact did it just now by reinserting the physical media, starting dolphin, waiting for everything to settle (not mounting anything) and just hitting the eject button.

If it helps, since Dolphin helpfully reads the disk labels and presents them in the side bar for easy mounting, the media was an Apple HFS disk.

I am unsure of how much this helps, but here is the disk layout and properties:


--- /dev/sr0
Block device, size 647.7 MiB (679211008 bytes)
CD-ROM, 1 track, CDDB disk ID 02114501
Track 1: Data track, 647.7 MiB (679211008 bytes)
  Apple partition map, 3 entries
  Partition 1: 31.50 KiB (32256 bytes, 63 sectors from 1)
    Type "Apple_partition_map"
  Partition 2: 647.4 MiB (678871040 bytes, 1325920 sectors from 64)
    Type "Apple_HFS"
    HFS Plus file system
      Volume size 647.4 MiB (678871040 bytes, 165740 blocks of 4 KiB)
      Volume name "Microsoft Office 2004"
  Partition 3: 8 KiB (8192 bytes, 16 sectors from 1325984)
    Type "Apple_Free"
    Blank disk/medium

The crash can be reproduced sometimes.

-- Backtrace:
Application: Dolphin (dolphin), signal: Aborted

[KCrash Handler]
#4  __pthread_kill_implementation (no_tid=0, signo=6, threadid=137239995239104) at ./nptl/pthread_kill.c:44
#5  __pthread_kill_internal (signo=6, threadid=137239995239104) at ./nptl/pthread_kill.c:78
#6  __GI___pthread_kill (threadid=137239995239104, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#7  0x00007cd1b1e42476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#8  0x00007cd1b1e287f3 in __GI_abort () at ./stdlib/abort.c:79
#9  0x00007cd1b2adb017 in qAbort () at ./src/corelib/global/qglobal.cpp:161
#10 0x00007cd1b2ad64e5 in qt_message_fatal<QString&> (message=..., context=...) at ./src/corelib/global/qlogging.cpp:2003
#11 qt_message(QtMsgType, const QMessageLogContext &, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, context=..., msg=<optimized out>, ap=ap@entry=0x7fff43e57e40) at ./src/corelib/global/qlogging.cpp:378
#12 0x00007cd1b2adba43 in QMessageLogger::fatal (this=<optimized out>, msg=<optimized out>) at ./src/corelib/global/qlogging.cpp:901
#13 0x00007cd1b2aa9c94 in qt_assert (assertion=assertion@entry=0x7cd1b49fcbd8 "dev->backendObject() != nullptr", file=file@entry=0x7cd1b49fcba8 "./src/solid/devices/frontend/devicemanager.cpp", line=line@entry=234) at ./src/corelib/global/qassert.cpp:68
#14 0x00007cd1b49746dd in Solid::DeviceManagerPrivate::_k_deviceRemoved (udi=..., this=<optimized out>) at ./src/solid/devices/frontend/devicemanager.cpp:234
#15 Solid::DeviceManagerPrivate::qt_static_metacall (_o=0x622d3f223c90, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./obj-x86_64-linux-gnu/src/solid/KF6Solid_autogen/include/moc_devicemanager_p.cpp:139
#16 0x00007cd1b2a2baab in doActivate<false> (sender=0x622d3f20ac20, signal_index=4, argv=0x7fff43e580f0) at ./src/corelib/kernel/qobject.cpp:4051
#17 0x00007cd1b498eb99 in Solid::Ifaces::DeviceManager::deviceRemoved (this=<optimized out>, _t1=...) at ./obj-x86_64-linux-gnu/src/solid/KF6Solid_autogen/include/moc_devicemanager.cpp:189
#18 0x00007cd1b49b9855 in Solid::Backends::UDisks2::Manager::slotInterfacesRemoved (interfaces=..., object_path=..., this=<optimized out>) at ./src/solid/devices/backends/udisks2/udisksmanager.cpp:249
#19 Solid::Backends::UDisks2::Manager::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./obj-x86_64-linux-gnu/src/solid/KF6Solid_autogen/include/moc_udisksmanager.cpp:161
#20 0x00007cd1b2a2baab in doActivate<false> (sender=0x622d3f20ac38, signal_index=4, argv=0x7fff43e583a0) at ./src/corelib/kernel/qobject.cpp:4051
#21 0x00007cd1b49d1371 in OrgFreedesktopDBusObjectManagerInterface::InterfacesRemoved (_t2=..., _t1=..., this=<optimized out>) at ./obj-x86_64-linux-gnu/src/solid/KF6Solid_autogen/include/moc_manager.cpp:245
#22 OrgFreedesktopDBusObjectManagerInterface::qt_static_metacall (_o=0x622d3f20ac38, _c=<optimized out>, _id=<optimized out>, _a=0x7fff43e58548) at ./obj-x86_64-linux-gnu/src/solid/KF6Solid_autogen/include/moc_manager.cpp:160
#23 0x00007cd1b49d15f3 in OrgFreedesktopDBusObjectManagerInterface::qt_metacall (this=0x622d3f20ac38, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fff43e58548) at ./obj-x86_64-linux-gnu/src/solid/KF6Solid_autogen/include/moc_manager.cpp:224
#24 0x00007cd1b3fe7a5f in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QList<QMetaType> const&, int) [clone .constprop.0] (this=0x7cd1a800ddb0, object=0x622d3f20ac38, msg=..., metaTypes=..., slotIdx=7) at ./src/dbus/qdbusintegrator.cpp:977
#25 0x00007cd1b29c9572 in QObject::event (this=0x622d3f20ac38, e=0x7cd1a804e380) at ./src/corelib/kernel/qobject.cpp:1437
#26 0x00007cd1b3bf40eb in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x622d3f20ac38, e=0x7cd1a804e380) at ./src/widgets/kernel/qapplication.cpp:3296
#27 0x00007cd1b2a63e18 in QCoreApplication::notifyInternal2 (receiver=0x622d3f20ac38, event=event@entry=0x7cd1a804e380) at ./src/corelib/kernel/qcoreapplication.cpp:1121
#28 0x00007cd1b2a63e5d in QCoreApplication::sendEvent (receiver=<optimized out>, event=event@entry=0x7cd1a804e380) at ./src/corelib/kernel/qcoreapplication.cpp:1539
#29 0x00007cd1b2a64530 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x622d3f06fd60) at ./src/corelib/kernel/qcoreapplication.cpp:1901
#30 0x00007cd1b28632f7 in postEventSourceDispatch (s=0x622d3f0f4f60) at ./src/corelib/kernel/qeventdispatcher_glib.cpp:243
#31 0x00007cd1b0e2cd3b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007cd1b0e82258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007cd1b0e2a3e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007cd1b285e1f0 in QEventDispatcherGlib::processEvents (this=0x622d3f08ba80, flags=...) at ./src/corelib/kernel/qeventdispatcher_glib.cpp:393
#35 0x00007cd1b2a6604b in QEventLoop::exec (this=this@entry=0x7fff43e58b10, flags=..., flags@entry=...) at ./src/corelib/global/qflags.h:34
#36 0x00007cd1b2a67c7c in QCoreApplication::exec () at ./src/corelib/global/qflags.h:74
#37 0x00007cd1b2ee9a20 in QGuiApplication::exec () at ./src/gui/kernel/qguiapplication.cpp:1925
#38 0x00007cd1b3bf1689 in QApplication::exec () at ./src/widgets/kernel/qapplication.cpp:2574
#39 0x0000622d3dcb47c3 in main (argc=<optimized out>, argv=<optimized out>) at ./src/main.cpp:253
[Inferior 1 (process 3794) detached]

Reported using DrKonqi