From owner-freebsd-acpi@FreeBSD.ORG Fri May 14 01:21:50 2010 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C89F9106566B for ; Fri, 14 May 2010 01:21:50 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4C4C38FC0A for ; Fri, 14 May 2010 01:21:49 +0000 (UTC) Received: by fxm17 with SMTP id 17so1058604fxm.13 for ; Thu, 13 May 2010 18:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=IZier/nLVzWlChzrlXu1CH1m3zljmHpgd7KtU2rP0Ag=; b=MHSGCbixZFu8wvs/o++9ukhmirDbMkLP46au6okJve+SLrjPmfoqfT/JCJ43OBvdBh eSaAq2xb461IsPy0KSZDo50NyB6jb6KlnLyh/16DH6I4HBBCQbU2b3BtuMD1wcl9IWgo o3zOml9ln32lK3cOz/xhznSkLK6ToeBcTMBdM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=tbenMWUhxmfHbBG1p7hutkqeq4aPEBYUd4fys2n1DhGIcjM9UdDqfdVTFjQp9yivDw GPJ/2itbiZTqNFuiEjz6W3NFccqGpIBAZjiuHmsB+ZmEJyHAp1bzlfxv2Ivv5aSsrbvX Jztl4JwM9aBu/BI000dsA1obWwgCdBHGRHMPg= MIME-Version: 1.0 Received: by 10.239.193.3 with SMTP id g3mr62764hbi.122.1273798453869; Thu, 13 May 2010 17:54:13 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.239.129.207 with HTTP; Thu, 13 May 2010 17:54:13 -0700 (PDT) In-Reply-To: References: <4DEBDE2C-C0D2-469D-AC42-DD5027926424@FreeBSD.org> <1273257226.1671.3.camel@malikania.fr> Date: Fri, 14 May 2010 02:54:13 +0200 X-Google-Sender-Auth: _7Gcp8glvFU6PNK8m-oa2Msp8HE Message-ID: From: Attilio Rao To: Giovanni Trematerra Content-Type: text/plain; charset=UTF-8 Cc: freebsd-acpi@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Kernel panic when unpluggin AC adaptor X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2010 01:21:51 -0000 2010/5/14 Giovanni Trematerra : > On Thu, May 13, 2010 at 1:09 AM, Brandon Gooch > wrote: >> On Wed, May 12, 2010 at 9:41 AM, Attilio Rao wrote: >>> 2010/5/12 David DEMELIER : >>>> I remove the patch, and built the kernel (I updated the src this >>>> morning) and it does not panic now. It's really odd. If it reappears >>>> soon I will tell you. >>> >>> I looked at the code with Giovanni and I have the feeling that the >>> race with the idle thread may still be fatal. >>> We need to fix that. >>> >>> Attilio >>> >> >> That seems to be the case, as my laptop shows about an 80-85 % chance >> of experiencing a panic if left idle for long-ish periods of time (2 >> to 4 hours). I usually rebuild world or big ports overnight, and more >> often than not I wake up to a panicked machine, same situation every >> time: >> >> ... >> rman_get_bushandle() at rman_get_bushandle+0x1 >> sched_idletd() at sched_idletd+0x123 >> fork_exit() at fork_exit+0x12a >> fork_trampoline() at fork_trampoline+0xe >> ... >> >> The kernel/userland is rebuilt, the ports are finished compiling -- >> it's in the time AFTER the completion of all tasks that the machine >> gets bored and tries to kill itself :) >> >> I have seen the AC adapter plug/unplug "hang" in the past on this >> laptop, but I never made the connection between the events, as >> nowadays my laptop usually stays plugged in :( >> >> Attilio, I hope you can track this one down, let me know if I can do >> anything to help or test... >> > > Attilio and I came up with this patch. It seems ready for stress > testing and review > Please test and report back. I have still to review it completely, hope to do that asap. Attilio -- Peace can only be achieved by understanding - A. Einstein