Bug 370652

Summary: Konsole crashes after exiting tmux
Product: [Applications] konsole Reporter: García y García <exacto>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED WAITINGFORINFO    
Severity: crash CC: greenrd, groot, justin.zobel
Priority: NOR Keywords: drkonqi
Version: 16.08.1   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description García y García 2016-10-13 14:24:43 UTC
Application: konsole (16.08.1)

Qt Version: 5.6.1
Frameworks Version: 5.26.0
Operating System: Linux 4.7.5-200.fc24.x86_64 x86_64
Distribution: "Fedora release 24 (Twenty Four)"

-- Information about the crash:
- What I was doing when the application crashed:
I was exiting the last Tmux window.

- Custom settings of the application:
I'm using this ~/.local/bin script called tmuxer in the command section of my usual Konsole profile:

#!/bin/sh
unalias
tmux -f ~/.config/tmux -2 att || tmux -f ~/.config/tmux -2
exit 0

This helps out opening existing tmux sessions or creating a new one if I haven't opened another windows yet.

Sometimes Konsole shows: [exit] but doesn't close its window, then a crash message shows up.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Konsole (konsole), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f75c0fb7940 (LWP 21723))]

Thread 3 (Thread 0x7f75b5d77700 (LWP 21725)):
#0  0x00007f75cf5a03ed in poll () from /lib64/libc.so.6
#1  0x00007f75cb5d1a06 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f75cb5d1b1c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f75d03a624b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f75d03555ea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f75d01b4343 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f75d54dc559 in QDBusConnectionManager::run() () from /lib64/libQt5DBus.so.5
#7  0x00007f75d01b899a in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8  0x00007f75cdd6e5ca in start_thread () from /lib64/libpthread.so.0
#9  0x00007f75cf5abf6d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f75b76b7700 (LWP 21724)):
#0  0x00007f75cf5a03ed in poll () from /lib64/libc.so.6
#1  0x00007f75cce5af80 in _xcb_conn_wait () from /lib64/libxcb.so.1
#2  0x00007f75cce5cb79 in xcb_wait_for_event () from /lib64/libxcb.so.1
#3  0x00007f75ba402da9 in QXcbEventReader::run() () from /lib64/libQt5XcbQpa.so.5
#4  0x00007f75d01b899a in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#5  0x00007f75cdd6e5ca in start_thread () from /lib64/libpthread.so.0
#6  0x00007f75cf5abf6d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f75c0fb7940 (LWP 21723)):
[KCrash Handler]
#6  0x00007f75d4f12fd0 in Konsole::ProcessInfo::name(bool*) const () from /lib64/libkonsoleprivate.so.16
#7  0x00007f75d4f357a9 in Konsole::Session::getDynamicTitle() () from /lib64/libkonsoleprivate.so.16
#8  0x00007f75d4f3f753 in Konsole::SessionController::snapshot() () from /lib64/libkonsoleprivate.so.16
#9  0x00007f75d037eebc in QMetaObject::activate(QObject*, int, int, void**) () from /lib64/libQt5Core.so.5
#10 0x00007f75d038af88 in QTimer::timerEvent(QTimerEvent*) () from /lib64/libQt5Core.so.5
#11 0x00007f75d037fb8b in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5
#12 0x00007f75d0e7cc0c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#13 0x00007f75d0e820ef in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#14 0x00007f75d03567aa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#15 0x00007f75d03a57ab in QTimerInfoList::activateTimers() () from /lib64/libQt5Core.so.5
#16 0x00007f75d03a5d01 in timerSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQt5Core.so.5
#17 0x00007f75cb5d16ba in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#18 0x00007f75cb5d1a70 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#19 0x00007f75cb5d1b1c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#20 0x00007f75d03a622f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#21 0x00007f75d03555ea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#22 0x00007f75d035d17c in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#23 0x00007f75d51f3a23 in kdemain () from /lib64/libkdeinit5_konsole.so
#24 0x00007f75cf4c9731 in __libc_start_main () from /lib64/libc.so.6
#25 0x000055fcc41a3a99 in _start ()

Reported using DrKonqi
Comment 1 Christoph Feck 2016-10-14 02:46:23 UTC
Possibly fixed in 16.08.2 with commit dca6479a86f17b357365f1a598b8deeb0d602dbe

If not, this function should somehow else make sure the process pointer is never zero.
Comment 2 Robin Green 2017-01-05 16:47:32 UTC
Bug still present in 16.08.3.
Comment 3 Justin Zobel 2020-10-23 02:22:05 UTC
Garcia / Robin, can you please confirm if this is still an issue with Konsole 20.08.1+.
Comment 4 groot 2021-10-11 10:51:58 UTC
Timed out waiting for confirmation; the report is for a very old version of konsole and no-longer-supported Qt.