Bug 429538

Summary: Dolphin 20.04.1 Crashes when closing terminal on Fedora 32
Product: [Applications] konsole Reporter: mehdipourhadi <mehdipourhadi>
Component: kpartAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: crash CC: a.samirh78, kfm-devel, nate, rdieter
Priority: NOR Keywords: drkonqi
Version: 20.04.1   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 20.12.1
Sentry Crash Report:

Description mehdipourhadi 2020-11-23 10:19:50 UTC
Application: dolphin (20.04.1)

Qt Version: 5.14.2
Frameworks Version: 5.73.0
Operating System: Linux 5.9.8-100.fc32.x86_64 x86_64
Windowing system: X11
Distribution: "Fedora release 32 (Thirty Two)"

-- Information about the crash:
- What I was doing when the application crashed:
just right click on dolphin on the terminal part and close  it.

The crash can be reproduced every time.

-- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fee8f651940 (LWP 13637))]

Thread 8 (Thread 0x7fee6ecbd700 (LWP 13644)):
#0  0x00007fee95ff34cc in read () from /lib64/libc.so.6
#1  0x00007fee9211353f in g_wakeup_acknowledge () from /lib64/libglib-2.0.so.0
#2  0x00007fee920c95ee in g_main_context_check () from /lib64/libglib-2.0.so.0
#3  0x00007fee920c9a55 in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#4  0x00007fee920c9be3 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#5  0x00007fee9417ab8b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#6  0x00007fee9412d91b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#7  0x00007fee93f99427 in QThread::exec() () from /lib64/libQt5Core.so.5
#8  0x00007fee93f9a690 in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#9  0x00007fee92a70432 in start_thread () from /lib64/libpthread.so.0
#10 0x00007fee96002913 in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7fee78940700 (LWP 13643)):
#0  0x00007fee92a76e92 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fee7aeb4fcb in util_queue_thread_func () from /usr/lib64/dri/iris_dri.so
#2  0x00007fee7aeb4a8b in impl_thrd_routine () from /usr/lib64/dri/iris_dri.so
#3  0x00007fee92a70432 in start_thread () from /lib64/libpthread.so.0
#4  0x00007fee96002913 in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7fee79141700 (LWP 13642)):
#0  0x00007fee92a76e92 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fee7aeb4fcb in util_queue_thread_func () from /usr/lib64/dri/iris_dri.so
#2  0x00007fee7aeb4a8b in impl_thrd_routine () from /usr/lib64/dri/iris_dri.so
#3  0x00007fee92a70432 in start_thread () from /lib64/libpthread.so.0
#4  0x00007fee96002913 in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fee79942700 (LWP 13641)):
#0  0x00007fee92a76e92 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fee7aeb4fcb in util_queue_thread_func () from /usr/lib64/dri/iris_dri.so
#2  0x00007fee7aeb4a8b in impl_thrd_routine () from /usr/lib64/dri/iris_dri.so
#3  0x00007fee92a70432 in start_thread () from /lib64/libpthread.so.0
#4  0x00007fee96002913 in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fee7a143700 (LWP 13640)):
#0  0x00007fee92a76e92 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fee7aeb4fcb in util_queue_thread_func () from /usr/lib64/dri/iris_dri.so
#2  0x00007fee7aeb4a8b in impl_thrd_routine () from /usr/lib64/dri/iris_dri.so
#3  0x00007fee92a70432 in start_thread () from /lib64/libpthread.so.0
#4  0x00007fee96002913 in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fee817f4700 (LWP 13639)):
#0  0x00007fee95ff7aaf in poll () from /lib64/libc.so.6
#1  0x00007fee920c9aae in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#2  0x00007fee920c9be3 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007fee9417ab8b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007fee9412d91b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007fee93f99427 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007fee9440851b in QDBusConnectionManager::run() () from /lib64/libQt5DBus.so.5
#7  0x00007fee93f9a690 in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8  0x00007fee92a70432 in start_thread () from /lib64/libpthread.so.0
#9  0x00007fee96002913 in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fee823b5700 (LWP 13638)):
#0  0x00007fee95ff7aaf in poll () from /lib64/libc.so.6
#1  0x00007fee92a9b38a in _xcb_conn_wait () from /lib64/libxcb.so.1
#2  0x00007fee92a9d71a in xcb_wait_for_event () from /lib64/libxcb.so.1
#3  0x00007fee8256bc78 in QXcbEventQueue::run() () from /lib64/libQt5XcbQpa.so.5
#4  0x00007fee93f9a690 in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#5  0x00007fee92a70432 in start_thread () from /lib64/libpthread.so.0
#6  0x00007fee96002913 in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fee8f651940 (LWP 13637)):
[KCrash Handler]
#4  0x00007fee94b87722 in QList<QAction*>::removeAll(QAction* const&) () from /lib64/libQt5Widgets.so.5
#5  0x00007fee94bc0bcb in QWidget::removeAction(QAction*) () from /lib64/libQt5Widgets.so.5
#6  0x00007fee9561f079 in KActionCollection::removeAssociatedWidget(QWidget*) () from /lib64/libKF5XmlGui.so.5
#7  0x00007fee956584df in KXMLGUIClient::prepareXMLUnplug(QWidget*) () from /lib64/libKF5XmlGui.so.5
#8  0x00007fee9565c12f in KXMLGUIFactory::removeClient(KXMLGUIClient*) () from /lib64/libKF5XmlGui.so.5
#9  0x00007fee6e3e72a1 in Konsole::SessionController::~SessionController() () from /lib64/libkonsoleprivate.so.20
#10 0x00007fee6e3e748d in Konsole::SessionController::~SessionController() () from /lib64/libkonsoleprivate.so.20
#11 0x00007fee94156961 in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5
#12 0x00007fee94b89063 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#13 0x00007fee9412efc0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#14 0x00007fee94131c47 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQt5Core.so.5
#15 0x00007fee9417b0a7 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQt5Core.so.5
#16 0x00007fee920c978f in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#17 0x00007fee920c9b18 in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#18 0x00007fee920c9be3 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#19 0x00007fee9417ab73 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#20 0x00007fee9412d91b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#21 0x00007fee941355a6 in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#22 0x00007fee961182db in kdemain () from /lib64/libkdeinit5_dolphin.so
#23 0x00007fee95f28042 in __libc_start_main () from /lib64/libc.so.6
#24 0x0000560ff21260ae in _start ()
[Inferior 1 (process 13637) detached]

Possible duplicates by query: bug 422767, bug 420647, bug 380402, bug 267664, bug 264347.

Reported using DrKonqi
Comment 1 Nate Graham 2020-11-23 16:36:07 UTC
Seems like an issue in the Konsole KPart:

#4  0x00007fee94b87722 in QList<QAction*>::removeAll(QAction* const&) () from /lib64/libQt5Widgets.so.5
#5  0x00007fee94bc0bcb in QWidget::removeAction(QAction*) () from /lib64/libQt5Widgets.so.5
#6  0x00007fee9561f079 in KActionCollection::removeAssociatedWidget(QWidget*) () from /lib64/libKF5XmlGui.so.5
#7  0x00007fee956584df in KXMLGUIClient::prepareXMLUnplug(QWidget*) () from /lib64/libKF5XmlGui.so.5
#8  0x00007fee9565c12f in KXMLGUIFactory::removeClient(KXMLGUIClient*) () from /lib64/libKF5XmlGui.so.5
#9  0x00007fee6e3e72a1 in Konsole::SessionController::~SessionController() () from /lib64/libkonsoleprivate.so.20
#10 0x00007fee6e3e748d in Konsole::SessionController::~SessionController() () from /lib64/libkonsoleprivate.so.20
Comment 2 Bug Janitor Service 2020-11-24 14:09:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/280
Comment 3 Ahmad Samir 2020-11-26 14:08:37 UTC
Git commit 043c424af5ea6f34bcbee4001419adcacd364558 by Ahmad Samir.
Committed on 26/11/2020 at 00:20.
Pushed by hindenburg into branch 'master'.

SessionContoller: fix crash when closing session from Konsole KPart

_preventClose has to be set to false right at the end, so as to prevent
crashes if the user selects the "close session" action from the context
menu in a Konsole KPart (e.g. the terminal panel in Dolphin).

Check menu object isn't null before deleting actions from it.

M  +13   -13   src/session/SessionController.cpp

https://invent.kde.org/utilities/konsole/commit/043c424af5ea6f34bcbee4001419adcacd364558
Comment 4 Kurt Hindenburg 2020-11-26 14:17:39 UTC
Git commit 9b9c204c192e8893ca80aa9d93f77b79111ebe5c by Kurt Hindenburg, on behalf of Ahmad Samir.
Committed on 26/11/2020 at 14:14.
Pushed by hindenburg into branch 'release/20.12'.

SessionContoller: fix crash when closing session from Konsole KPart

_preventClose has to be set to false right at the end, so as to prevent
crashes if the user selects the "close session" action from the context
menu in a Konsole KPart (e.g. the terminal panel in Dolphin).

Check menu object isn't null before deleting actions from it.
(cherry picked from commit 043c424af5ea6f34bcbee4001419adcacd364558)

M  +13   -13   src/session/SessionController.cpp

https://invent.kde.org/utilities/konsole/commit/9b9c204c192e8893ca80aa9d93f77b79111ebe5c
Comment 5 mehdipourhadi 2020-11-26 14:47:17 UTC
Should i update now?
Comment 6 Kurt Hindenburg 2020-11-26 15:00:03 UTC
You'll have to wait until your distro updates to 20.12 - there's no way to back port to 20.04 or 20.08 unless your distro does it by manually patching it..
Comment 7 Ahmad Samir 2020-11-26 15:39:03 UTC
Distros usually backport fixes such as this. (And I see one of the Fedora maintainers is already in the CC of this report ;)).

(I'll also post to distributions@kde.org to notify distro maintainers of this).
Comment 8 Ahmad Samir 2020-11-26 15:44:19 UTC
(Note you'll also need this commit https://invent.kde.org/utilities/konsole/-/commit/b193b8b1242d1570361d2388c475b5a619c19afe).