From owner-freebsd-acpi@FreeBSD.ORG Thu Nov 8 09:22:02 2012 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4B6C4450; Thu, 8 Nov 2012 09:22:02 +0000 (UTC) (envelope-from Tom.Lislegaard@proact.no) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe004.messaging.microsoft.com [216.32.181.184]) by mx1.freebsd.org (Postfix) with ESMTP id D96C98FC15; Thu, 8 Nov 2012 09:22:00 +0000 (UTC) Received: from mail64-ch1-R.bigfish.com (10.43.68.241) by CH1EHSOBE005.bigfish.com (10.43.70.55) with Microsoft SMTP Server id 14.1.225.23; Thu, 8 Nov 2012 09:06:46 +0000 Received: from mail64-ch1 (localhost [127.0.0.1]) by mail64-ch1-R.bigfish.com (Postfix) with ESMTP id B40604201C9; Thu, 8 Nov 2012 09:06:46 +0000 (UTC) X-Forefront-Antispam-Report: CIP:212.214.215.133; KIP:(null); UIP:(null); IPV:NLI; H:semtaout01.proact.se; RD:semtaout01.proact.se; EFVD:NLI X-SpamScore: -4 X-BigFish: VPS-4(zzbb2dI542M1452I1432Izz1de0h1d18h1202h1d1ah1d2ahzz17326ah8275bh8275dhz2dh668h839h944hd25hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh15d0l1155h) Received: from mail64-ch1 (localhost.localdomain [127.0.0.1]) by mail64-ch1 (MessageSwitch) id 1352365604890328_23454; Thu, 8 Nov 2012 09:06:44 +0000 (UTC) Received: from CH1EHSMHS037.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.252]) by mail64-ch1.bigfish.com (Postfix) with ESMTP id D6D2B2001D; Thu, 8 Nov 2012 09:06:44 +0000 (UTC) Received: from semtaout01.proact.se (212.214.215.133) by CH1EHSMHS037.bigfish.com (10.43.69.246) with Microsoft SMTP Server id 14.1.225.23; Thu, 8 Nov 2012 09:06:40 +0000 Received: from Semail04.proact.local (unknown [10.7.1.58]) by semtaout01.proact.se (Postfix) with ESMTP id 3EF105727C; Thu, 8 Nov 2012 10:06:40 +0100 (CET) Received: from SEMAIL03.proact.local ([fe80::a52b:385d:b44f:ecb9]) by Semail04.proact.local ([fe80::885:6e64:c1e6:dcf1%20]) with mapi id 14.02.0318.001; Thu, 8 Nov 2012 10:06:39 +0100 From: Tom Lislegaard To: 'Andriy Gapon' Subject: RE: 9-Stable panic: resource_list_unreserve: can't find resource Thread-Topic: 9-Stable panic: resource_list_unreserve: can't find resource Thread-Index: Ac23UHFrRe/nHcv4QJaCSOXSiMVayQAP8Y0AACFOYqAAF8a9gAAYYgXwAAYhBQAAk9ux8P///B6A//+/I1CAAHlQgP//5ozAgABIH4D//unQQABYwRGA//1wI8A= Date: Thu, 8 Nov 2012 09:06:38 +0000 Message-ID: References: <509172F6.2040400@FreeBSD.org> <5092F209.7090803@FreeBSD.org> <50979BCD.3060000@FreeBSD.org> <5097CB27.8040802@FreeBSD.org> <5097F24D.7040206@FreeBSD.org> <50995C8F.3040309@FreeBSD.org> In-Reply-To: <50995C8F.3040309@FreeBSD.org> Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.7.1.59] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: proact.no Cc: "freebsd-acpi@FreeBSD.org" , "freebsd-stable@FreeBSD.org" X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Nov 2012 09:22:02 -0000 > -----Original Message----- > From: Andriy Gapon [mailto:avg@FreeBSD.org] > Sent: 6. november 2012 19:53 > To: Tom Lislegaard > Cc: freebsd-stable@FreeBSD.org; freebsd-acpi@FreeBSD.org > Subject: Re: 9-Stable panic: resource_list_unreserve: can't find resource >=20 > on 06/11/2012 10:50 Tom Lislegaard said the following: > > No problem, I'm happy to assist in debugging this. > > > > Enabling the acpi debugging quickly fills the kernel message buffer, > > but it seems to be the same set of messages repeating again and again > > so I think this is representative > > > > https://dl.dropbox.com/u/13263820/debug_dmesg.txt >=20 > This didn't clarify things as much as I hoped, but I am inclined to think= that it is polling from > userland that triggers all the processor notifications. >=20 > In any case, here is a patch to try: > http://people.freebsd.org/~avg/acpi_cpu-stable.diff >=20 > Please disable all the tunings added to loader.conf during debugging when= testing this patch. >=20 > The patch is a combination of two changes: >=20 > 1. > Do not needlessly use ever-increasing resource IDs. > Rather use the IDs that are tied to Cx level IDs. > Also, release previous resources upon _CST change. >=20 > 2. > Bind a thread that processes a processor _CST change notification to the = target processor and perform > _CST processing in a critical section. These should ensure the following= : > - the CPU doesn't enter an idle state and doesn't try to use Cx level par= ameters > while they are being changed > - Cx level parameters are never concurrently modified when multiple notif= ications > fire in a rapid succession and multiple ACPI task threads are configure= d sched_bind is a heavy- > weight operation, but it is OK in this context because processor notifica= tions should not occur too > often >=20 Thanks. I applied the patch yesterday, but found this morning the machine h= ad crashed during the night with a page fault (kgdb) bt #0 doadump (textdump=3DVariable "textdump" is not available. ) at pcpu.h:229 #1 0xffffffff804441f4 in kern_reboot (howto=3D260) at /usr/src/sys/kern/ke= rn_shutdown.c:448 #2 0xffffffff804446dc in panic (fmt=3D0x1
) at = /usr/src/sys/kern/kern_shutdown.c:636 #3 0xffffffff806f234d in trap_fatal (frame=3D0xfffffe00089264a0, eva=3DVar= iable "eva" is not available. ) at /usr/src/sys/amd64/amd64/trap.c:878 #4 0xffffffff806f2668 in trap_pfault (frame=3D0xffffff82450401b0, usermode= =3D0) at /usr/src/sys/amd64/amd64/trap.c:794 #5 0xffffffff806f29ec in trap (frame=3D0xffffff82450401b0) at /usr/src/sys= /amd64/amd64/trap.c:463 #6 0xffffffff806dc5ff in calltrap () at /usr/src/sys/amd64/amd64/exception= .S:228 #7 0xffffffff802d1bdd in AcpiOsAcquireObject (Cache=3D0xfffffe00052bac60) = at /usr/src/sys/contrib/dev/acpica/utilities/utcache.c:316 #8 0xffffffff802d6883 in AcpiUtAllocateObjectDescDbg (ModuleName=3D0xfffff= fff8074c3f0 "dsutils", LineNumber=3D703, ComponentId=3DVariable "ComponentI= d" is not available. ) at /usr/src/sys/contrib/dev/acpica/utilities/utobject.c:437 #9 0xffffffff802d6a1d in AcpiUtCreateInternalObjectDbg (ModuleName=3D0xfff= fffff8074c3f0 "dsutils", LineNumber=3D703, ComponentId=3D64, Type=3D1) at /= usr/src/sys/contrib/dev/acpica/utilities/utobject.c:112 #10 0xffffffff802a71e8 in AcpiDsCreateOperand (WalkState=3D0xfffffe0008a3bc= 00, Arg=3D0xfffffe0005366800, ArgIndex=3D0) at /usr/src/sys/contrib/dev/acp= ica/dispatcher/dsutils.c:703 #11 0xffffffff802a7587 in AcpiDsCreateOperands (WalkState=3D0xfffffe0008a3b= c00, FirstArg=3D0xfffffe0005366800) at /usr/src/sys/contrib/dev/acpica/disp= atcher/dsutils.c:798 #12 0xffffffff802a856e in AcpiDsExecEndOp (WalkState=3D0xfffffe0008a3bc00) = at /usr/src/sys/contrib/dev/acpica/dispatcher/dswexec.c:567 #13 0xffffffff802c9441 in AcpiPsParseLoop (WalkState=3D0xfffffe0008a3bc00) = at /usr/src/sys/contrib/dev/acpica/parser/psloop.c:1249 #14 0xffffffff802ca8dd in AcpiPsParseAml (WalkState=3D0xfffffe0008a3bc00) a= t /usr/src/sys/contrib/dev/acpica/parser/psparse.c:525 #15 0xffffffff802cb981 in AcpiPsExecuteMethod (Info=3D0xfffffe01a2143100) a= t /usr/src/sys/contrib/dev/acpica/parser/psxface.c:368 #16 0xffffffff802c2287 in AcpiNsEvaluate (Info=3D0xfffffe01a2143100) at /us= r/src/sys/contrib/dev/acpica/namespace/nseval.c:193 #17 0xffffffff802d3f56 in AcpiUtEvaluateObject (PrefixNode=3D0xfffffe00052f= 6540, Path=3D0xffffffff807538f6 "_STA", ExpectedReturnBtypes=3D1, ReturnDes= c=3D0xffffff8245040660) at /usr/src/sys/contrib/dev/acpica/utilities/uteval= .c:102 #18 0xffffffff802d428f in AcpiUtExecute_STA (DeviceNode=3D0xfffffe00052f654= 0, Flags=3D0xfffffe01cc0d1e18) at /usr/src/sys/contrib/dev/acpica/utilities= /uteval.c:276 #19 0xffffffff802c7e47 in AcpiGetObjectInfo (Handle=3DVariable "Handle" is = not available. ) at /usr/src/sys/contrib/dev/acpica/namespace/nsxfname.c:423 #20 0xffffffff802e35ed in acpi_BatteryIsPresent (dev=3D0xfffffe0005378c00) = at /usr/src/sys/dev/acpica/acpi.c:2064 #21 0xffffffff802e66e1 in acpi_battery_get_battinfo (dev=3D0x0, battinfo=3D= 0xffffffff80a4ba70) at /usr/src/sys/dev/acpica/acpi_battery.c:176 #22 0xffffffff802e6a44 in acpi_battery_sysctl (oidp=3D0xfffffe0008785600, a= rg1=3DVariable "arg1" is not available. ) at /usr/src/sys/dev/acpica/acpi_battery.c:428 #23 0xffffffff8044e057 in sysctl_root (oidp=3DVariable "oidp" is not availa= ble. ) at /usr/src/sys/kern/kern_sysctl.c:1513 #24 0xffffffff8044e335 in userland_sysctl (td=3DVariable "td" is not availa= ble. ) at /usr/src/sys/kern/kern_sysctl.c:1623 #25 0xffffffff8044e84a in sys___sysctl (td=3D0xfffffe0008c6c920, uap=3D0xff= ffff8245040a70) at /usr/src/sys/kern/kern_sysctl.c:1549 #26 0xffffffff806f1c40 in amd64_syscall (td=3D0xfffffe0008c6c920, traced=3D= 0) at subr_syscall.c:135 #27 0xffffffff806dc8e7 in Xfast_syscall () at /usr/src/sys/amd64/amd64/exce= ption.S:387 #28 0x00000008026587ec in ?? () Previous frame inner to this frame (corrupt stack?) (kgdb)=20 -tom