From owner-freebsd-questions@FreeBSD.ORG Sun Jul 28 05:46:12 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CFF598A3 for ; Sun, 28 Jul 2013 05:46:12 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 91D0921A4 for ; Sun, 28 Jul 2013 05:46:12 +0000 (UTC) Received: from r56.edvax.de (port-92-195-48-81.dynamic.qsc.de [92.195.48.81]) by mx02.qsc.de (Postfix) with ESMTP id 4CB5024D3D; Sun, 28 Jul 2013 07:46:04 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id r6S5k6ns001975; Sun, 28 Jul 2013 07:46:06 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 28 Jul 2013 07:46:05 +0200 From: Polytropon To: David.I.Noel@gmail.com Subject: Re: Delete a directory, crash the system Message-Id: <20130728074605.6cc425b3.freebsd@edvax.de> In-Reply-To: References: <51F3F290.9020004@cordula.ws> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 05:46:12 -0000 On Sat, 27 Jul 2013 13:57:31 -0500, David Noel wrote: > > So the system panics in ufs_rmdir(). Maybe the filesystem is > > corrupt? Have you tried to fsck(8) it manually? > > fsck worked, though I had to boot from a USB image because I couldn't > get into single user.. for some odd reason. >From your initial description, a _severe_ file system defect seems to be a reasonable assumption. Make sure fsck is run in foreground prior to bringing up the system. The option background_fsck="NO" in /etc/rc.conf will make sure you won't encounter this problem again (_if_ it was related to the file system). Always make sure you're booting into a fsck'ed environment. You could also use a S.M.A.R.T. analysis tool such as smartmon (from ports) to make sure the OS didn't panic because of a hard disk defect. I'm just mentioning this because I have sufficient exoerience in this field. :-) > > Even if the filesystem is corrupt, ufs_rmdir() shouldn't > > panic(), IMHO, but fail gracefully. Hmmm... > > Yeah, I was pretty surprised. I think I tried it like 3 times to be > sure... and yeah, each time... kaboom! It's really surprising that a (comparable) high-level function could fail in that drastic way, but on the other hand, one would assume that there is a _reason_ for this behaviour. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...