Bug 433218

Summary: Dolphin lags and then crashes when browsing locked device over KDE Connect
Product: [Applications] dolphin Reporter: Alex <alex765>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: akselmo, elvis.angelaccio, kfm-devel, me, postix, tarmoration
Priority: NOR Keywords: wayland
Version: 20.12.2   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=392376
Latest Commit: Version Fixed In:
Attachments: New crash information added by DrKonqi

Description Alex 2021-02-19 04:26:44 UTC
When browsing my phone's files through KDE Connect, Dolphin works fine. The issue occurs when I lock my phone's screen. The option to "Browse this device" is still exposed, but after clicking it, Dolphin opens, locks up, and then crashes.

This is on a Wayland session, Plasma 5.21, Frameworks 5.79.0, Qt 5.15.2

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

[KCrash Handler]
#4  0x00007fd725c0a292 in raise () from /lib64/libc.so.6
#5  0x00007fd725bf38a4 in abort () from /lib64/libc.so.6
#6  0x00007fd723af442d in qt_message_fatal (message=<synthetic pointer>..., context=...) at global/qlogging.cpp:1914
#7  QMessageLogger::fatal (this=<optimized out>, msg=<optimized out>) at global/qlogging.cpp:893
#8  0x00007fd72161aef3 in QtWaylandClient::QWaylandDisplay::checkError() const [clone .cold] () from /lib64/libQt5WaylandClient.so.5
#9  0x00007fd7216296fa in QtWaylandClient::QWaylandDisplay::flushRequests() () from /lib64/libQt5WaylandClient.so.5
#10 0x00007fd723cf24fd in doActivate<false> (sender=0x56373bfeeb80, signal_index=3, argv=0x7ffeac1c4950) at kernel/qobject.cpp:3898
#11 0x00007fd723cec9e7 in QMetaObject::activate (sender=sender@entry=0x56373bfeeb80, m=m@entry=0x7fd723f87440 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffeac1c4950) at kernel/qobject.cpp:3946
#12 0x00007fd723cf4b3a in QSocketNotifier::activated (this=this@entry=0x56373bfeeb80, _t1=..., _t2=<optimized out>, _t3=...) at .moc/moc_qsocketnotifier.cpp:178
#13 0x00007fd723cf52d4 in QSocketNotifier::event (this=0x56373bfeeb80, e=<optimized out>) at kernel/qsocketnotifier.cpp:302
#14 0x00007fd724813e73 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x56373bfeeb80, e=0x7ffeac1c4a70) at kernel/qapplication.cpp:3632
#15 0x00007fd723cc1f48 in QCoreApplication::notifyInternal2 (receiver=0x56373bfeeb80, event=0x7ffeac1c4a70) at kernel/qcoreapplication.cpp:1063
#16 0x00007fd723d0f17f in socketNotifierSourceDispatch (source=0x56373bff1050) at kernel/qeventdispatcher_glib.cpp:107
#17 0x00007fd721c3f0bf in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#18 0x00007fd721c92358 in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#19 0x00007fd721c3c9b3 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#20 0x00007fd723d0e6f8 in QEventDispatcherGlib::processEvents (this=0x56373c0021b0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#21 0x00007fd723cc09b2 in QEventLoop::exec (this=0x7ffeac1c4c80, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#22 0x00007fd724e12f7e in KJob::exec() () from /lib64/libKF5CoreAddons.so.5
#23 0x00007fd725b70707 in DolphinView::calculateItemCount(int&, int&, unsigned long long&) const () from /lib64/libdolphinprivate.so.5
#24 0x00007fd725b66a57 in DolphinView::statusBarText() const () from /lib64/libdolphinprivate.so.5
#25 0x00007fd725e02ede in DolphinViewContainer::updateStatusBar() () from /lib64/libkdeinit5_dolphin.so
#26 0x00007fd723cf24b0 in QtPrivate::QSlotObjectBase::call (a=0x7ffeac1c4f40, r=<optimized out>, this=0x56373c5bc1e0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#27 doActivate<false> (sender=0x56373c5c4d00, signal_index=3, argv=0x7ffeac1c4f40) at kernel/qobject.cpp:3886
#28 0x00007fd723cec9e7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7fd723f87580 <QTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffeac1c4f40) at kernel/qobject.cpp:3946
#29 0x00007fd723cf55ae in QTimer::timeout (this=<optimized out>, _t1=...) at .moc/moc_qtimer.cpp:205
#30 0x00007fd723ce921f in QObject::event (this=0x56373c5c4d00, e=0x7ffeac1c5090) at kernel/qobject.cpp:1336
#31 0x00007fd724813e73 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x56373c5c4d00, e=0x7ffeac1c5090) at kernel/qapplication.cpp:3632
#32 0x00007fd723cc1f48 in QCoreApplication::notifyInternal2 (receiver=0x56373c5c4d00, event=0x7ffeac1c5090) at kernel/qcoreapplication.cpp:1063
#33 0x00007fd723d0d9e3 in QTimerInfoList::activateTimers (this=0x56373bffbf70) at kernel/qtimerinfo_unix.cpp:643
#34 0x00007fd723d0e2ec in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:183
#35 0x00007fd721c3f0bf in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#36 0x00007fd721c92358 in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#37 0x00007fd721c3c9b3 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#38 0x00007fd723d0e6f8 in QEventDispatcherGlib::processEvents (this=0x56373c0021b0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#39 0x00007fd723cc09b2 in QEventLoop::exec (this=this@entry=0x7ffeac1c52d0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#40 0x00007fd723cc8544 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#41 0x00007fd725df2d3d in kdemain () from /lib64/libkdeinit5_dolphin.so
#42 0x00007fd725bf4b75 in __libc_start_main () from /lib64/libc.so.6
#43 0x000056373abb50ae in _start ()
[Inferior 1 (process 41504) detached]
Comment 1 Alex 2021-03-06 09:25:55 UTC
I'm now getting a crash when trying to browse my device, although this is when the device is unlocked. The lag before crashing is similar though.

Application: Dolphin (dolphin), signal: Aborted
Content of s_kcrashErrorMessage: [Current thread is 1 (Thread 0x7f1e3775e980 (LWP 112477))]
[KCrash Handler]
#6  0x00007f1e3e5e7292 in raise () from /lib64/libc.so.6
#7  0x00007f1e3e5d08a4 in abort () from /lib64/libc.so.6
#8  0x00007f1e3c4d142d in qt_message_fatal (message=<synthetic pointer>..., context=...) at global/qlogging.cpp:1914
#9  QMessageLogger::fatal (this=this@entry=0x7fff84916950, msg=msg@entry=0x7f1e3a079cb8 "The Wayland connection broke. Did the Wayland compositor die?") at global/qlogging.cpp:893
#10 0x00007f1e39feeef3 in QtWaylandClient::QWaylandDisplay::checkError (this=<optimized out>) at /usr/src/debug/qt5-qtwayland-5.15.2-4.fc34.x86_64/src/client/qwaylanddisplay.cpp:209
#11 QtWaylandClient::QWaylandDisplay::checkError (this=<optimized out>) at /usr/src/debug/qt5-qtwayland-5.15.2-4.fc34.x86_64/src/client/qwaylanddisplay.cpp:204
#12 0x00007f1e39ffd6fa in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x557557200820) at /usr/src/debug/qt5-qtwayland-5.15.2-4.fc34.x86_64/src/client/qwaylanddisplay.cpp:222
#13 0x00007f1e3c6cf4fd in doActivate<false> (sender=0x55755721ad40, signal_index=3, argv=0x7fff84916a50) at kernel/qobject.cpp:3898
#14 0x00007f1e3c6c99e7 in QMetaObject::activate (sender=sender@entry=0x55755721ad40, m=m@entry=0x7f1e3c963ac0 <QAbstractEventDispatcher::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3946
#15 0x00007f1e3c69ba64 in QAbstractEventDispatcher::aboutToBlock (this=this@entry=0x55755721ad40) at .moc/moc_qabstracteventdispatcher.cpp:143
#16 0x00007f1e3c6eb6d2 in QEventDispatcherGlib::processEvents (this=0x55755721ad40, flags=...) at kernel/qeventdispatcher_glib.cpp:410
#17 0x00007f1e3c69d9b2 in QEventLoop::exec (this=this@entry=0x7fff84916b70, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#18 0x00007f1e3c6a5544 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#19 0x00007f1e3e7cfd3d in kdemain () from /lib64/libkdeinit5_dolphin.so
#20 0x00007f1e3e5d1b75 in __libc_start_main () from /lib64/libc.so.6
#21 0x0000557555d380ae in _start ()
[Inferior 1 (process 112477) detached]
Comment 2 Marco Rebhan 2021-09-20 09:01:52 UTC
I have the same issue, in my experience it's not specific to Dolphin/KDE Connect but happens any time a KDE application (or any Qt application?) under Wayland hangs and you keep interacting with it while it's hanging (if you do nothing and wait until it's responsive again, it will not crash). It is usually noticable with network shares though, including the KDE Connect one.

"The Wayland connection broke. Did the Wayland compositor die?"

I think that Wayland closes the connection to any application that doesn't receive input events after some buffer for them filled up, but that's just a guess from how it behaves.
Comment 3 Marco Rebhan 2021-09-24 09:47:31 UTC
This is probably https://bugreports.qt.io/browse/QTBUG-66997. Looks like I was right:

> I looked a bit into this... It's happening because you block the GUI thread
> for a long time (which you shouldn't do), no events will be read and the
> Wayland socket buffer will eventually fill up if you generate a lot of
> input in a very short time (the compositor should ideally stop sending
> events when the client doesn't answer ping events). When the socket buffer
> fills up, the client will be disconnected (closed).

Also see bug #392376.
Comment 4 tarmoration 2021-09-29 18:27:16 UTC
Created attachment 142014 [details]
New crash information added by DrKonqi

dolphin (20.04.2) using Qt 5.12.7

- What I was doing when the application crashed:
	Looking at the internal storage directory of my kde-connected phone and hovering my mouse over the internal secondary drive of my computer at the devices section on the left.

- Custom settings of the application:
	KDEConnect was in use and my phone's whole internal storage was exposed and on. Dolphin was probably counting the items in each of the directory as I was in details view mode. I have some populated directories in my phone's internal storage and dolphin had the time to count all of them, at least at a single level depth.

-- Backtrace (Reduced):
#6  0x00007f31d623487b in qt_message_fatal (context=..., message=<synthetic pointer>...) at global/qlogging.cpp:1907
#7  QMessageLogger::fatal (this=this@entry=0x7ffc6128a820, msg=msg@entry=0x7f31c71f1be0 "The Wayland connection broke. Did the Wayland compositor die?") at global/qlogging.cpp:888
#8  0x00007f31c718b4ed in QtWaylandClient::QWaylandDisplay::checkError (this=<optimized out>) at qwaylanddisplay.cpp:179
#9  0x00007f31c718b53e in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x55e5c56519e0) at qwaylanddisplay.cpp:192
[...]
#12 0x00007f31d646f7f8 in QSocketNotifier::activated (this=this@entry=0x55e5c56b8bd0, _t1=<optimized out>, _t2=...) at .moc/moc_qsocketnotifier.cpp:140
Comment 5 Akseli Lahtinen 2023-12-11 08:28:10 UTC

*** This bug has been marked as a duplicate of bug 462390 ***