From nobody@FreeBSD.org  Wed Sep  5 01:21:41 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C672F16A41A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  5 Sep 2007 01:21:41 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id B7AA113C45E
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  5 Sep 2007 01:21:41 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l851Lfau056953
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 5 Sep 2007 01:21:41 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l851LfrY056952;
	Wed, 5 Sep 2007 01:21:41 GMT
	(envelope-from nobody)
Message-Id: <200709050121.l851LfrY056952@www.freebsd.org>
Date: Wed, 5 Sep 2007 01:21:41 GMT
From: Dmitry Andrianov <666.root@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Fatal trap 12 right after reboot (da0s1error = 6)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         116100
>Category:       i386
>Synopsis:       [panic] Fatal trap 12 right after reboot (da0s1error = 6)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-i386
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 05 01:30:02 GMT 2007
>Closed-Date:    Wed Jul 14 08:10:57 UTC 2010
>Last-Modified:  Wed Jul 14 08:10:57 UTC 2010
>Originator:     Dmitry Andrianov
>Release:        7.0
>Organization:
-
>Environment:
7.0-CURRENT-200704 FreeBSD 7.0-CURRENT-200704 #0: Sun Apr  1 14:46:54 UTC 2007  root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
bash-2.05b#mount -t msdosfs /dev/da0s1 /mnt
bash-2.05b#
..
bash-2.05b#reboot

<118>Sep  3 18:54:08 zingel reboot: rebooted by root
<118>Sep  3 18:54:08 zingel syslogd: exiting on signal 15
Waiting (max 60 seconds) for system process `vnlru' to stop...done
Waiting (max 60 seconds) for system process `bufdaemon' to stop...done
Waiting (max 60 seconds) for system process `syncer' to stop...
Syncing disks, vnodes remaining...1 0 0 0 done
All buffers synced.
g_vfs_done():da0s1[READ(offset=65536, length=4096)]error = 6
(da0:dead_sim0:0:0:0): Synchronize cache failed, status == 0x8, scsi status == 0x0
(da0:dead_sim0:0:0:0): removing device entry


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x0
fault code              = supervisor read, page not present
instruction pointer     = 0x20:0xc0675487
stack pointer           = 0x28:0xd86f7b98
frame pointer           = 0x28:0xd86f7bd0
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 94766 (reboot)


bash-2.05b# kgdb /boot/kernel/kernel /var/crash/vmcore.0

[GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"]
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd".

Unread portion of the kernel message buffer:
<118>Sep  3 18:54:08 zingel syslogd: exiting on signal 15
Waiting (max 60 seconds) for system process `vnlru' to stop...done
Waiting (max 60 seconds) for system process `bufdaemon' to stop...done
Waiting (max 60 seconds) for system process `syncer' to stop...
Syncing disks, vnodes remaining...1 0 0 0 done
All buffers synced.
g_vfs_done():da0s1[READ(offset=65536, length=4096)]error = 6
(da0:dead_sim0:0:0:0): Synchronize cache failed, status == 0x8, scsi status == 0x0
(da0:dead_sim0:0:0:0): removing device entry


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x0
fault code              = supervisor read, page not present
instruction pointer     = 0x20:0xc0675487
stack pointer           = 0x28:0xd86f7b98
frame pointer           = 0x28:0xd86f7bd0
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 94766 (reboot)
Physical memory: 495 MB
Dumping 140 MB: 125 109 93 77 61 45 29 13
Dump complete
Physical memory: 495 MB
Dumping 140 MB: 125 109 93 77 61 45 29 13

#0  doadump () at pcpu.h:172
172     pcpu.h: No such file or directory.
        in pcpu.h

bash-2.05b# dmesg -a | grep da0

da0 at umass-sim0 bus 0 target 0 lun 0
da0: <COWON iAUDIO U2 0100> Removable Direct Access SCSI-4 device
da0: 40.000MB/s transfers
da0: 998MB (511296 2048 byte sectors: 64H 32S/T 249C)


thk.
>How-To-Repeat:
mount -t msdosfs /dev/da0s1 /mnt
..
reboot
>Fix:


>Release-Note:
>Audit-Trail:

From: Bruce Evans <brde@optusnet.com.au>
To: Dmitry Andrianov <666.root@gmail.com>
Cc: freebsd-gnats-submit@FreeBSD.org, freebsd-i386@FreeBSD.org
Subject: Re: i386/116100: Fatal trap 12 right after reboot (da0s1error = 6)
Date: Wed, 5 Sep 2007 15:47:49 +1000 (EST)

 On Wed, 5 Sep 2007, Dmitry Andrianov wrote:
 
 >> Environment:
 > 7.0-CURRENT-200704 FreeBSD 7.0-CURRENT-200704 #0: Sun Apr  1 14:46:54 UTC 2007  root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
 
 This is old, so not broken by me :-).
 
 >> Description:
 > bash-2.05b#mount -t msdosfs /dev/da0s1 /mnt
 > bash-2.05b#
 > ..
 > bash-2.05b#reboot
 >
 > <118>Sep  3 18:54:08 zingel reboot: rebooted by root
 > <118>Sep  3 18:54:08 zingel syslogd: exiting on signal 15
 > Waiting (max 60 seconds) for system process `vnlru' to stop...done
 > Waiting (max 60 seconds) for system process `bufdaemon' to stop...done
 > Waiting (max 60 seconds) for system process `syncer' to stop...
 > Syncing disks, vnodes remaining...1 0 0 0 done
 > All buffers synced.
 > g_vfs_done():da0s1[READ(offset=65536, length=4096)]error = 6
 
 An i/o error in unmount is likely to cause problems.  The system never
 gives up trying to write unwriteable buffers, and tends to panic trying
 to write them later.  I recently fixed some panics in unmount (not yet
 committed), but the fix is to make unmount not fail, and that won't
 help for reboot because unmount cannot fail.  msdosfs and perhaps even
 ffs normally does a write in unmount _after_ the "All buffers synced"
 message has been printed.
 
 > (da0:dead_sim0:0:0:0): Synchronize cache failed, status == 0x8, scsi status == 0x0
 > (da0:dead_sim0:0:0:0): removing device entry
 
 Removing a device entry is a wrong thing to do if there is i/o pending on
 the device.  It would work if the i/o is reattached to dead_something,
 but that apparently isn't done.
 
 You need to figure out what caused the i/o error -- is it msdosfs, the
 disk driver or the disk?
 
 Bruce
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Wed Jul 14 08:10:56 UTC 2010 
State-Changed-Why:  
Bruce provided feedback a long time ago but no responses where given. 
Close the ticket. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116100 
>Unformatted:
