Subject: Re: 3.99.7 system crashed while shutting down
To: None <current-users@netbsd.org>
From: Thomas Klausner <wiz@NetBSD.org>
List: current-users
Date: 07/14/2005 13:49:29
On Mon, Jul 11, 2005 at 06:07:21PM +0200, Jukka Salmi wrote:
> a i386 system running -current (3.99.7) crashed after I issued a
> 'shutdown -h now'. Unfortunately I didn't have enough time to write down
> kernel output, but IIRC it crashed in ksh. After a 'tr /l' and a reboot
> the message buffer contained the following:
> 
> uvm_fault(0xcaa48d20, 0, 0, 1) -> 0xe
> spec_ioctl(cb82bce4,cb82bd0c,0,c0933000,c062d7a0) at netbsd:spec_ioctl+0xe
> VOP_IOCTL(cb4e0a84,802c7415,cb82bea4,3,ffffffff) at netbsd:VOP_IOCTL+0x40
> cttyioctl(100,802c7415,cb82bea4,3,cb7fc1a4) at netbsd:cttyioctl+0x52
> spec_ioctl(cb82bd84,1e3ae000,cb82bdfc,c044cb32,c062d7a0) at netbsd:spec_ioctl+0x46
> VOP_IOCTL(cb4ef89c,802c7415,cb82bea4,3,cb7f6100) at netbsd:VOP_IOCTL+0x40
> vn_ioctl(cb7f5c0c,802c7415,cb82bea4,cb7fc1a4,0) at netbsd:vn_ioctl+0x9a
> sys_ioctl(cb840088,cb82bf64,cb82bf5c,0,c1338948) at netbsd:sys_ioctl+0x122
> syscall_plain() at netbsd:syscall_plain+0x7e
> --- syscall (number 54) ---
> 0xbdbc7647:
> syncing disks... 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> 
> Just in case this is useful to someone... However, I couldn't reproduce
> the crash so far.

I've seen this quite often.
One way to make this appear is shutting down from X,
another is to exit X while there is heavy disk activity,
and sometimes it happens "just so".

reboot 0x104 produces weird kernel core dumps, since the
backtrace is different from the one on-screen (which is quite
similar to Jukka's above):
(gdb) bt
#0  0x00000000 in ?? ()
#1  0xc05ab000 in ?? ()
#2  0xc0316e4d in cpu_reboot ()
#3  0xc0245575 in db_reboot_cmd ()
#4  0xc02450bb in db_command ()
#5  0xc0244dce in db_command_loop ()
#6  0xc0247ed4 in db_trap ()
#7  0xc0314632 in kdb_trap ()
#8  0xc031ebf4 in trap ()
#9  0xc0102caf in calltrap ()
#10 0xc031ee4f in trap ()
#11 0xc0102caf in calltrap ()
#12 0xc0225ba5 in ffs_write ()
#13 0xc02bd69c in VOP_WRITE ()
#14 0xc02bc8ec in vn_write ()
#15 0xc0294675 in dofilewrite ()
#16 0xc02945e5 in sys_write ()
#17 0xc031e5e2 in syscall_plain ()

Why does this happen?

See also PR 28730.
 Thomas