Bug 109243 - utmp file grows
Summary: utmp file grows
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: util-linux
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-06 00:42 UTC by Pete
Modified: 2007-04-18 16:59 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-08-20 20:10:08 UTC
Embargoed:


Attachments (Terms of Use)

Description Pete 2003-11-06 00:42:46 UTC
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 17:41:37 UTC
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 19:05:48 UTC
Any x86_64 stuff involved here? That's the only explanation I know of.

Comment 3 Pete 2003-12-22 17:55:19 UTC
No this is a 32 bit P4.


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