Version: 2.4.3 (using KDE 4.4.4) OS: Linux konsole -e autossh -M 0:7 root@localhost (open new tab or window) (try to close one of the tabs via the konsole menu) ->crash i was only able to recreate the problem with autossh... Reproducible: Always OS: Linux (i686) release 2.6.34-12-desktop Compiler: gcc
crash is inaccurate, all konsole windows show no more reaction
Here with Mandriva Linux Cooker on a Pentium 4 (x86-32) and konsole from kdebase4-4.5.74-0.svn1190490.1mdv2011.0.src.rpm , then konsole hangs for a while after I try to close a tab and then becomes responsive again. It's still a bug, though.
I can reproduce this with 2.7.999, kind of. konsole does not crash. konsole(the whole app) hangs for a while(1 minute or so), then it resumes and the tab/session you have asked to close is still open and alive. If 'Ctrl+D' is pressed to finish the ssh connection established by autossh, that tab will be closed normally. So I guess the thing is when konsole menu is used to close tab , autossh does not think its job is done and won't die. Mabye it thinks the ssh connectio is broken and reestablishes the ssh connection ,as its name implies? This bug may be related with #185140, where konsole does not kill the terminal process properly, either.
I got a clue why konsole hangs for a while. First, when user asks to close the session through menu, konsole will send SIGHUP to the terminal process(in this report, autossh). Second, most terminal processes will die when SIGHUP is received, but autossh does not. According to autossh(1), `autossh can be "prodded" to retry by signalling it, perhaps with SIGHUP ("kill -HUP").` Third, konsole will wait for the terminal process to die by calling QProcess::waitForFinished(). Normally, that would return quickly. But since autossh does not die, that method will block until the default timeout, 30s, is reached. That is where the hang is introduced. I will try to make a nice patch and post it on reviewboard sometime later.
*** Bug 254600 has been marked as a duplicate of this bug. ***
Git commit e3a09c9c4d7a35d458440e28501098f3ac13b684 by Jekyll Wu. Committed on 03/10/2011 at 05:01. Pushed by jekyllwu into branch 'master'. Close session reliably when the session process doesn't die with SIGHUP. BUG:241709 BUG:251566 CCBUG:254600 FIXED-IN: 4.8 REVIEW:102239 M +1 -1 src/MainWindow.cpp M +41 -18 src/Session.cpp M +20 -5 src/Session.h M +41 -3 src/SessionController.cpp M +8 -2 src/SessionController.h M +2 -2 src/ViewManager.cpp http://commits.kde.org/konsole/e3a09c9c4d7a35d458440e28501098f3ac13b684