From owner-freebsd-stable@FreeBSD.ORG Sun Sep 23 20:41:28 2012 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 03457106564A; Sun, 23 Sep 2012 20:41:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id D842E8FC14; Sun, 23 Sep 2012 20:41:26 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA14513; Sun, 23 Sep 2012 23:41:24 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1TFszU-0000vV-9e; Sun, 23 Sep 2012 23:41:24 +0300 Message-ID: <505F73F2.80501@FreeBSD.org> Date: Sun, 23 Sep 2012 23:41:22 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120913 Thunderbird/15.0.1 MIME-Version: 1.0 To: Barbara References: In-Reply-To: X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Alexander Motin , freebsd-stable@FreeBSD.org Subject: Re: Fatal trap 12: hda 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: Sun, 23 Sep 2012 20:41:28 -0000 on 23/09/2012 23:10 Barbara said the following: > After updating src on RELENG_9 from r240236 to r240821 I have rebuilt > my world+kernel. > On reboot I had a kernel panic, "supervisor read, page not present" > for process swapper. > Trying to reboot in Single User Mode I accidentally disabled ACPI. > Luckily the machine booted succesfully but there was nothing new in > /var/crash. > Then I tried again with ACPI enabled: same kernel panic. > So I run nm on the instruction pointer of the panic and I noticed that > it was in hdaa_sense_init, in sys/dev/sound/pci/hda/hdaa.c. > BTW, I have "device sound" and "device snd_hda" in my KERNCONF, and > the sound hw detection happens before HDs, is that the reason why I > wasn't able to get a dump or dumping using DDB and the panicking > process is swapper? Is there any trick I'm missing for that? > > Booting in verbose mode and comparing the output with ACPI enabled > (where the panic happens) and disabled, I guessed that the problem was > where "No presence detection support at nid..." is printed, as it was > missing in the former case for nid 27 - Headphone (Green Jack). With > ACPI disabled the value was looking quite weird: 36765696. > So I made the following change: > > -------------------------------------------------------------------------------- > --- sys/dev/sound/pci/hda/hdaa.c.orig 2012-09-22 20:06:20.000000000 +0200 > +++ sys/dev/sound/pci/hda/hdaa.c 2012-09-23 20:39:32.000000000 +0200 > @@ -627,7 +627,7 @@ > (HDA_CONFIG_DEFAULTCONF_MISC(w->wclass.pin.config) & 1) != 0) { > device_printf(devinfo->dev, > "No presence detection support at nid %d\n", > - as[i].pins[15]); > + as->pins[15]); > } else { > if (w->unsol < 0) > poll = 1; > -------------------------------------------------------------------------------- > > Maybe the fix is not correct, but at least the new kernel boots successfully. > Can someone review that? > I tried looking in svn commits between the two builds, but I don't > know what exposed the problem. > If anyone is interested in my verbose log, or doing some tests, please ask. Your patch looks correct, looks like a bug could have been introduced via copy+paste. -- Andriy Gapon