[Bug 254943] Re: screen's 'power detach' (ctrl+a DD) causes Warning: Program '/bin/bash' crashed error, and bash does indeed crash

Bug Watch Updater 254943 at bugs.launchpad.net
Thu Oct 4 07:57:12 UTC 2012


Launchpad has imported 16 comments from the remote bug at
https://bugs.kde.org/show_bug.cgi?id=168539.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2008-08-06T20:10:05+00:00 bascule wrote:

Version:           2.1 (using KDE 4.1.0)
Installed from:    Ubuntu Packages
OS:                Linux

Running KDE4.1 on kubuntu 8.04 from the ppa packages.

To recreate this bug, open a kde4 konsole run screen, then apply the key combination ctrl+a DD (this invokes screen's power detach function) and the error will appear, the tab is then useless. However the screen session does successfully detach so there is no data loss, even within bash sub-shells, i.e. running bash within bash and starting screen on that shell.
This only affects bash; zsh,csh and ksh all function correctly on a power detach.

Logged into a remote machine is not a problem, the session logs out as
expected, but on local sessions bash always crashes.

see also launchpad bug:

https://bugs.launchpad.net/ubuntu/+source/kdebase-kde4/+bug/254943
(screenshot attatchment on the launchpad report)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/5

------------------------------------------------------------------------
On 2008-08-10T22:04:34+00:00 Kurt Hindenburg wrote:

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.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/6

------------------------------------------------------------------------
On 2008-11-19T20:25:30+00:00 FiNeX wrote:

Changed severity to "crash". I hope to have selected only the right bugs
(>100) :-)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/8

------------------------------------------------------------------------
On 2010-02-24T12:49:31+00:00 bugfoot wrote:

This Bug/Crash is still valid in KDE4.4.0.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/10

------------------------------------------------------------------------
On 2010-07-26T16:25:02+00:00 Marcel Partap wrote:

...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?...

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/11

------------------------------------------------------------------------
On 2010-11-08T16:38:37+00:00 Shlomi Fish wrote:

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)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/12

------------------------------------------------------------------------
On 2010-12-03T16:37:01+00:00 Shlomi Fish wrote:

(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?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/13

------------------------------------------------------------------------
On 2011-01-20T16:46:18+00:00 B-kde-bugs-3 wrote:

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

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/14

------------------------------------------------------------------------
On 2011-02-23T20:51:24+00:00 Marcel Partap wrote:

Rejoice, oh plagued ones! Honestly think this has been fixed as it can't
be reproduced since a while...

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/15

------------------------------------------------------------------------
On 2011-02-24T11:34:56+00:00 B-kde-bugs-3 wrote:

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

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/16

------------------------------------------------------------------------
On 2011-03-18T09:54:28+00:00 3-dedel-2 wrote:

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.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/17

------------------------------------------------------------------------
On 2011-03-18T10:02:07+00:00 B-kde-bugs-3 wrote:

is there not a sigele kde programmer here ?

(look at my previus comment)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/18

------------------------------------------------------------------------
On 2011-08-02T15:57:35+00:00 adaptee wrote:

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? .

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/19

------------------------------------------------------------------------
On 2011-08-02T17:21:52+00:00 adaptee wrote:

*** Bug 249546 has been marked as a duplicate of this bug. ***

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/20

------------------------------------------------------------------------
On 2011-08-03T14:48:19+00:00 B-kde-bugs-3 wrote:

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

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/21

------------------------------------------------------------------------
On 2012-09-23T07:06:31+00:00 Adrián Chaves Fernández wrote:

Any news regarding this?

Michel, you should use the ReviewBoard for patches:
https://git.reviewboard.kde.org/

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/254943/comments/22

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to kdebase in Ubuntu.
https://bugs.launchpad.net/bugs/254943

Title:
  screen's 'power detach' (ctrl+a DD) causes Warning: Program
  '/bin/bash' crashed error, and bash does indeed crash

To manage notifications about this bug go to:
https://bugs.launchpad.net/kde-baseapps/+bug/254943/+subscriptions




More information about the kubuntu-bugs mailing list