From owner-freebsd-stable@FreeBSD.ORG Mon Sep 24 08:24:18 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E258D1065672; Mon, 24 Sep 2012 08:24:18 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 33B508FC0A; Mon, 24 Sep 2012 08:24:18 +0000 (UTC) Received: by lbbgg13 with SMTP id gg13so7754326lbb.13 for ; Mon, 24 Sep 2012 01:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=thVmIBWAi6hMYwsWcS6C8NPg1qeYx6qhE6Qee3vUNZI=; b=r3krHz26vvx5NqdvpKOOnuafLtQhqDns6s71iD2MwcaC3pqGWEBTwEW2empA4Nlezt J+pZUPVehsm0zM8z98r6s1MYiY56xB9uKqjykn13bXtoI0hwVxi2zj4GL+UR5So/fioy +bFGFaf9HpQG4MHEcW8Q7bV9PS5/Dbusp4iRb5nRzBNJfK/bdYrM1eQngoB7A8RvUnpi JuO3Tn3D8W7MNHcpRjevIqO2p/YsUuMTjbnTOHhu3HCeJt9e3HM5rM5bfdR2N3kMewI6 djgVKjmfQumyWap1LX28uWPmGS6B924JqClY0svaRq8mY3JKjLJ/UTw1crDT2t7QQvOQ RcVg== Received: by 10.112.103.68 with SMTP id fu4mr4108905lbb.56.1348475050801; Mon, 24 Sep 2012 01:24:10 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id o7sm4104182lbg.4.2012.09.24.01.24.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Sep 2012 01:24:09 -0700 (PDT) Sender: Alexander Motin Message-ID: <506018A7.1070006@FreeBSD.org> Date: Mon, 24 Sep 2012 11:24:07 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120628 Thunderbird/13.0.1 MIME-Version: 1.0 To: Barbara References: <505F73F2.80501@FreeBSD.org> In-Reply-To: <505F73F2.80501@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@FreeBSD.org, Andriy Gapon 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: Mon, 24 Sep 2012 08:24:19 -0000 On 23.09.2012 23:41, Andriy Gapon wrote: > 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. Good catch. Thank you. Slightly modified patch committed at r240884. -- Alexander Motin