From owner-freebsd-stable@FreeBSD.ORG Wed May 19 18:40:08 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA3FD1065670; Wed, 19 May 2010 18:40:08 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id E84928FC1B; Wed, 19 May 2010 18:40:07 +0000 (UTC) Received: by iwn5 with SMTP id 5so1045497iwn.13 for ; Wed, 19 May 2010 11:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=BJHhhCUUQByvchiAmPRrS7I4FJDPQU+/iE5ve+GnIHE=; b=iEJ7XPYMZJngSU3to7W5eXwSwKZSxqO2+3KxmFubTdOhRuz1LOSWHAN3N3LvWfrJ4q L7458A/Q1a+Chkn2S5/EXi3qf1uJaKJRisXMKVLDSjnszYQh0Tsv0y5OsHYuCBhkqtsr bjqkbyW1wWzz3gemOkAGcg8uFiaiSQw6LHy4s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=R/BAqlar84yM1Z9jvud0mJWM4L/eqcosJUuo6bZ5LxCZhgUB/mkviubIdsZpzdCj1G bk5Q9HMSDglO6SKUXb50Lwyp4A1ryZN5vHvyDl30JU3FErSFEpQnXC5fOKnJMJDap3Nu LGfW7c4sjWZfjaxxdpPsuubc9PdveuR/qKpvA= MIME-Version: 1.0 Received: by 10.231.155.3 with SMTP id q3mr4138711ibw.20.1274294386724; Wed, 19 May 2010 11:39:46 -0700 (PDT) Received: by 10.231.182.195 with HTTP; Wed, 19 May 2010 11:39:46 -0700 (PDT) In-Reply-To: References: <4DEBDE2C-C0D2-469D-AC42-DD5027926424@FreeBSD.org> Date: Wed, 19 May 2010 13:39:46 -0500 Message-ID: From: Brandon Gooch To: Giovanni Trematerra Content-Type: text/plain; charset=ISO-8859-1 Cc: Attilio Rao , David DEMELIER , freebsd-acpi@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Kernel panic when unpluggin AC adaptor X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 18:40:08 -0000 On Tue, May 18, 2010 at 10:47 PM, Brandon Gooch wrote: > On Tue, May 18, 2010 at 9:04 AM, Giovanni Trematerra > wrote: >> On Sat, May 15, 2010 at 9:12 PM, Brandon Gooch >> wrote: >>> On Thu, May 13, 2010 at 7:25 PM, Giovanni Trematerra >>> wrote: >>>> 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. >>>> >>>> Thank you >>>> >>>> P.S: all the faults are only mine. >>> >>> I tried the patch, and my kernel panics I panic on boot. I have >>> 8.5MB(!) of JPG images (6 of them) if anyone needs to see them. I'm >>> looking for a place to post them, but if anyone wants, I can send via >>> e-mail... >> >> Hi Brandon, >> Could you please, try this new one? The panic at boot stage should be solved, >> at least I tried on a 8-way machine and all went ok at boot. >> Please, remove WITNESS_SKIPSPIN from your kernel config file. >> This patch might be sub-optimal and contains style(9) error but if it >> works we are >> on the right way. >> Let me know if it works for you. > > Applied the patch, built, installed, and booted new kernel: no panic! > > I will remove WITNESS_SKIPSPIN and build another kernel. Then I'll > "try" to trigger the panic (by letting my laptop sit idle after a > buildworld session). > > Thanks for giving this some attention, I hope you and/or others are > able to get to the bottom of this... Hey everyone, just reporting in: The laptop has experienced the longest uptime it's seen in a while -- so far, so good! I'll keep the machine up and running just in case... -Brandon