Subject: ACPI kernel crash
To: None <port-i386@netbsd.org>
From: Takahiro Kambe <taca@back-street.net>
List: port-i386
Date: 01/27/2003 02:30:15
Hi.

ACPI enabled kernel crash on my note pc.  I've compiled the with "-g".
It was compiled on 22th January, but similar crash happened from
November of last year.

root@edge[9]:gdb netbsd.gdb
GNU gdb 5.0nb1
Copyright 2000 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--netbsdelf"...
(gdb) target kcore /var/crash/netbsd.6.core
panic: setrunnable
#0  0x1 in ?? ()
#0  0x1 in ?? ()
#1  0xc028acda in cpu_reboot (howto=260, bootstr=0x0)
    at ../../../../arch/i386/i386/machdep.c:2407
#2  0xc02158bb in panic () at ../../../../kern/subr_prf.c:243
#3  0xc031f83f in __assert () at ../../../../../../lib/libkern/__assert.c:47
#4  0xc02f98bc in AcpiOsGetThreadId ()
    at ../../../../dev/acpi/acpica/Osd/OsdSchedule.c:216
#5  0xc031371d in AcpiUtAcquireMutex (MutexId=8)
    at ../../../../dev/acpi/acpica/Subsystem/utmisc.c:812
#6  0xc0307dc2 in AcpiGetRegister (RegisterId=13, ReturnValue=0xc0469858, 
    Flags=1) at ../../../../dev/acpi/acpica/Subsystem/hwregs.c:376
#7  0xc0307782 in AcpiHwGetMode ()
    at ../../../../dev/acpi/acpica/Subsystem/hwacpi.c:296
#8  0xc0301a79 in AcpiDisable ()
    at ../../../../dev/acpi/acpica/Subsystem/evxfevnt.c:206
#9  0xc031440a in acpi_disable (sc=0xc0c60d00)
    at ../../../../dev/acpi/acpi.c:358
#10 0xc03143d7 in acpi_shutdown (arg=0xc0c60d00)
    at ../../../../dev/acpi/acpi.c:342
#11 0xc0209ce6 in doshutdownhooks () at ../../../../kern/kern_subr.c:490
#12 0xc028acdf in cpu_reboot (howto=260, bootstr=0x0)
    at ../../../../arch/i386/i386/machdep.c:2410
#13 0xc02158bb in panic () at ../../../../kern/subr_prf.c:243
#14 0xc0292832 in trap (frame={tf_gs = -1071513584, tf_fs = -1069154256, 
      tf_es = -1060765680, tf_ds = 16, tf_edi = 0, tf_esi = -1067314344, 
      tf_ebp = -1069114660, tf_ebx = -1069114748, tf_edx = -484851088, 
      tf_ecx = -1069114764, tf_eax = 0, tf_trapno = 6, tf_err = 0, 
      tf_eip = -1071394896, tf_cs = 8, tf_eflags = 66050, 
      tf_esp = -1069114904, tf_ss = -1060730112, tf_vm86_es = -1069114740, 
      tf_vm86_ds = -1069114480, tf_vm86_fs = -1057774592, 
      tf_vm86_gs = -1057775604}) at ../../../../arch/i386/i386/trap.c:290
#15 0xc0102b88 in calltrap ()
#16 0xc01de1e1 in ffs_putpages (v=0xc0469b60)
    at ../../../../ufs/ffs/ffs_vnops.c:558
#17 0xc023ad15 in VOP_PUTPAGES (vp=0xe319c270, offlo=0, offhi=0, flags=17)
    at ../../../../kern/vnode_if.c:1665
#18 0xc01ddda9 in ffs_full_fsync (v=0xc0469c78)
    at ../../../../ufs/ffs/ffs_vnops.c:354
#19 0xc01ddaf4 in ffs_fsync (v=0xc0469c78)
    at ../../../../ufs/ffs/ffs_vnops.c:263
#20 0xc023a568 in VOP_FSYNC (vp=0xe319c270, cred=0xc0c60f00, flags=0, offlo=0, 
    offhi=0, p=0xc0408c60) at ../../../../kern/vnode_if.c:691
#21 0xc01dc34b in ffs_sync (mp=0xc0cdd600, waitfor=2, cred=0xc0c60f00, 
    p=0xc0408c60) at ../../../../ufs/ffs/ffs_vfsops.c:1151
#22 0xc0235e4a in sys_sync (p=0xc0408c60, v=0x0, retval=0x0)
    at ../../../../kern/vfs_syscalls.c:585
#23 0xc0234c20 in vfs_shutdown () at ../../../../kern/vfs_subr.c:2479
#24 0xc028acaf in cpu_reboot (howto=256, bootstr=0x0)
    at ../../../../arch/i386/i386/machdep.c:2394
#25 0xc02158bb in panic () at ../../../../kern/subr_prf.c:243
#26 0xc020b8c9 in setrunnable (p=0xe2db41e0)
    at ../../../../kern/kern_synch.c:972
#27 0xc020b260 in endtsleep (arg=0xe2db41e0)
    at ../../../../kern/kern_synch.c:538
#28 0xc01fa14d in softclock (v=0x0) at ../../../../kern/kern_clock.c:993
#29 0xc02918f1 in softintr_dispatch (which=0)
    at ../../../../arch/i386/i386/softintr.c:109
#30 0xc0102891 in Xsoftclock ()
(gdb) frame 4
#4  0xc02f98bc in AcpiOsGetThreadId ()
    at ../../../../dev/acpi/acpica/Osd/OsdSchedule.c:216
216             KASSERT(curproc != NULL);
(gdb) l
211      */
212     UINT32
213     AcpiOsGetThreadId(void)
214     {
215
216             KASSERT(curproc != NULL);
217
218             /* XXX Bleh, we're not allowed to return 0 (how stupid!) */
219             return (curproc->p_pid + 1);
220     }
(gdb) up
#5  0xc031371d in AcpiUtAcquireMutex (MutexId=8)
    at ../../../../dev/acpi/acpica/Subsystem/utmisc.c:812
812         ThisThreadId = AcpiOsGetThreadId ();
(gdb) l
807         if (MutexId > MAX_MTX)
808         {
809             return (AE_BAD_PARAMETER);
810         }
811
812         ThisThreadId = AcpiOsGetThreadId ();
813
814         /*
815          * Deadlock prevention.  Check if this thread owns any mutexes of value
816          * greater than or equal to this one.  If so, the thread has violated


-- 
Takahiro Kambe <taca@back-street.net>