Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 165193 - [RHEL-4] gnome-pty-helper doesn't clean up gnome-terminals' utmp/wtmp entries when killed
[RHEL-4] gnome-pty-helper doesn't clean up gnome-terminals' utmp/wtmp entries...
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: vte (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Behdad Esfahbod
Depends On:
  Show dependency treegraph
Reported: 2005-08-05 04:27 EDT by Bastien Nocera
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2007-0219
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-05-01 13:14:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
vte-0.11.11-pty-helper-utmp-update.patch (1.44 KB, patch)
2006-12-19 06:24 EST, Bastien Nocera
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0219 normal SHIPPED_LIVE vte bug fix update 2007-05-01 13:14:00 EDT

  None (edit)
Description Bastien Nocera 2005-08-05 04:27:04 EDT
+++ This bug was initially created as a clone of Bug #159363 +++

Description of problem:
The utmp entries of gnome-terminals run under vnc don't get cleaned up if the
vnc session is killed via 'vncserver -kill <display>'. This is because vncserver
doesn't just kill the gnome-terminals as a user would, but rather kills all
child processes, which includes gnome-pty-helper. gnome-pty-helper just dies,
leaving the stale utmp/wtmp entries to potentially confuse subsequent users of
'/bin/who -u', which isn't supposed to show entries for dead processes.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
(This occurs naturally when a vncserver running gnome-terminals is killed using
'vncserver -kill <display number>' but the below process is much simpler)
1. start a gnome-terminal (note the tty)
2. kill both the gnome-terminal and gnome-pty-helper with SIGHUP
3. check 'who -u' output
Actual results:
The entry for the gnome-terminal is still there although the terminal is gone

Expected results:
No 'who -u' output for dead gnome-terminal

Additional info:
I've seen the gnome-terminal get SIGPIPE and as a result send SIGTERM to
gnome-pty-helper and I've also seen gnome-pty-helper get SIGHUP from (I guess)

Patch from Dave Lehman <dlehman@redhat.com> at:
Comment 1 Bastien Nocera 2005-08-05 04:28:04 EDT
Patch was committed to HEAD upstream.
Comment 9 Bastien Nocera 2006-04-03 06:32:46 EDT
The original patch was broken (ie. doing nasty things in the signal handler).
This upstream patch (on top of the old one) should fix it:

Ray, let me know if you need the final patch backported.
Comment 10 Behdad Esfahbod 2006-07-27 17:36:06 EDT
Bastien, can you attach a final patch?
Comment 12 RHEL Product and Program Management 2006-08-18 13:28:34 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 13 Bastien Nocera 2006-12-19 06:24:21 EST
Created attachment 143990 [details]

Untested patch.
Comment 14 Bastien Nocera 2006-12-19 06:30:30 EST
I also included the patch from:

Patch compiles fine.
Comment 18 Behdad Esfahbod 2006-12-20 13:53:49 EST
Comment 24 Red Hat Bugzilla 2007-05-01 13:14:02 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.