Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Jan 1999 00:41:00 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        rch@iserve.net (Robert Hough)
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: pwd.db corruption
Message-ID:  <199901310041.RAA27222@usr04.primenet.com>
In-Reply-To: <199901301918.OAA00767@zoe.iserve.net> from "Robert Hough" at Jan 30, 99 02:20:00 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901310041.RAA27222>