From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 6 02:39:06 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40B2F16A4CE for ; Sun, 6 Jun 2004 02:39:06 -0700 (PDT) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58A7E43D3F for ; Sun, 6 Jun 2004 02:39:04 -0700 (PDT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.12.9p2/8.12.9) with ESMTP id i569clca036470 for ; Sun, 6 Jun 2004 13:38:47 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.12.9p2/8.12.9/Submit) id i569clP9036469 for hackers@freebsd.org; Sun, 6 Jun 2004 13:38:47 +0400 (MSD) (envelope-from yar) Date: Sun, 6 Jun 2004 13:38:47 +0400 From: Yar Tikhiy To: hackers@freebsd.org Message-ID: <20040606093847.GA33286@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: A subtle libstand bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jun 2004 09:39:06 -0000 Hi there, I'm sorry to report the problem I observed in so little detail, but OTOH I feel I must notify the community about it. I'm afraid there's too little detail for a PR. Yesterday I did binary upgrade of my home system, from 4.9-R to 4.10-R. Then I merged my old /etc into the new one. Of course, I just did "mv /etc.old/fstab /etc". After that, the kernel started to ask for the root device. Having played with loader(8) in the past, I concluded that something was wrong with my /etc/fstab, because I knew loader(8) would consult it for the root device name to pass to the kernel. I added some debugging printfs to getrootmount(), in sys/boot/common/boot.c, and saw that /etc/fstab was opened OK, but nothing could be read from it as though it was empty. At the same time, fsck reported no errors in the file system. And then I did a mistake: I issued, "cp /etc/fstab /etc/fstab2 && mv /etc/fstab2 /etc/fstab". The problem vanished, and I could reproduce it no more. >From this experience I suppose that there is a subtle bug in libstand that must be related to reading FFS directories or inodes. A libstand wizard might have insight into it. -- Yar