Subject: kern/19723: kernel panic with apcibat device enabled
To: None <gnats-bugs@gnats.netbsd.org>
From: Berndt Josef Wulf <wulf@husky.ping.net.au>
List: netbsd-bugs
Date: 01/08/2003 00:43:38
>Number:         19723
>Category:       kern
>Synopsis:       kernel panic with apcibat device enabled
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 07 04:18:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Berndt Josef Wulf
>Release:        NetBSD 1.6L
>Organization:
NTC-Electronics
>Environment:
	
	
System: NetBSD husky 1.6L NetBSD 1.6L (HUSKY) #0: Mon Jan 6 01:41:50 CST 2003 root@husky:/usr/src/sys/arch/i386/compile/HUSKY i386
Architecture: i386
Machine: i386
>Description:
The system panics with kernel compiled with "acpibat" device enabled
and whenever a installed battery was found see the traceback that follows:


Program received signal SIGSEGV, Segmentation fault.
AcpiDsExecuteArguments (Node=0xc0974480, ScopeNode=0xc0974480, AmlLength=0, 
    AmlStart=0x0)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/dsopcode.c:209
209	    Arg->Common.Node = Node;
Breakpoint 1 at 0xc0391cf9: file /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/dsopcode.c, line 209.
(gdb) where
#0  AcpiDsExecuteArguments (Node=0xc0974480, ScopeNode=0xc0974480, 
    AmlLength=0, AmlStart=0x0)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/dsopcode.c:209
#1  0xc0391df4 in AcpiDsGetBufferArguments (ObjDesc=0xc0973980)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/dsopcode.c:334
#2  0xc039a997 in AcpiExResolveNodeToValue (ObjectPtr=0xc096a1b4, 
    WalkState=0xc096a000)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/exresnte.c:249
#3  0xc039aa33 in AcpiExResolveToValue (StackPtr=0xc096a1b4, 
    WalkState=0xc096a000)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/exresolv.c:186
#4  0xc03926ee in AcpiDsResolveOperands (WalkState=0xc096a000)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/dsutils.c:376
#5  0xc0392cfe in AcpiDsExecEndOp (WalkState=0xc096a000)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/dswexec.c:594
#6  0xc03a0ac4 in AcpiPsParseLoop (WalkState=0xc096a000)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/psparse.c:979
#7  0xc03a0f7d in AcpiPsParseAml (WalkState=0xc096ac00)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/psparse.c:1257
#8  0xc03a19cc in AcpiPsxExecute (MethodNode=0xc09691e0, Params=0x0, 
    ReturnObjDesc=0xc04b4b4c)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/psxface.c:284
#9  0xc039d7b1 in AcpiNsExecuteControlMethod (MethodNode=0xc09691e0, 
    Params=0x0, ReturnObjDesc=0xc04b4b4c)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/nseval.c:530
#10 0xc039d72d in AcpiNsEvaluateByHandle (Handle=0xc09691e0, Params=0x0, 
    ReturnObject=0xc04b4bec)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/nseval.c:412
#11 0xc039d5dd in AcpiNsEvaluateRelative (Handle=0xc0969280, 
    Pathname=0xc046506d "_BIF", Params=0x0, ReturnObject=0xc04b4bec)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/nseval.c:228
#12 0xc039ee29 in AcpiEvaluateObject (Handle=0xc0969280, 
    Pathname=0xc046506d "_BIF", ExternalParams=0x0, ReturnBuffer=0xc04b4c58)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpica/Subsystem/nsxfeval.c:357
#13 0xc03a8ba6 in acpi_eval_struct (handle=0xc0969280, path=0xc046506d "_BIF", 
    bufp=0xc04b4c58)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpi.c:771
#14 0xc03a9e63 in acpibat_get_info (arg=0xc0978000)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpi_bat.c:295
#15 0xc03a9d19 in acpibat_attach (parent=0xc08f3d00, self=0xc0978000, 
    aux=0xc04b4d68)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpi_bat.c:218
#16 0xc0254239 in config_attach (parent=0xc08f3d00, cf=0xc046a228, 
    aux=0xc04b4d68, print=0xc03a896c <acpi_print>)
    at /sys/arch/i386/compile/HUSKY/../../../../kern/subr_autoconf.c:827
#17 0xc0253d2f in config_found_sm (parent=0xc08f3d00, aux=0xc04b4d68, 
    print=0xc03a896c <acpi_print>, submatch=0)
    at /sys/arch/i386/compile/HUSKY/../../../../kern/subr_autoconf.c:628
#18 0xc03a889d in acpi_build_tree (sc=0xc08f3d00)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpi.c:439
#19 0xc03a870e in acpi_attach (parent=0xc0966fc0, self=0xc08f3d00, 
    aux=0xc04b4e88)
    at /sys/arch/i386/compile/HUSKY/../../../../dev/acpi/acpi.c:301
#20 0xc0254239 in config_attach (parent=0xc0966fc0, cf=0xc046a20c, 
    aux=0xc04b4e88, print=0xc02fd510 <mainbus_print>)
    at /sys/arch/i386/compile/HUSKY/../../../../kern/subr_autoconf.c:827
#21 0xc0253d2f in config_found_sm (parent=0xc0966fc0, aux=0xc04b4e88, 
    print=0xc02fd510 <mainbus_print>, submatch=0)
    at /sys/arch/i386/compile/HUSKY/../../../../kern/subr_autoconf.c:628
#22 0xc02fd444 in mainbus_attach (parent=0x0, self=0xc0966fc0, aux=0x0)
    at /sys/arch/i386/compile/HUSKY/../../../../arch/i386/i386/mainbus.c:211
#23 0xc0254239 in config_attach (parent=0x0, cf=0xc0469700, aux=0x0, print=0)
    at /sys/arch/i386/compile/HUSKY/../../../../kern/subr_autoconf.c:827
#24 0xc0253daf in config_rootfound (rootname=0xc03fc069 "mainbus", aux=0x0)
    at /sys/arch/i386/compile/HUSKY/../../../../kern/subr_autoconf.c:646
#25 0xc02ce974 in cpu_configure ()
    at /sys/arch/i386/compile/HUSKY/../../../../arch/i386/i386/autoconf.c:139
#26 0xc0253746 in configure ()
    at /sys/arch/i386/compile/HUSKY/../../../../kern/subr_autoconf.c:255
#27 0xc023b6de in main ()
    at /sys/arch/i386/compile/HUSKY/../../../../kern/init_main.c:366
(gdb) 

The hardware is a Dell Inspiron 8100 with one battery fitted.

>How-To-Repeat:
Build and run current kernel with acpibat device enabled on a system that has
a battery fitted, e.g. Dell Inspiron 8100 laptop.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted: