'w' counts users logged out from a tty

Bug #263792 reported by John Hubbard
4
Affects Status Importance Assigned to Milestone
procps (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

jhubbard@jhubbard-server:~$ w
 16:16:46 up 33 days, 8:07, 2 users, load average: 0.51, 0.30, 0.21
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
jhubbard :0 - 25Aug08 ?xdm? 18:55 0.10s /bin/sh /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/xserverrc

I think that title says it all. There are claims that there are two users logged in but only one user is listed.

jhubbard@jhubbard-server:~$ ps au
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 5152 0.0 0.0 3864 584 tty4 Ss+ Jul30 0:00 /sbin/getty 38400 tty4
root 5153 0.0 0.0 3864 588 tty5 Ss+ Jul30 0:00 /sbin/getty 38400 tty5
root 5155 0.0 0.0 3864 588 tty2 Ss+ Jul30 0:00 /sbin/getty 38400 tty2
root 5158 0.0 0.0 3864 588 tty3 Ss+ Jul30 0:00 /sbin/getty 38400 tty3
root 5159 0.0 0.0 3864 588 tty6 Ss+ Jul30 0:00 /sbin/getty 38400 tty6
root 5621 0.6 2.0 151788 81416 tty7 SLs+ Jul30 294:09 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/xauth/A:0-7foOCA
root 25042 0.0 0.0 3864 584 tty1 Ss+ Aug17 0:00 /sbin/getty 38400 tty1
jhubbard 30698 0.0 0.1 21120 4096 pts/0 Ss 12:21 0:00 /bin/bash
jhubbard 31540 0.0 0.0 15064 1092 pts/0 R+ 16:18 0:00 ps au

ps au also confirms that the only programs running are owned by me (jhubbard) or root. My other computers ignore the root user when listing the number of users in 'w' or 'uptime'.

All this shows is the problem. I have no idea what would explain why it came about. Let me know what other information is needed.

:: Test Case ::
- open a terminal and run w . See number of users in the header and line count are identical
- switch to a tty (ctrl+alt+F1) and login. run w . See number of users in the header and line count are identical
- logout from this tty and switch back to X (ALT+F7). See number of users in the header is greater than the line count in the detail.

Revision history for this message
John Hubbard (ender8282) wrote :

OK I have a little more information. It turns out that it is not registering people logging out of tty~tty6. If I log into tty1 it will show the correct number of users logged in and those users logged in to the correct places. When I log out of tty1 it still shows that the user is logged in. I don't know if this helps at all. I have still not rebooted, and am still running 2.6.24-19-generic x86_64.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage . I have classified this bug as a bug in procps.
For future reference you might be interested to know that a lot of applications have bug reporting functionality built in to them. This can be accessed via the Report a Problem option in the Help menu for the application with which you are having an issue. You can learn more about this feature at https://wiki.ubuntu.com/ReportingBugs.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

This is reproducible in Intrepid.
~$ lsb_release -rd;apt-cache policy procps
Description: Ubuntu intrepid (development branch)
Release: 8.10
procps:
  Installed: 1:3.2.7-9ubuntu1

Changed in procps:
status: New → Confirmed
description: updated
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Definitely not a bug in procps utils but with the way upstart handles utmp . See bug 183729 . I'm marking this report as duplicate.

Thanks for your help and don't hesitate to submit any new bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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