Bug 109243 - utmp file grows
utmp file grows
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: util-linux (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-05 19:42 EST by Pete
Modified: 2007-04-18 12:59 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-20 16:10:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Pete 2003-11-05 19:42:46 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; 
Q312461)

Description of problem:
Entries in the /var/run/utmp file are never removed when a user 
logs out and the file continues to grow.  When a user logs out, 
ut_type is set to DEAD_PROCESS and several of the other fields are 
set to NULL but the entry itself remains.  This can be verified
by running utmpdump...  For systems that are not rebooted for
a long time (6-12 months) this file grows very large.  

Is this expected behavior?  If so why? I expect a user's entry to be 
removed when they logout.

I have confirmed this behavior for both telnet and rlogin.

Thanks,

/Pete

Version-Release number of selected component (if applicable):
util-linux-2.11y-9

How reproducible:
Always

Steps to Reproduce:
1.login with either telnet or rlogin
2.utmpdump
3.logout
4.utmpdump
    

Actual Results:  My entry in utmp remained but the value of certain 
fields was changed
as described above.

Expected Results:  My expectation is that the entry would be removed 
when I logout.


Additional info:
Comment 1 Pete 2003-11-07 12:41:37 EST
After looking into this problem more, I have found that /bin/login
is not re using previous entries in the utmp file for the same tty.
For example, if I login and logout on tty /dev/pts/0 multiple times 
in a row a new entry is added to the end of the utmp file each time.
Looking at login.c this should not happen.  login.c looks
for a matching pid or tty and uses that entry.  What is really
strange is I downloaded the sourse (util-linux-2.11y-9.src.rpm),
compiled a new login and replaced /bin/login with it and the problem
goes away. With the new login, entries are reused if the tty is the
same.   Please advise...and thanks for any help ..... Pete
Comment 2 Elliot Lee 2003-12-17 14:05:48 EST
Any x86_64 stuff involved here? That's the only explanation I know of.
Comment 3 Pete 2003-12-22 12:55:19 EST
No this is a 32 bit P4.

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