From owner-freebsd-bugs@FreeBSD.ORG Fri Aug 25 20:10:22 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CC3716A4E2 for ; Fri, 25 Aug 2006 20:10:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 562E643D49 for ; Fri, 25 Aug 2006 20:10:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k7PKALaQ035273 for ; Fri, 25 Aug 2006 20:10:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k7PKALVM035272; Fri, 25 Aug 2006 20:10:21 GMT (envelope-from gnats) Resent-Date: Fri, 25 Aug 2006 20:10:21 GMT Resent-Message-Id: <200608252010.k7PKALVM035272@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nick Hibma Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E315816A4F6 for ; Fri, 25 Aug 2006 20:05:21 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from smtp-1.orange.nl (smtp-1.orange.nl [193.252.22.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D26E43D7D for ; Fri, 25 Aug 2006 20:05:01 +0000 (GMT) (envelope-from nick@van-laarhoven.org) Received: from uitsmijter.van-laarhoven.org (ap-zvhz-13f05.adsl.wanadoo.nl [81.69.93.5]) by mwinf6008.orange.nl (SMTP Server) with ESMTP id 2D940700008D for ; Fri, 25 Aug 2006 22:05:00 +0200 (CEST) Received: (qmail 39050 invoked from network); 25 Aug 2006 20:04:59 -0000 Received: from 10.66.0.146 by uitsmijter.van-laarhoven.org (envelope-from , uid 82) with qmail-scanner-1.25 (clamdscan: 0.88.2/1459. f-prot: 4.6.6/3.16.14. spamassassin: 3.1.1. Clear:RC:1(10.66.0.146):. Processed in 0.050598 secs); 25 Aug 2006 20:04:59 -0000 Received: from unknown (HELO van-laarhoven.org) (nick@10.66.0.146) by uitsmijter.van-laarhoven.org with SMTP; 25 Aug 2006 20:04:59 -0000 Received: (nullmailer pid 9189 invoked by uid 1001); Fri, 25 Aug 2006 20:04:59 -0000 Message-Id: <1156536299.544558.9188.nullmailer@van-laarhoven.org> Date: Fri, 25 Aug 2006 22:04:59 +0200 From: Nick Hibma To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/102515: fsck_ufs crashes if no console at all (in libc) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Nick Hibma List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Aug 2006 20:10:22 -0000 >Number: 102515 >Category: bin >Synopsis: fsck_ufs crashes if no console at all (in libc) >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 25 20:10:20 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Nick Hibma >Release: FreeBSD 6.1-STABLE i386 >Organization: AnyWi Technologies >Environment: System: FreeBSD hind.van-laarhoven.org 6.1-STABLE FreeBSD 6.1-STABLE #19: Thu Aug 17 16:31:39 CEST 2006 toor@hind.van-laarhoven.org:/usr/src/sys/i386/compile/HIND i386 Headless Soekris (no graphics hardware), without serial console: hint.sio.0.flags="0x00" and all getty ttys (ttyd0 and ttyv?) switched off. >Description: fsck_ffs (fsck_ufs) crashes in libc in this configuration on boot. This failure stops the boot process, and wants to drop you into a shell. But because there is no console the /etc/rc script immediately resumes the boot process, but this time as fastboot instead of autoboot, skipping the disk checks; and the crash, but the disk doesn't get checked that way (is mounted read-only, so that is not that big an issue). This leads to a duplicated execution of memory disk creation in rc.initdiskless which is my real problem: It wastes 14mb of my 64Mb of memory! Backtrace: #0 0x08054841 in ?? () #1 0x28150c98 in __gdtoa_locks () from /lib/libc.so.6 #2 0xbfbfedc0 in ?? () #3 0xbfbfe358 in ?? () #4 0x280b1ea3 in freopen () from /lib/libc.so.6 #5 0x08055108 in ?? () ... #215 0x00000000 in ?? () #216 0x2805f405 in dlsym () from /libexec/ld-elf.so.1 #217 0x0804eada in ?? () ... #223 0x09a6322b in ?? () #224 0x2809d7ba in ?? () from /lib/libc.so.6 #225 0x2807d598 in ?? () #226 0x28099b28 in ?? () from /lib/libc.so.6 #227 0x00000000 in ?? () #228 0xbfbfea38 in ?? () #229 0x2805f5e3 in dlinfo () from /libexec/ld-elf.so.1 #230 0x08049252 in ?? () ... #233 0xbfbfecdc in ?? () ---Type to continue, or q to quit--- #234 0x00000010 in ?? () #235 0x080561d0 in __divdi3 () #236 0x00000003 in ?? () >How-To-Repeat: # fsck -f / < /dev/console ** /dev/ad0s1a fsck: /dev/ad0s1a: Floating point exception: 8 # fsck -f / ** /dev/ad0s1a <> on a machine without a console (see above for how to reproduce). Image to test this with can be generated if needed, or access to machine can be given. (Read-only image mounted in multi-user mode, don't know whether ). >Fix: Several options: A) Change statements calling fsck in /etc/rc.d/fsck from fsck -F -p to fsck -F -p Release-Note: >Audit-Trail: >Unformatted: