Bug 419428

Summary: Dolphin crashes when opening an external hdd
Product: [Frameworks and Libraries] frameworks-kcoreaddons Reporter: Ismael Asensio <isma.af>
Component: generalAssignee: Michael Pyne <mpyne>
Status: RESOLVED FIXED    
Severity: crash CC: jjm, kdelibs-bugs, kfm-devel, meven29, nate, postix, priit
Priority: NOR Keywords: drkonqi
Version: 5.69.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 5.69
Sentry Crash Report:

Description Ismael Asensio 2020-03-30 20:01:37 UTC
Application: dolphin (20.07.70)
 (Compiled from sources)
Qt Version: 5.12.4
Frameworks Version: 5.69.0
Operating System: Linux 5.3.0-23-generic x86_64
Windowing system: X11
Distribution: Ubuntu 19.10

-- Information about the crash:
When opening an external hard drive (I've tried on two of them), dolphin crashes every time 
Same thing happens when trying to open it using `kioclient5 open` or using a filepicker.
The drive can be accessed in a terminal, and `kioclient5 list` can list the drive's folders without problems.

I'm using a debug configuration on current master
 `ASSERT failure in Q_UNREACHABLE(): "Q_UNREACHABLE was reached", file /home/isma/kde/src/kcoreaddons/src/lib/io/kdirwatch.cpp, line 956`

The crash can be reproduced every time.

-- Backtrace:
Application: Dolphin (dolphin), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f51efce4c80 (LWP 5253))]

Thread 5 (Thread 0x7f51e569f700 (LWP 5258)):
#0  0x00007f51f6bdbc2f in __GI___poll (fds=0x7f51d40025e0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f51f22a7aae in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f51f22a7be3 in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f51f4643653 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f51f45ea5cb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f51f4423a45 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f51f4424c92 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f51f2b7d669 in start_thread (arg=<optimized out>) at pthread_create.c:479
#8  0x00007f51f6be8323 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f51e7338700 (LWP 5257)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55d61a3e3168) at ../sysdeps/unix/sysv/linux/futex-internal.h:80
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55d61a3e3118, cond=0x55d61a3e3140) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55d61a3e3140, mutex=0x55d61a3e3118) at pthread_cond_wait.c:638
#3  0x00007f51e781eaab in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4  0x00007f51e781e6cb in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5  0x00007f51f2b7d669 in start_thread (arg=<optimized out>) at pthread_create.c:479
#6  0x00007f51f6be8323 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f51edcb6700 (LWP 5256)):
#0  0x00007f51f6bdbc2f in __GI___poll (fds=0x7f51e0010150, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f51f22a7aae in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f51f22a7be3 in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f51f4643653 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f51f45ea5cb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f51f4423a45 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f51f48c4efa in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007f51f4424c92 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f51f2b7d669 in start_thread (arg=<optimized out>) at pthread_create.c:479
#9  0x00007f51f6be8323 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f51eeba3700 (LWP 5255)):
#0  0x00007f51f6bdbc2f in __GI___poll (fds=0x7f51eeba2ca8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f51f2ba7917 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f51f2ba953a in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f51ef386288 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007f51f4424c92 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f51f2b7d669 in start_thread (arg=<optimized out>) at pthread_create.c:479
#6  0x00007f51f6be8323 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f51efce4c80 (LWP 5253)):
[KCrash Handler]
#6  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#7  0x00007f51f6aeb899 in __GI_abort () at abort.c:79
#8  0x00007f51f43eba99 in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f51f43eaf46 in qt_assert_x(char const*, char const*, char const*, int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007f51f571ba5f in KDirWatchPrivate::addWatch (this=0x55d61a7e0a10, e=0x55d61a7aa9a0) at /home/isma/kde/src/kcoreaddons/src/lib/io/kdirwatch.cpp:956
#11 0x00007f51f571b7ab in KDirWatchPrivate::addEntry (this=0x55d61a7e0a10, instance=0x7f51f57c0b50 <(anonymous namespace)::Q_QGS_s_pKDirWatchSelf::innerFunction()::holder>, _path=..., sub_entry=0x0, isDir=true, watchModes=...) at /home/isma/kde/src/kcoreaddons/src/lib/io/kdirwatch.cpp:930
#12 0x00007f51f572014f in KDirWatch::addDir (this=0x7f51f57c0b50 <(anonymous namespace)::Q_QGS_s_pKDirWatchSelf::innerFunction()::holder>, _path=..., watchModes=...) at /home/isma/kde/src/kcoreaddons/src/lib/io/kdirwatch.cpp:1878
#13 0x00007f51f6299b54 in KCoreDirListerCache::DirItem::incAutoUpdate (this=0x55d61a7dcb50) at /home/isma/kde/src/kio/src/core/kcoredirlister_p.h:403
#14 0x00007f51f62846bb in KCoreDirListerCache::listDir (this=0x7f51f6359980 <(anonymous namespace)::Q_QGS_kDirListerCache::innerFunction()::holder>, lister=0x55d61a83b7b0, _u=..., _keep=false, _reload=false) at /home/isma/kde/src/kio/src/core/kcoredirlister.cpp:221
#15 0x00007f51f6293516 in KCoreDirLister::openUrl (this=0x55d61a83b7b0, _url=..., _flags=...) at /home/isma/kde/src/kio/src/core/kcoredirlister.cpp:2136
#16 0x00007f51f6970e6d in KFileItemModel::loadDirectory (this=0x55d61a7361b0, url=...) at /home/isma/kde/src/dolphin/src/kitemviews/kfileitemmodel.cpp:121
#17 0x00007f51f6a14fa9 in DolphinView::loadDirectory (this=0x55d61a941f50, url=..., reload=false) at /home/isma/kde/src/dolphin/src/views/dolphinview.cpp:1712
#18 0x00007f51f6a0de2c in DolphinView::DolphinView (this=0x55d61a941f50, url=..., parent=0x55d61a6df470) at /home/isma/kde/src/dolphin/src/views/dolphinview.cpp:200
#19 0x00007f51f6d6f359 in DolphinViewContainer::DolphinViewContainer (this=0x55d61a6df470, url=..., parent=0x55d61a84ad30) at /home/isma/kde/src/dolphin/src/dolphinviewcontainer.cpp:160
#20 0x00007f51f6d7dba0 in DolphinTabPage::createViewContainer (this=0x55d61a682100, url=...) at /home/isma/kde/src/dolphin/src/dolphintabpage.cpp:370
#21 0x00007f51f6d7c6a0 in DolphinTabPage::DolphinTabPage (this=0x55d61a682100, primaryUrl=..., secondaryUrl=..., parent=0x55d61a2502c0) at /home/isma/kde/src/dolphin/src/dolphintabpage.cpp:43
#22 0x00007f51f6d7f604 in DolphinTabWidget::openNewTab (this=0x55d61a2502c0, primaryUrl=..., secondaryUrl=..., tabPlacement=DolphinTabWidget::AfterLastTab) at /home/isma/kde/src/dolphin/src/dolphintabwidget.cpp:171
#23 0x00007f51f6d7f57e in DolphinTabWidget::openNewActivatedTab (this=0x55d61a2502c0, primaryUrl=..., secondaryUrl=...) at /home/isma/kde/src/dolphin/src/dolphintabwidget.cpp:163
#24 0x00007f51f6d7f9bf in DolphinTabWidget::openDirectories (this=0x55d61a2502c0, dirs=..., splitView=false) at /home/isma/kde/src/dolphin/src/dolphintabwidget.cpp:219
#25 0x00007f51f6d4ac5c in DolphinMainWindow::openDirectories (this=0x55d61a2506b0, dirs=..., splitView=false) at /home/isma/kde/src/dolphin/src/dolphinmainwindow.cpp:225
#26 0x00007f51f6d4740c in kdemain (argc=2, argv=0x7ffee499f998) at /home/isma/kde/src/dolphin/src/main.cpp:172
#27 0x000055d618634193 in main (argc=2, argv=0x7ffee499f998) at /home/isma/kde/build/dolphin/src/dolphin_dummy.cpp:3
[Inferior 1 (process 5253) detached]

Possible duplicates by query: bug 418804, bug 418803, bug 418351, bug 418277, bug 418026.

Reported using DrKonqi
Comment 1 Ismael Asensio 2020-03-30 20:23:37 UTC
Bisecting gets me to this as the first bad commit: fcdf263339b4493432e14dcca77e59b5dccd5531

Fix Warnings
Differential Revision: https://phabricator.kde.org/D28349
Comment 2 postix 2020-03-31 18:01:54 UTC
Confirmed on:

Operating System: Manjaro Linux 
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.1
Kernel Version: 5.5.13-1-MANJARO
Comment 3 Jonathan Marten 2020-04-01 14:29:54 UTC
Fix proposed at https://phabricator.kde.org/D28457
Comment 4 Jonathan Marten 2020-04-01 14:30:39 UTC
*** Bug 419389 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2020-04-01 15:07:52 UTC
Fixed with https://cgit.kde.org/kcoreaddons.git/commit/?id=0ee65124c0f6fc436c55ba1fca2371edd85a4777

It didn't get closed automatically because the author's email address (meven.car@enioka.com) doesn't match the committer's Bugzilla email address.