Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 219964 - x11-terms/gnome-terminal-2.22.1 doesn't kill bash processes on tab close
Summary: x11-terms/gnome-terminal-2.22.1 doesn't kill bash processes on tab close
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: x86 Linux
: High minor
Assignee: Gentoo Linux Gnome Desktop Team
URL: http://bugzilla.gnome.org/show_bug.cg...
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks: gnome2.22-tracker
  Show dependency tree
 
Reported: 2008-05-01 20:21 UTC by David Hardstone
Modified: 2008-08-03 17:57 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix killing of shell when tab is closed (gnome-terminal-2.22.3-tab-close-fix.patch,1.00 KB, patch)
2008-08-02 04:24 UTC, Arun Raghavan (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Hardstone 2008-05-01 20:21:04 UTC
I keep a fairly close eye on my running processes in GNOME's System Monitor and since I upgraded to GNOME 2.22, I noticed that when I close a tab within gnome-terminal-2.22.1 (aswell as 2.22.0), gnome-terminal doesn't kill the bash process, nor it's child processes.
Typing the command 'exit' into the terminal closes the tab and kills the bash process as you'd expect.

When you do a lot in the terminal (as most of us happy Gentoo users do), these idle bash processes do tend to build up until you close GNOME terminal (and they are all killed with the closing of the program).

Reproducible: Always

Steps to Reproduce:
1. Open up System Monitor's 'Processes' tab and make sure 'Dependencies' is enabled (Ctrl+D)
2. Open GNOME Terminal & Open up a new tab (Ctrl+Shift+T)
3. Note the two bash processes running under gnome-terminal
4. Close one of the tabs within GNOME Terminal
5. Look back at the process list and note that there are still two bash processes running.

Actual Results:  
Bash processes aren't killed like they should be when tabs are closed.


emerge --info

Portage 2.1.4.4 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r4 i686)
=================================================================
System uname: 2.6.24-gentoo-r4 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Timestamp of tree: Thu, 01 May 2008 16:15:03 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=i686 -O2 -pipe -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=i686 -O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_GB.UTF-8"
LINGUAS="en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa avahi avi bitmap-fonts bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dlloader dri dvb dvd dvdnav dvdr dvdread eds emboss encode esd evo exif fam ffmpeg firefox flac fortran gdbm gif glitz gnome gpm gstreamer gtk hal iconv id3tag ieee1394 ipv6 isdnlog jack java jpeg kde kerberos ldap libg++ libnotify mad md5 midi mikmod mime mmx mp3 mp4 mpeg mplayer msn mudflap nautilus ncurses nls nptl nptlonly nsplugin ntfs nvidia ogg opengl openmp pam pcre pdf perl png portage ppds pppd python qt3 qt3support qt4 quicktime rar readline real reflection samba sdl session shorten sndfile sox spell spl ssl startup-notification subversion svg symlink tcl tcpd threads tiff tk truetype truetype-fonts type1-fonts udev unicode usb vorbis win32codecs x86 xcomposite xine xml xorg xscreensaver xulrunner xv xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Eric Chatellier 2008-05-01 22:13:13 UTC
Same bug here
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-05-01 23:16:50 UTC
indeed, doesn't happen if you type exit or hit ctrl+d in the term. Please report this upstream.
Comment 3 Rémi Cardona (RETIRED) gentoo-dev 2008-05-02 06:27:50 UTC
And please add gnome@gentoo.org as a CC on that bug so that we can keep track of it.

Thanks
Comment 4 Pacho Ramos gentoo-dev 2008-05-02 17:31:15 UTC
It was already reported by other but seems not too active :-(
Comment 5 Pacho Ramos gentoo-dev 2008-05-02 17:31:32 UTC
It was already reported by other but seems not too active :-(
http://bugzilla.gnome.org/show_bug.cgi?id=509866
Comment 6 David Hardstone 2008-05-02 17:46:39 UTC
I've added gnome@gentoo.org and myself to the CC list for the bug on GNOME's bugzilla.
Comment 7 Rahul Jain 2008-07-25 11:06:38 UTC
I am on x11-terms/gnome-terminal-2.22.3 and have not encountered this bug. I would guess it is fixed then.
Comment 8 David Hardstone 2008-07-25 15:15:08 UTC
Yep, x11-terms/gnome-terminal-2.22.3 appears to have fixed it for me too :)!
Comment 9 Arun Raghavan (RETIRED) gentoo-dev 2008-07-25 15:24:38 UTC
How exactly are you guys trying to reproduce this? Because I still get this error with 2.22.3.
Comment 10 David Hardstone 2008-07-25 18:15:57 UTC
Oh, I apologise. I've got used to pressing Ctrl+D to close tabs and I suppose I wasn't thinking when seeing whether the bug was still there.

When I close the tab with the mouse or Shift+Ctrl+W, the bug is reproduced like normal.
Comment 11 Rahul Jain 2008-07-26 09:52:44 UTC
rahul@wall ~ $ ps -ef | grep tail
rahul     2529  2476  0 11:50 pts/0    00:00:00 tail -f /var/log/debug
rahul     2531  2493  0 11:50 pts/1    00:00:00 grep --colour=auto tail

After I close the terminal, clicking on the X. :)
rahul@wall ~ $ ps -ef | grep tail
rahul     2533  2493  0 11:51 pts/1    00:00:00 grep --colour=auto tail

So, it is killed for me. I do not have this bug.
Comment 12 Rahul Jain 2008-07-26 10:14:21 UTC
By the way, here is my emerge --info. Maybe this would help.
Portage 2.2_rc3 (default/linux/x86/2008.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.25-tuxonice-r6 i686)
=================================================================
System uname: Linux-2.6.25-tuxonice-r6-i686-Genuine_Intel-R-_CPU_T2300_@_1.66GHz-with-glibc2.0
Timestamp of tree: Fri, 25 Jul 2008 18:15:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r5
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"
LANG="C"
LDFLAGS="-Wl,-O1"
LINGUAS="hi en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage/layman/desktop-effects /usr/local/portage/layman/mpd /usr/local/portage/layman/zen-overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa avahi bash-completion berkdb bluetooth branding bzip2 cairo cdparanoia cdr cli cracklib crypt css ctype cups curl curlwrappers cxx dbus dga djvu dri dts dvd dvdr esd exif fam fbcon ffmpeg flac fontconfig fortran gd gdbm gif gimp gnome gnutls gphoto2 gpm graphviz gstreamer gtk gtkhtml hal hddtemp iconv ieee1394 imagemagick ipv6 isdnlog java java6 javascript joystick jpeg jpeg2k libnotify lm_sensors mad midi mmx mono motif mp3 mpeg mudflap ncurses nls nptl nptlonly ogg openmp oss pam pcmcia pcre perl png posix ppds pppd python quicktime readline real reflection samba scanner session smp sndfile spell spl sse sse2 sse3 ssl startup-notification svg svga syslog tcpd theora threads tiff truetype type1 unicode usb v4l v4l2 vcd vim-syntax vorbis wavpack win32codecs wmf x86 xcomposite xinerama xml xorg xpm xscreensaver xulrunner xv xvid zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="hi en" USERLAND="GNU" VIDEO_CARDS="i810 v4l fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 13 Arun Raghavan (RETIRED) gentoo-dev 2008-07-26 10:20:00 UTC
Here's what I do:
----
arun@peripatetic ~ $ ps -ef | grep pts | grep bash
arun      7620  7603  0 10:00 pts/0    00:00:01 -bash
arun     32479  7620  0 15:44 pts/0    00:00:00 grep --colour=auto bash
----
(open a new tab)
arun@peripatetic ~ $ ps -ef | grep pts | grep bash
arun      7620  7603  0 10:00 pts/0    00:00:01 -bash
arun     32480  7603  8 15:44 pts/1    00:00:00 -bash
arun     32536  7620  0 15:44 pts/0    00:00:00 grep --colour=auto bash
----
(close the tab by pressing the button)
arun@peripatetic ~ $ ps -ef | grep pts | grep bash
arun      7620  7603  0 10:00 pts/0    00:00:01 -bash
arun     32480  7603  3 15:44 pts/1    00:00:00 -bash
arun     32539  7620  0 15:44 pts/0    00:00:00 grep --colour=auto bash
----
The bash process with PID 32480 should have been killed when the tab was closed.
Comment 14 Rahul Jain 2008-07-26 11:09:47 UTC
Right you are then. The bug only affects tabs gnome-terminal. So, if a new tab is opened and when that tab is closed, the process is not killed.
Could you try this out and test this.
Comment 15 Arun Raghavan (RETIRED) gentoo-dev 2008-07-26 12:44:43 UTC
(In reply to comment #14)
> Right you are then. The bug only affects tabs gnome-terminal. So, if a new tab
> is opened and when that tab is closed, the process is not killed.
> Could you try this out and test this.

Yep, the problem seems to occur only with closing tabs, not terminals. But if you've got a terminal open with 2 tabs, and you close one tab, then close the terminal, the bash process from the first tab you closed will continue to exist.
Comment 16 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-07-31 23:35:31 UTC
I doubt upstream will work on a patch given the large changes in 2.23, however it shouldn't be to hard to bisect between 2.20 branch and 2.22 to find out what broke this.
Comment 17 Arun Raghavan (RETIRED) gentoo-dev 2008-08-02 04:24:08 UTC
Created attachment 161951 [details, diff]
Patch to fix killing of shell when tab is closed

Here's a slightly modified version of the patch posted upstream. Seems to work.

@herd: is this okay to commit, or should we just wait for 2.24? I vote to commit, since having a lot of stray bash processes hanging around is no fun. :)
Comment 18 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-08-02 08:58:56 UTC
No way we want to wait 2.24, you can add this in a r1 when you get a decent net connection or I'll do it asap. Thanks for doing the investigation work with bheekling.
Comment 19 Nirbheek Chauhan (RETIRED) gentoo-dev 2008-08-02 19:38:36 UTC
(In reply to comment #18)
> No way we want to wait 2.24, you can add this in a r1 when you get a decent net
> connection or I'll do it asap.

Hum. I don't think Arun is going to get a decent connection anytime soon. I think the best thing is for you to commit it asap.

Comment 20 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-08-03 17:57:45 UTC
commited in r1, thanks again guys.