Bug 473488 - Crash right before copying to pen drive
Summary: Crash right before copying to pen drive
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 23.04.3
Platform: Arch Linux Linux
: VHI crash
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: drkonqi
: 413587 436680 438821 441765 452658 454414 455835 459580 459817 459967 470588 472207 474331 479074 482550 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-08-17 18:11 UTC by Edd
Modified: 2024-04-27 11:39 UTC (History)
15 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edd 2023-08-17 18:11:15 UTC
Application: dolphin (23.04.3)

Qt Version: 5.15.10
Frameworks Version: 5.108.0
Operating System: Linux 6.4.9-zen1-1-zen x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 5.27.7 [KCrashBackend]

-- Information about the crash:
Ctrl+C from ~/Downloads
Ctrl+V to pen drive
Crash immediately
Did not copy at all

Restarting program and retrying worked.

The crash does not seem to be reproducible.

-- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[KCrash Handler]
#6  std::__atomic_base<int>::operator--() (this=0x20, this=<optimized out>) at /usr/include/c++/13.1.1/bits/atomic_base.h:410
#7  QAtomicOps<int>::deref<int>(std::atomic<int>&) (_q_value=<error reading variable: Cannot access memory at address 0x20>, _q_value=<optimized out>) at /usr/include/qt/QtCore/qatomic_cxx11.h:289
#8  QBasicAtomicInteger<int>::deref() (this=0x20, this=<optimized out>) at /usr/include/qt/QtCore/qbasicatomic.h:119
#9  QSharedDataPointer<KFileItemPrivate>::~QSharedDataPointer() (this=0x56058d04ee80, this=<optimized out>) at /usr/include/qt/QtCore/qshareddata.h:93
#10 KFileItem::~KFileItem() (this=0x56058d04ee80, this=<optimized out>) at /usr/src/debug/kio/kio-5.108.0/src/core/kfileitem.cpp:605
#11 0x00007fe0baf0e7a3 in QList<KFileItem>::node_destruct(QList<KFileItem>::Node*) (n=0x56058d04ee80, this=0x56058d4a23a0) at /usr/include/qt/QtCore/qlist.h:479
#12 QList<KFileItem>::erase(QList<KFileItem>::iterator) (it=..., this=0x56058d4a23a0) at /usr/include/qt/QtCore/qlist.h:566
#13 KCoreDirListerCache::reinsert(KFileItem const&, QUrl const&) (this=<optimized out>, item=..., oldUrl=<optimized out>) at /usr/src/debug/kio/kio-5.108.0/src/core/kcoredirlister_p.h:289
#14 0x00007fe0baf21a4f in KCoreDirListerCache::processPendingUpdates() (this=0x7fe0bafa3560 <_ZZN12_GLOBAL__N_121Q_QGS_kDirListerCache13innerFunctionEvE6holder.lto_priv.0>) at /usr/src/debug/kio/kio-5.108.0/src/core/kcoredirlister.cpp:2019
#15 0x00007fe0b92d1637 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffdb54e3330, r=<optimized out>, this=0x56058cd1c620, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#16 doActivate<false>(QObject*, int, void**) (sender=0x7fe0bafa3630 <_ZZN12_GLOBAL__N_121Q_QGS_kDirListerCache13innerFunctionEvE6holder.lto_priv.0+208>, signal_index=3, argv=0x7ffdb54e3330) at kernel/qobject.cpp:3925
#17 0x00007fe0b92d316f in QTimer::timeout(QTimer::QPrivateSignal) (this=<optimized out>, _t1=...) at .moc/moc_qtimer.cpp:205
#18 0x00007fe0b92c40ee in QObject::event(QEvent*) (this=0x7fe0bafa3630 <_ZZN12_GLOBAL__N_121Q_QGS_kDirListerCache13innerFunctionEvE6holder.lto_priv.0+208>, e=0x7ffdb54e34a0) at kernel/qobject.cpp:1324
#19 0x00007fe0b9f7893f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x7fe0bafa3630 <_ZZN12_GLOBAL__N_121Q_QGS_kDirListerCache13innerFunctionEvE6holder.lto_priv.0+208>, e=0x7ffdb54e34a0) at kernel/qapplication.cpp:3640
#20 0x00007fe0b929c6f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x7fe0bafa3630 <_ZZN12_GLOBAL__N_121Q_QGS_kDirListerCache13innerFunctionEvE6holder.lto_priv.0+208>, event=0x7ffdb54e34a0) at kernel/qcoreapplication.cpp:1064
#21 0x00007fe0b92ead6b in QTimerInfoList::activateTimers() (this=0x56058ccd5ee0) at kernel/qtimerinfo_unix.cpp:643
#22 0x00007fe0b92eb35a in timerSourceDispatch(GSource*, GSourceFunc, gpointer) (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:183
#23 0x00007fe0b6f0fa31 in g_main_dispatch (context=0x7fe0ac000ee0) at ../glib/glib/gmain.c:3460
#24 g_main_context_dispatch (context=0x7fe0ac000ee0) at ../glib/glib/gmain.c:4200
#25 0x00007fe0b6f6ccc9 in g_main_context_iterate.isra.0 (context=context@entry=0x7fe0ac000ee0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4276
#26 0x00007fe0b6f0d0e2 in g_main_context_iteration (context=0x7fe0ac000ee0, may_block=1) at ../glib/glib/gmain.c:4343
#27 0x00007fe0b92eb51c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x56058ccd6210, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#28 0x00007fe0b929b404 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffdb54e3750, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#29 0x00007fe0b929c8a3 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#30 0x00007fe0b973bef2 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1870
#31 0x00007fe0b9f76cda in QApplication::exec() () at kernel/qapplication.cpp:2832
#32 0x000056058c2a9da8 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/dolphin/dolphin-23.04.3/src/main.cpp:249
[Inferior 1 (process 207571) detached]

The reporter indicates this bug may be a duplicate of or related to bug 409285.

Reported using DrKonqi
Comment 1 Méven Car 2023-09-09 16:20:26 UTC
Were you overwriting a file on the pen drive by any chance ?

Did you remove any file on the drive before it happened ?
Comment 2 Nicolas Fella 2023-09-09 21:05:47 UTC
*** Bug 474331 has been marked as a duplicate of this bug. ***
Comment 3 Nicolas Fella 2023-09-09 21:12:35 UTC
*** Bug 472207 has been marked as a duplicate of this bug. ***
Comment 4 Bug Janitor Service 2023-09-10 07:04:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1402
Comment 5 Edd 2023-12-02 18:37:59 UTC
(In reply to Méven Car from comment #1)
> Were you overwriting a file on the pen drive by any chance ?
> 
> Did you remove any file on the drive before it happened ?

I'm sorry. I don't remember.
Comment 6 Akseli Lahtinen 2023-12-05 11:25:58 UTC
*** Bug 459967 has been marked as a duplicate of this bug. ***
Comment 7 Akseli Lahtinen 2023-12-05 11:26:20 UTC
*** Bug 470588 has been marked as a duplicate of this bug. ***
Comment 8 Akseli Lahtinen 2023-12-05 11:26:33 UTC
*** Bug 455835 has been marked as a duplicate of this bug. ***
Comment 9 Akseli Lahtinen 2023-12-05 11:26:45 UTC
*** Bug 454414 has been marked as a duplicate of this bug. ***
Comment 10 Akseli Lahtinen 2023-12-05 11:26:54 UTC
*** Bug 413587 has been marked as a duplicate of this bug. ***
Comment 11 Akseli Lahtinen 2023-12-05 11:27:04 UTC
*** Bug 452658 has been marked as a duplicate of this bug. ***
Comment 12 Akseli Lahtinen 2023-12-05 11:27:17 UTC
*** Bug 441765 has been marked as a duplicate of this bug. ***
Comment 13 Akseli Lahtinen 2023-12-05 11:27:26 UTC
*** Bug 438821 has been marked as a duplicate of this bug. ***
Comment 14 Akseli Lahtinen 2023-12-05 11:27:37 UTC
*** Bug 436680 has been marked as a duplicate of this bug. ***
Comment 15 Akseli Lahtinen 2023-12-14 13:33:23 UTC
*** Bug 459817 has been marked as a duplicate of this bug. ***
Comment 16 Akseli Lahtinen 2024-01-08 09:05:41 UTC
*** Bug 479074 has been marked as a duplicate of this bug. ***
Comment 17 Akseli Lahtinen 2024-02-01 14:37:05 UTC
*** Bug 459580 has been marked as a duplicate of this bug. ***
Comment 18 Nicolas Fella 2024-03-26 09:49:18 UTC
*** Bug 482550 has been marked as a duplicate of this bug. ***
Comment 19 Méven 2024-03-27 11:20:41 UTC
Git commit b184cad07de7cefe9bccff500ad6b022ce3018c1 by Méven Car.
Committed on 27/03/2024 at 11:06.
Pushed by meven into branch 'master'.

KCoreDirListerCache:: make sure not to reinsert an item twice

In slotUpdateResult and processPendingUpdates.

pendingUpdates can be updated in KCoreDirListerCache::slotFilesChanged
called synchrounously when file on disk are changed or asynchrously when
its parent directory is scanned for whatever reason. It can happen that
the pendingUpdateTimer triggers as the file is updated, this may cause
reinsert for the same url, the second one causing a crash.

Not 100% sure this is sufficient to fix the crash, so only CC.

M  +17   -3    src/core/kcoredirlister.cpp

https://invent.kde.org/frameworks/kio/-/commit/b184cad07de7cefe9bccff500ad6b022ce3018c1
Comment 20 Méven Car 2024-04-27 11:39:22 UTC
Will be in particular interested if this crash can happen still after Frameworks 6.1 and https://invent.kde.org/frameworks/kio/-/commit/b184cad07de7cefe9bccff500ad6b022ce3018c1