Re: Memory Mystery..

Chris Adams (cadams@ro.com)
21 Oct 1998 11:31:57 -0500


Once upon a time, Dean Henrichsmeyer <rdhenri@ilstu.edu> said:
>I've come acrossed an odd reoccuring problem which I cannot solve. With
>kernels say..121 through 125, everything will be fine for about 8 days or
>so, then when I do something like a 'who', I get "Memory Exhausted" or a

There is a bug in utmp entry creation, at least under Red Hat 5.1.
/bin/login expects an entry in utmp to already exist with its PID and pty
filled in with the status set to LOGIN_PROCESS. However, in.telnetd and
in.rlogind, which call /bin/login, don't create such an entry. So,
/bin/login just adds a new entry to the end all the time, causing the utmp
file to grow forever.

This will make who (and w) take longer and longer to display anything the
longer your system is up and running.

I have a couple of patches to telnetd and rlogind that create the utmp
entry before calling /bin/login available at http://ro.com/~cadams/rh51/
(it is arguable that /bin/login should also be patched, but I didn't do
that).

-- 
Chris Adams - cadams@ro.com
System Administrator - Renaissance Internet Services
I don't speak for anybody but myself - that's enough trouble.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/