libvte9 fails to record utmp/login entries

Bug #864609 reported by Janne Snabb
46
This bug affects 6 people
Affects Status Importance Assigned to Milestone
vte (Debian)
Fix Released
Unknown
vte (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When using xfce4-terminal (0.4.8-1) on freshly installed Xubuntu 11.10 beta2 x86_64 no utmp entries are being recorded.

On the same machine login, sshd, screen, xterm and gnome-terminal all record utmp entries successfully.

This is an example output of "w" and "who" run on a machine with several xfce4-terminals open:

snabb@oil:~$ w
 19:47:37 up 2:32, 0 users, load average: 0.52, 2.00, 2.81
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
snabb@oil:~$ who am i
snabb@oil:~$ who -a
           system boot 2011-10-02 17:15
           run-level 2 2011-10-02 17:15
LOGIN tty4 2011-10-02 17:15 1255 id=4
LOGIN tty5 2011-10-02 17:15 1259 id=5
LOGIN tty2 2011-10-02 17:15 1266 id=2
LOGIN tty3 2011-10-02 17:15 1268 id=3
LOGIN tty6 2011-10-02 17:15 1274 id=6
LOGIN tty1 2011-10-02 17:15 2198 id=1
snabb@oil:~$

This is an example output when xterm is being used (with one window open). It can be seen that xterm records utmp entries successfully:

snabb@oil:~$ w
 19:49:47 up 2:34, 1 user, load average: 0.32, 1.38, 2.48
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
snabb pts/14 :0.0 19:49 0.00s 0.33s 0.01s w
snabb@oil:~$ who am i
snabb pts/14 2011-10-02 19:49 (:0.0)
snabb@oil:~$ who -a
           system boot 2011-10-02 17:15
           run-level 2 2011-10-02 17:15
LOGIN tty4 2011-10-02 17:15 1255 id=4
LOGIN tty5 2011-10-02 17:15 1259 id=5
LOGIN tty2 2011-10-02 17:15 1266 id=2
LOGIN tty3 2011-10-02 17:15 1268 id=3
LOGIN tty6 2011-10-02 17:15 1274 id=6
LOGIN tty1 2011-10-02 17:15 2198 id=1
snabb + pts/14 2011-10-02 19:49 . 10462 (:0.0)
snabb@oil:~$

Some additional observations:

- I am surprised that gnome-terminal does NOT exhibit this problem. I thought that both xfce4-terminal and gnome-terminal just use libvte routines for utmp handling.

- utmp was recently moved to /run/utmp. Maybe this is related?

I will add additional details to this report in case I notice something useful.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: xfce4-terminal 0.4.8-1
ProcVersionSignature: Ubuntu 3.0.0-12.19-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
ApportVersion: 1.23-0ubuntu2
Architecture: amd64
Date: Sun Oct 2 19:42:57 2011
InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110920.2)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: xfce4-terminal
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Janne Snabb (snabb) wrote :
Revision history for this message
Janne Snabb (snabb) wrote :

Some additional details about this bug:

I run "strace -o trace.out -f xfce4-terminal" and found the following:

6828 execve("/usr/lib/vte/gnome-pty-helper", ["gnome-pty-helper"], [/* 54 vars */]) = -1 ENOENT (No such file or directory)

On my system "locate gnome-pty-helper" tells me the following:

/usr/lib/libvte2-90/gnome-pty-helper
/usr/lib/libvte9/gnome-pty-helper

Thus the path of gnome-pty-helper is wrong somewhere.

I also tried "strace -o trace.out -f gnome-terminal" for comparison. In that case the path of gnome-pty-helper is correct:

9000 execve("/usr/lib/libvte2-90/gnome-pty-helper", ["gnome-pty-helper"], [/* 50 vars */]) = 0

Revision history for this message
Janne Snabb (snabb) wrote :

Looks like libvte9 package is internally using an incorrect path for gnome-pty-helper. libvte-2.90-9 package of the same library is using the correct path. gnome-terminal updates utmp successfully because it is using the latter library.

libvte9 tries to run /usr/lib/vte/gnome-pty-helper but installs /usr/lib/libvte9/gnome-pty-helper.

The following shows the incorrect path in libvte.so.9 and the correct path in libvte2_90.so.9:

$ strings /usr/lib/libvte.so.9 | fgrep /gnome-pty-helper
/usr/lib/vte/gnome-pty-helper
$ strings /usr/lib/libvte2_90.so.9 | fgrep /gnome-pty-helper
/usr/lib/libvte2-90/gnome-pty-helper

This shows where these packages have installed their gnome-pty-helper:

$ dpkg -S gnome-pty-helper
libvte9: /usr/lib/libvte9/gnome-pty-helper
libvte-2.90-9: /usr/lib/libvte2-90/gnome-pty-helper

As a workaround I made a symbolic link such as follows:

$ ln -s libvte9 /usr/lib/vte
$ ls -la /usr/lib/vte
lrwxrwxrwx 1 root root 7 2011-10-12 20:14 /usr/lib/vte -> libvte9

...and that solves the problem for me. xfce4-terminal now correctly adds utmp entries.

These are the installed libvte package versions:

$ apt-cache policy libvte9 libvte-2.90-9
libvte-2.90-9:
  Installed: 1:0.28.2-0ubuntu2
  Candidate: 1:0.28.2-0ubuntu2
  Version table:
 *** 1:0.28.2-0ubuntu2 0
        500 http://kh.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status
libvte9:
  Installed: 1:0.28.2-0ubuntu2
  Candidate: 1:0.28.2-0ubuntu2
  Version table:
 *** 1:0.28.2-0ubuntu2 0
        500 http://kh.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status

affects: xfce4-terminal (Ubuntu) → vte (Ubuntu)
summary: - xfce4-terminal fails to record utmp/login entries
+ libvte9 fails to record utmp/login entries
Changed in vte (Debian):
status: Unknown → New
Revision history for this message
Janne Snabb (snabb) wrote :

See attached patch.

Move the gnome-pty-helper into the -common package and install
only a single copy of this set-gid binary in /usr/lib/libvte.

The downside of this approach is that the -common package becomes
architecture specific.

I submitted this to the Debian bug also.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "vte-pty-helper-path.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vte (Ubuntu):
status: New → Confirmed
Revision history for this message
Thomas Schiex (thomas-schiex) wrote :

This bug has bad side-effects on others applications that use utmp. Of course thismeans users and who are not correct but the timekpr is also affected making parental control unavailable in xubuntu.

Changed in vte (Debian):
status: New → Fix Released
Revision history for this message
Janne Snabb (snabb) wrote :

How about updating libvte (1:0.28.2-4) now from Debian when there is still time remaining before the various freezes start in release schedule?

It would be nice to have a working terminal application in the next Xubuntu release.

The debian maintainer fixed the broken packaging already more than a month ago...

Revision history for this message
Janne Snabb (snabb) wrote :

This bug still exists on Xubuntu 12.04 "precise" as released, version information below:

$ apt-cache policy libvte9
libvte9:
  Installed: 1:0.28.2-3ubuntu2
  Candidate: 1:0.28.2-3ubuntu2
  Version table:
 *** 1:0.28.2-3ubuntu2 0
        500 http://kh.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

The symlink workaround from my comment #3 still fixes the problem.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vte - 1:0.28.2-5ubuntu1

---------------
vte (1:0.28.2-5ubuntu1) quantal; urgency=low

  * Resynchronise with Debian (libexecdir fix closes LP: #864609).
    Remaining changes:
    - debian/patches/91_keep_fds.patch:
      - vte does not support G_SPAWN_LEAVE_DESCRIPTORS_OPEN when calling
        vte_terminal_fork_command_full().
    - debian/patches/93_add_alt_screen_scroll_toggle.patch:
      - Handle scrolling differently when using alternate screen or
        scrolling is restricted.
    - debian/patches/lp246701_scroll_region_updates.patch:
      - Fix update glitch related to scroll regions.
    - debian/patches/backscroll-stream-mem.patch:
      - Provide a memory-based scrollback stream backend to avoid hitting
        disk with terminal contents.
  * Add version for vte_terminal_set_alternate_screen_scroll to
    libvte9.symbols (probably a bit too tight, but due to changelog
    truncation this is the best I could readily manage).

vte (1:0.28.2-5) unstable; urgency=medium

  * Update repository URL.
  * 03_CVE-2012-2738.patch, 04_CVE-2012-2738.patch: backport upstream
    patches to fix a memory exhaustion vulnerability. Closes: #677717.

vte (1:0.28.2-4) unstable; urgency=low

  * debian/control.in:
    - Remove obsolete Conflicts and Replaces.
  * debian/rules:
    - Correctly pass libexecdir to configure so libvte has the correct path to
      gnome-pty-helper. Closes: #645104
  * Add symbols file for libvte9 for improved shlibs dependencies and bump
    shlibs accordingly. Closes: #633798
 -- Colin Watson <email address hidden> Tue, 09 Oct 2012 02:55:15 +0100

Changed in vte (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.