From owner-freebsd-hackers Sat Jan 30 16:41:13 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA14232 for freebsd-hackers-outgoing; Sat, 30 Jan 1999 16:41:13 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp01.primenet.com (smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA14227 for ; Sat, 30 Jan 1999 16:41:10 -0800 (PST) (envelope-from tlambert@usr04.primenet.com) Received: (from daemon@localhost) by smtp01.primenet.com (8.8.8/8.8.8) id RAA03790; Sat, 30 Jan 1999 17:41:09 -0700 (MST) Received: from usr04.primenet.com(206.165.6.204) via SMTP by smtp01.primenet.com, id smtpd003748; Sat Jan 30 17:41:03 1999 Received: (from tlambert@localhost) by usr04.primenet.com (8.8.5/8.8.5) id RAA27222; Sat, 30 Jan 1999 17:41:01 -0700 (MST) From: Terry Lambert Message-Id: <199901310041.RAA27222@usr04.primenet.com> Subject: Re: pwd.db corruption To: rch@iserve.net (Robert Hough) Date: Sun, 31 Jan 1999 00:41:00 +0000 (GMT) Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: <199901301918.OAA00767@zoe.iserve.net> from "Robert Hough" at Jan 30, 99 02:20:00 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I'm running a machine with FreeBSD 2.2.2-RELEASE and about 4 times now, the > pwd.db file has become corrupt. When this happens, it wont authenticate > anyone, and I have to reboot into single user mode, remove the pwd.db > (rename it to pwd.old basically), and add a new user. After a reboot, it is > fine, untill it happens again. Can someone give me some pointers on how to > correct this problem? Is it a known bug in 2.2.2? I've already decided to > upgrade the machine to later build, but that will be on a completely new > machine, untill then I'd like to at least make sure this doesn't pop up on > me again, or worse, when I'm not around to fix it. This is a known bug, having to do with the reclaim of mmap'ed pages and their reuse before they have been disaaciated from all of the objects that reference them. The problem is exacerbated by cron, which modifies the return values in the read-only pages pointed to by the static struct passwd that's passed back (they point into the entries in the passwd database). After the COW fault on the pages, they tend to get written back after a reclaim. I most frequently see this as a corrupt crontab; it really depends on what's running and what file is having pages thrashed in and out of core. Upgrading to 4.0-current appears to fix this. There are a number of bugs in 3.0 that aren't in the 3.0-stable branch; a shirt tail relative of this bug os one of them. The 4.0 fixes that haven't been back-ported to 3.0-STABLE are probably enough, at this point, to justify using 4.0. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message