From owner-freebsd-acpi@FreeBSD.ORG Tue Apr 2 07:29:57 2013 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D3E3F142; Tue, 2 Apr 2013 07:29:57 +0000 (UTC) (envelope-from demelier.david@gmail.com) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 49A8FD0C; Tue, 2 Apr 2013 07:29:56 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id a12so106166wgh.21 for ; Tue, 02 Apr 2013 00:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=LODul5naF4zNDJqETFNifhsiUaeLvj9YjipBNU4g144=; b=oz+4km7JS6izI+pZdgbDd6co8pnYW6EtiUyfPnePdqRuInPY/gwhrCFr+wRFWR6SF2 SCUJ7xP9f1slU6inItVuRz96GIoeO+rR5E1/JEar7H9XKP/ZW8D3O7I0DxUh3o24enTM PybmJuBGkJjr+PcdwhrzeTLHqOTk608QseN+XLxASQIKyTxRUf4bp4D15SA+dRlYxjV+ mFxdpfmbI8x3ASE6hmeenPDPNmtp8YZ4SAE9hVhhIAaRWxLcDGAg4taIcDv18g4P6Iow zWN1zaKmMEX09OgKCnFVfqQssncMDaWfryww9GGU/q1mTYjlsh1FRHVuPq9ETEpbU3Ld aq5Q== MIME-Version: 1.0 X-Received: by 10.180.92.97 with SMTP id cl1mr13692550wib.19.1364887796029; Tue, 02 Apr 2013 00:29:56 -0700 (PDT) Received: by 10.194.60.147 with HTTP; Tue, 2 Apr 2013 00:29:55 -0700 (PDT) In-Reply-To: <51582122.3050703@gmail.com> References: <512E24CD.9090404@gmail.com> <512E397D.1070406@FreeBSD.org> <2041632.on0aZtOfZI@melon> <227443103.MjG0Okhn3r@melon> <51582122.3050703@gmail.com> Date: Tue, 2 Apr 2013 09:29:55 +0200 Message-ID: Subject: Re: panics due to buggy ACPI in Dell Latitude E6530? From: David Demelier To: kron Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-acpi@freebsd.org, Andriy Gapon 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: Tue, 02 Apr 2013 07:29:57 -0000 Hello, Thanks for that small patch, I'm currently testing it and will tell you how it works for me, Cheers! 2013/3/31 kron : > On 2013/03/30 14:22, David Demelier wrote: >> Le samedi 30 mars 2013 14:13:53 David Demelier a =C3=A9crit : >>> Le mercredi 27 f=C3=A9vrier 2013 18:51:09 Andriy Gapon a =C3=A9crit : >>>> on 27/02/2013 17:22 kron said the following: >>>>> Hi, >>>>> >>>>> I have a Dell notebook (Latitude E6530) on which I track >>>>> 9-STABLE. It served excellently until mid-Jan when it started >>>>> to panic a few times a week or so: >>>>> >>>>> Fatal trap 12: page fault while in kernel mode >>>>> cpuid =3D 3; apic id =3D 03 >>>>> fault virtual address =3D 0x10116 >>>>> fault code =3D supervisor read data, page not present >>>>> instruction pointer =3D 0x20:0xffffffff802bc360 >>>>> stack pointer =3D 0x28:0xffffff848f6db390 >>>>> frame pointer =3D 0x28:0xffffff848f6db3c0 >>>>> code segment =3D base 0x0, limit 0xfffff, type 0x1b >>>>> =3D DPL 0, pres 1, long 1, def32 0, gran 1 >>>>> processor eflags =3D interrupt enabled, resume, IOPL =3D 0 >>>>> current process =3D 2199 (conky) >>>>> trap number =3D 12 >>>>> panic: page fault >>>>> cpuid =3D 3 >>>>> >>>>> Before the panics kernel used to emit messages like: >>>>> ACPI Error: No object attached to node 0xfffffe00094a51c0 >>>>> (20110527/exresnte-138) >>>>> ACPI Error: Method execution failed [\_SB_.BAT0._UID] (Node >>>>> 0xfffffe00094a51c0), AE_AML_NO_OPERAND (20110527/uteval-113) >>>> >>>> This looks very much like a heisenbug reported several times here. >>>> E.g.: >>>> http://lists.freebsd.org/pipermail/freebsd-acpi/2012-December/007962.h= tml >>>> >>>>> I suspected it started with a BIOS update (A07 -> A09). >>>>> Following the handbook, I took a look at acpidump. Sad to say, >>>>> it all was Greek to me, I could't even compile it back using >>>>> iasl (35 Errors). However, while skimming it I noticed names >>>>> of many versions of Windows and in addition to that, "Linux". >>>>> Just to try, I put hw.acpi.osname=3D"Linux" to /boot/loader.conf. >>>>> Since that I've never get the panic again (for ~3 weeks). >>>>> I hope this is not just a coincidence. >>>> >>>> It very well could be. >>>> >>>>> Maybe this experience can help somebody else. >>>>> >>>>> If any of ACPI developers wants to play with the problem >>>>> I can provide more info (sorry, no crashdump, was not enabled), >>>>> do tests, etc. >>>> >>>> Please at least enable printing of a stack trace. >>>> Better do get the crash dump. >>>> >>>> P.S. I suspect that the issue we are discussing with hps in this maili= ng >>>> list could be related to this problem. >>> >>> About me, I've currently added the following to my /boot/loader.conf: >>> >>> debug.acpi.disabled=3D"acad cmbat" >>> >>> And it solved my panics but unfortunately I must say bye to the battery >>> information. >>> >>> Regards, >> >> By the way, may be this is related? :) >> >> http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/173408 >> >> Cheers, >> > > I'm sorry I forgot to update the thread - good you're reminding. > Andriy did a brilliant job at debugging the issue and I owe him > to say in public: Thank you, Andriy! > > The results are: > - hw.acpi.osname=3D"Linux" is not relevant > - there's some ACPICA issue Andriy took to discuss with other > hackers (and much above my competence to comment) > - a temporary workaround: > > --- sys/dev/acpica/acpi_battery.c (revision 248682) > +++ sys/dev/acpica/acpi_battery.c (working copy) > @@ -360,6 +360,8 @@ > int error, unit; > device_t dev; > > + mtx_lock(&Giant); > + > /* For commands that use the ioctl_arg struct, validate it first. */ > error =3D ENXIO; > unit =3D 0; > @@ -417,6 +419,7 @@ > error =3D EINVAL; > } > > + mtx_unlock(&Giant); > return (error); > } > > The patch works for me without any problem. I guess it won't hurt > your system ;-) but I actually don't know if/how it relates to your > PR. > > BR > Oli --=20 Demelier David