From owner-freebsd-stable Sat Dec 11 14: 6:58 1999 Delivered-To: freebsd-stable@freebsd.org Received: from pluto.psn.net (pluto.psn.net [207.211.58.12]) by hub.freebsd.org (Postfix) with ESMTP id BD64114DB6 for ; Sat, 11 Dec 1999 14:06:56 -0800 (PST) (envelope-from will@shadow.blackdawn.com) Received: from 17-044.008.popsite.net ([209.69.196.44] helo=shadow.blackdawn.com) by pluto.psn.net with esmtp (PSN Internet Service 3.03 #1) id 11wufG-0005cW-00; Sat, 11 Dec 1999 15:06:55 -0700 Received: (from will@localhost) by shadow.blackdawn.com (8.9.3/8.9.3) id RAA22500; Sat, 11 Dec 1999 17:06:51 -0500 (EST) (envelope-from will) Message-ID: X-Mailer: XFMail 1.3.1 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <199912111826.MAA01536@alecto.physics.uiuc.edu> Date: Sat, 11 Dec 1999 17:06:51 -0500 (EST) Reply-To: Will Andrews From: Will Andrews To: Igor Roshchin Subject: RE: problem with wtmp in 3.x family Cc: stable@FreeBSD.ORG Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 11-Dec-99 Igor Roshchin wrote: > I am not sure if this problem has been discussed here, > but I could not find it in the archives, although I know > a few people besides me who observed this problem. > There is a bug which seems to exist in the 3.x family of FreeBSD. > I haven't seen it in 2.x, and I observe it on a 3.1-stable > (19990412) box, as well as on a 3.3-RELEASE box. I see a similar problem in 3.3-STABLE (Nov 16) & 4.0-CURRENT (Sept 29). > 1. The record in wtmp file is not updated properly. > This seems to be happening when the connection dies (e.g. "reset by peer"), > say, when a people connected from a ppp-via-dialup host gets kicked > off by a modem, and the connection is not disconneted properly. > > 2. The utmp record is not updated either. > So, "w" shows a person being logged in, even though there are no processes > running on that tty. (accordingly w shows "-" as a current process). > When somebody else logs in on that tty, the utmp record is updated, > but not the wtmp one. > > In most cases, if not in all, the users use "screen". > I am not sure if the use of screen is necessary condition or just > a coinsidence. In my case, things are a little different. I have X11 + WindowMaker setup to run a rxvt w/ top & xtail /var/log whenever it starts up. I never kill these apps, so WindowMaker does the job. Unfortunately, the utmp & wtmp logs are affected as you say above: <2 5001-0> (99-12-11 17:02:42) [will@shadow ~]% w 5:02PM up 6 days, 19:40, 9 users, load averages: 1.02, 1.08, 1.07 USER TTY FROM LOGIN@ IDLE WHAT will v0 - 12:59PM 4:03 xinit /home/will/.xini will p0 unix:0 12:59PM 6days top will p1 unix:0 12:59PM 27days xtail /var/log Note that ttyp1's idle time is 27 days whereas my system uptime is only 6 days. Also note that I've only been running X for 4 hours. Because WindowMaker unconditionally kills these rxvt's, the utmp & wtmp files are not cleaned up properly, and I get a result like the above. Seems rather peculiar.. and you now know it's not restricted to `screen`. I'm almost 100% certain that the cause here is the improper writing of certain utmp and wtmp functions. -- Will Andrews GCS/E/S @d- s+:+>+:- a--->+++ C++ UB++++ P+ L- E--- W+++ !N !o ?K w--- ?O M+ V-- PS+ PE++ Y+ PGP+>+++ t++ 5 X++ R+ tv+ b++>++++ DI+++ D+ G++>+++ e->++++ h! r-->+++ y? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message