From owner-freebsd-acpi@FreeBSD.ORG Wed Oct 13 13:13:40 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 BF5E6106566C for ; Wed, 13 Oct 2010 13:13:40 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.freebsd.org (Postfix) with ESMTP id 518078FC14 for ; Wed, 13 Oct 2010 13:13:39 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=yevn+QCjI6xy199BDvBOOiO14qYvyLq62he9tTtU3M8= c=1 sm=1 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=WJ_ZKJNk5Y1xWUdV9vkA:9 a=wqg3F_27W-vzPpoU1VsA:7 a=7wV1Z1MjVwzmTQVY4vFih47dqQIA:4 a=wPNLvfGTeEIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 34498301; Wed, 13 Oct 2010 15:13:38 +0200 From: Hans Petter Selasky To: Andriy Gapon Date: Wed, 13 Oct 2010 15:14:57 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <201010121209.06397.hselasky@c2i.net> <201010121425.07279.hselasky@c2i.net> <4CB4C882.6050006@icyb.net.ua> In-Reply-To: <4CB4C882.6050006@icyb.net.ua> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201010131514.57188.hselasky@c2i.net> Cc: freebsd-acpi@freebsd.org Subject: Re: MacBookPro 5,1 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: Wed, 13 Oct 2010 13:13:40 -0000 On Tuesday 12 October 2010 22:43:46 Andriy Gapon wrote: > on 12/10/2010 15:25 Hans Petter Selasky said the following: > > On Tuesday 12 October 2010 13:15:26 Andriy Gapon wrote: > >> on 12/10/2010 13:09 Hans Petter Selasky said the following: > >>> Hi, > >>> > >>> My MacBookPro 5,1 does not boot using -current because memory inside > >>> the ACPI kernel module is used after free. > >>> > >>> The following patch temporily mitigates the problem: > >>> > >>> /usr/src/sys/dev/acpica/Osd/OsdMemory.c > >>> > >>> void > >>> AcpiOsFree(void *Memory) > >>> { > >>> + if (cold == 0) > >>> > >>> free(Memory, M_ACPICA); > >>> > >>> } > >>> > >>> Is there any way to debug this from user-land? > >> > >> I think that the best way is to get a backtrace at least or better a > >> crashdump. > > > > The crashdump is not helpful. It crashes at init time, while the actual > > free happens very early during boot. > > Still a backtrace would be useful, I think. > Or track all calls to AcpiOsFree, e.g. using DTrace or stack(9) or etc. Do you have any hints how a shall configure DTrace to trace AcpiOsFree() ? --HPS