Summary: | screen's 'power detach' function causes konsole reporting: bash has crashed. | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Kenny M <kennym> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | adaptee, adrian, finex, KaiUweBroulik2, kde-bugs, mpartap, shlomif, tobimensch |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Kenny M
2008-08-06 20:10:05 UTC
Confirmed on trunk [power detached] Screen session of $LOGNAME $:cr:$:nl:ended. Warning: Program '/bin/bash' crashed. From some searches on the web: --- - Command: pow_detach (`C-a D D') Mainly the same as `detach', but also sends a HANGUP signal to the parent process of `screen'. _Caution_: This will result in a logout if `screen' was started from your login shell. --- In a power detach (C-a D D), the screen session is detached and the user is logged out of the calling shell. Changed severity to "crash". I hope to have selected only the right bugs (>100) :-) This Bug/Crash is still valid in KDE4.4.0. ...and it of course also occurs in yakuake which embeds konsole kparts... > [remote power detached] > Screen session of $LOGNAME $:cr:$:nl:ended. > Could not write /var/run/utmp: No such process > > Warning: Program '/bin/bash' crashed. ...Is this "irrelevant" piece of KDE maintained by anyone?... I can reproduce this problem but it is not konsole-specific as it also happens with xterm and gnome-terminal - and they both close the tab/window. Seems like a bash bug. (Mandriva Cooker / Pentium 4) (In reply to comment #5) > I can reproduce this problem but it is not konsole-specific as it also happens > with xterm and gnome-terminal - and they both close the tab/window. Seems like > a bash bug. > > (Mandriva Cooker / Pentium 4) Shouldn't this bug be closed? i created a test script run this from your konsole #!/bin/bash kill -HUP $PPID ok first thing firs SIGHUP is a signal that modems used to send(when looing connecion) many applications do this also for the same purpose(sshd,screen, screenwrappers) if the shell receives SIGHUP it will exit(nothing crashes afaik)(it will return 129 (128 + 1(hup) ,maybe this is what make konsole notify me) for some reason konsole sees this as a crash of bash as a final note: this is just gesswork experianced when wrapping screen (i must trap and forward sighup to kill the last shell(yes i have to manny) i have never looked in the code of konsole or bash Rejoice, oh plagued ones! Honestly think this has been fixed as it can't be reproduced since a while... hi i have a sipmle patch could somebody fix and commit for me? see: https://projects.kde.org/projects/kde/kdebase/konsole/repository/revisions/master/entry/src/Session.cpp#L777 org ---8<---- if (!_wantedClose || exitStatus != 0) { if (_shellProcess->exitStatus() == QProcess::NormalExit) message = i18n("Program '%1' exited with status %2.", _program, _shellProcess->exitStatus()); elseif (_shellProcess->exitStatus() > 127) message = i18n("Program '%1' receved signal '%2', _program, convertToSignalName(exitStatus-128); //according to man bash else message = i18n("Program '%1' crashed.", _program); //FIXME: See comments in Session::monitorTimerDone() KNotification::event("Finished", message , QPixmap(), QApplication::activeWindow(), KNotification::CloseWhenWidgetActivated); } if ( !_wantedClose && _shellProcess->exitStatus() != QProcess::NormalExit && _shellProcess->exitStatus() !> 127) terminalWarning(message); else emit finished(); } --->8--- ok convertToSignalName() is a non exisitant function but should do the same as kill -l $num i am unsure if i need to use _shellProcess->exitStatus() or exitStatus b.t.w. i have verified (see link) that konsole source is the problem of this message and my previus message is true Confirmed for konsole 2.5.4 in KDE 4.5.5 on Fedora 13 x86 and on Fedora 14 x86_64. It is not screen specific, just type kill -HUP $$ at a Bash prompt in console and the session crashes. Xterm and gnome-terminal just close the current tab/session with exitcode 0. is there not a sigele kde programmer here ? (look at my previus comment) The reason why konsole think bash has crashed is not hard to figure out. If you invoke bash from zsh then kill bash with SIGHUP, running 'echo $?' from zsh will print 129. When bash is killed like that in konsole, konsole will get 2 related information about bash: exitCode is 0, and exitStatus is 1(actually, QProcess::CrashExit). That QProcess::CrashExit will make konsole believe bash has crashed, as its name implies. The hard question is should konsole add extra code to deal with this case? . *** Bug 249546 has been marked as a duplicate of this bug. *** a message telling me a program has crashed when it is not is a bug think the console(-tab?) should be closed(like ^d) or there should be a notification telling me what happens hanks Any news regarding this? Michel, you should use the ReviewBoard for patches: https://git.reviewboard.kde.org/ If this still happens on a recent KDE5 version, please open a new ticket |