From owner-freebsd-ppc@FreeBSD.ORG Sun Jul 8 07:57:25 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAC1D106566B; Sun, 8 Jul 2012 07:57:25 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 87F4E8FC12; Sun, 8 Jul 2012 07:57:25 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so18562532pbb.13 for ; Sun, 08 Jul 2012 00:57:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=Lg5M8da9xZ5KX4uj8T3QiT7t0aitIuf6OSIXLYacx4k=; b=I0O7OV8gLtIkjILuRa4d+m+XY4kJftYXPrkRPRlYODkaSWgydLxGdrSzbJpVW7Shaa Tjj6nXS2JRQT9b4NRXZMcTfinKKNo+eCSQbwiC5i3gdg1OgMVfzX2NvAwv15f7cFejNz 5xj8q7vH5SNdgat/B23mmM6s30Kg+K6mk14e8fuawFE46hWTngOQ8ynlHg8VTpcYr8vN Z8pEDvcERFAT7PH/DdFHD6Bcw+1GeaT9ZmtnVq/ll3V9Cn/YQYrSdlU43c/YWi++r5w1 m05K4iHtL6z2vwJ/pYT2uNeoYEY5FAlryraGhTUKLZzMOH6OdRBw9I1r+uzI1BgYEqtk pCfg== MIME-Version: 1.0 Received: by 10.68.209.197 with SMTP id mo5mr50207879pbc.72.1341734245130; Sun, 08 Jul 2012 00:57:25 -0700 (PDT) Sender: chmeeedalf@gmail.com Received: by 10.68.224.226 with HTTP; Sun, 8 Jul 2012 00:57:25 -0700 (PDT) Date: Sun, 8 Jul 2012 03:57:25 -0400 X-Google-Sender-Auth: 2H0wXgBpOKBXyKr8DD_h40jImTU Message-ID: From: Justin Hibbits To: FreeBSD Current Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD PowerPC ML Subject: Kernel panic -- Memory modified after free X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 07:57:25 -0000 I upgraded my kernel yesterday, after testing alc@'s patch for mmu_oea (PowerPC 32-bit, AIM), and now I'm seeing the kernel panic in the subject. Unfortunately, I didn't keep my knonw-good working kernel from prior to testing alc@'s patch, so the most recent kernel I have that works is from over a year ago, so booting to it means I get no networking, as the ABI has changed. With this, every time it panics, it shows "Most recently used by 'bus'". Has anyone else seen this kind panic from recent kernels? For further testing, I tried downloading the kernel tarball from allbsd.org, from the 20120601 snapshot, and that also shows the same panic. Also, this only occurs on my G4 tower, which is a dual processor machine. The exact same kernels work fine on my PowerBook, which is single processor. - Justin From owner-freebsd-ppc@FreeBSD.ORG Sun Jul 8 20:55:52 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF8C7106566C; Sun, 8 Jul 2012 20:55:52 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 466C28FC12; Sun, 8 Jul 2012 20:55:51 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q68KthHL045277; Sun, 8 Jul 2012 22:55:44 +0200 (CEST) (envelope-from andreast-list@fgznet.ch) Message-ID: <4FF9F3CF.6050608@fgznet.ch> Date: Sun, 08 Jul 2012 22:55:43 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 To: Alan Cox References: <20120707102004.3e874201@narn.knownspace> <4FF87446.2090903@rice.edu> In-Reply-To: <4FF87446.2090903@rice.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: alc@freebsd.org, Justin Hibbits , freebsd-ppc@freebsd.org Subject: Re: Panic with latest pmap lock changes. X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 20:55:52 -0000 On 07.07.12 19:39, Alan Cox wrote: > On 07/07/2012 09:20, Justin Hibbits wrote: >> Looks like I spoke too soon about the pmap lock changes working on my >> G4. After about 24 hours of uptime, it panicked with the following: >> >> _rw_wlock_hard: recursing but non-recursive rw pmap pv global >> @ /home/chmeee/freebsd/src/sys/powerpc/aim/mmu_oea.c:2301 >> >> I think the attached patch should fix it (Untested, except for >> compiling). >> > > Ugh. Sorry. > > The attached patch eliminates the lock recursion. While I was doing > that, I noticed that the pmap_ts_referenced() implementations on powerpc > have the wrong return type. Oddly, the comments in mmu_if.h have the > return type correct, but the code two or three lines later has it wrong. Fyi, I'm building world with the patch mentioned in this thread and the kernel updated to 238258. (G5-SMP 32-bit) So far it looks promising. Before 238258 I got reliable machine locks/freeze w/o any idea what was happening. If I reverted mmu_oea.c back to 238158, one before the commit from you Alan, I was able to get a successful full world/kernel build cycle. Yes, I confirmed that it booted, but I was not able to run a full world/kernel cycle since I lost my GEOM_APM config ;). Anyway, as said, it looks promising and it will take some hours to complete. Thanks, Andreas From owner-freebsd-ppc@FreeBSD.ORG Mon Jul 9 09:50:01 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 42BA2106564A; Mon, 9 Jul 2012 09:50:01 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id ED1F78FC14; Mon, 9 Jul 2012 09:50:00 +0000 (UTC) Received: from ncsd.bris.ac.uk ([137.222.10.59] helo=ncs.bris.ac.uk) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1SoAbP-0002vm-Um; Mon, 09 Jul 2012 10:50:00 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncs.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1SoAbP-0007e6-Lw; Mon, 09 Jul 2012 10:49:59 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5) with ESMTP id q699nxC9052989; Mon, 9 Jul 2012 10:49:59 +0100 (BST) (envelope-from mexas@bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5/Submit) id q699nxPl052988; Mon, 9 Jul 2012 10:49:59 +0100 (BST) (envelope-from mexas@bris.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bris.ac.uk using -f Date: Mon, 9 Jul 2012 10:49:59 +0100 From: Anton Shterenlikht To: Marius Strobl Message-ID: <20120709094958.GB52954@mech-cluster241.men.bris.ac.uk> References: <20120619104247.GA13630@mech-cluster241.men.bris.ac.uk> <20120630121634.GA94551@alchemy.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120630121634.GA94551@alchemy.franken.de> User-Agent: Mutt/1.4.2.3i Cc: x11@freebsd.org, Anton Shterenlikht , freebsd-sparc64@freebsd.org, freebsd-ppc@freebsd.org Subject: Re: graphics/libGL regression on sparc64 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 09:50:01 -0000 On Sat, Jun 30, 2012 at 02:16:34PM +0200, Marius Strobl wrote: > On Tue, Jun 19, 2012 at 11:42:47AM +0100, Anton Shterenlikht wrote: > > On sparc64 r235474, > > updating from libGL-7.4.4 to 7.6.1 I get: > > There are several problems preventing Xorg bits to build on sparc64 > (and powerpc) since the update to 7.5.2. First, make sure you have a > ports tree with graphics/libdrm/Makefile rev. 1.25. Then apply the > following patches: > http://people.freebsd.org/~bapt/fix-hal-on-sparc64.diff > http://people.freebsd.org/~marius/dri_libGL_libdrm.diff > > According to a quick test, the old server works fine with both the > mach64 and the sunffb driver on sparc64. When running `Xorg -configure` > you need to manually fix the resulting configuration file though > as any device on the PCI bus not being mach64 compatible is detected > as a radeon chip. > However, while the new server selected with WITH_NEW_XORG builds > just fine on sparc64 with these patches, it doesn't work there. For > mach64, there isn't any indication in the log why this doesn't work > besides "no screens found", although the configuration is correct, > libdrm is built without KMS support and the mach64 being detected. > For sunffb, it just segfaults. > > Marius Is there a PR on this? I'd like to track it. I'm sorry, but I don't have the skill or time to experiment with this. I guess I wouldn't upgrade until this is resolved. Thanks anyway -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 From owner-freebsd-ppc@FreeBSD.ORG Mon Jul 9 11:07:17 2012 Return-Path: Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A47121065672 for ; Mon, 9 Jul 2012 11:07:17 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8E37A8FC22 for ; Mon, 9 Jul 2012 11:07:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q69B7HO1075519 for ; Mon, 9 Jul 2012 11:07:17 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q69B7Gbq075517 for freebsd-ppc@FreeBSD.org; Mon, 9 Jul 2012 11:07:16 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 9 Jul 2012 11:07:16 GMT Message-Id: <201207091107.q69B7Gbq075517@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-ppc@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-ppc@FreeBSD.org X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 11:07:17 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o power/169021 ppc FreeBSD-9.0-powerpc-all.iso crashes host when mounted o power/167764 ppc Burning iso for ppc o power/164225 ppc Boot fails on IBM 7028-6E1 (heap memory claim failed) o power/161947 ppc multimedia/libdvdnav builds broken binaries on big end o power/161045 ppc X doesn't detect ADB mouse up event until another even o power/149009 ppc sysinstall(8) on powerpc fails to install manpages, so o power/140241 ppc [kernel] [patch] Linker set problems on PowerPC EABI o power/135576 ppc gdb cannot debug threaded programs on ppc o power/133503 ppc [sound] Sound stutter after switching ttys o power/133382 ppc [install] Installer gets signal 11 o power/131548 ppc ofw_syscons no longer supports 32-bit framebuffer 11 problems total. From owner-freebsd-ppc@FreeBSD.ORG Mon Jul 9 13:04:52 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5CC981065676; Mon, 9 Jul 2012 13:04:52 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id E007B8FC1B; Mon, 9 Jul 2012 13:04:51 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id q69D4Vde067273; Mon, 9 Jul 2012 15:04:31 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id q69D4VFU067272; Mon, 9 Jul 2012 15:04:31 +0200 (CEST) (envelope-from marius) Date: Mon, 9 Jul 2012 15:04:31 +0200 From: Marius Strobl To: Anton Shterenlikht Message-ID: <20120709130430.GN63893@alchemy.franken.de> References: <20120619104247.GA13630@mech-cluster241.men.bris.ac.uk> <20120630121634.GA94551@alchemy.franken.de> <20120709094958.GB52954@mech-cluster241.men.bris.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120709094958.GB52954@mech-cluster241.men.bris.ac.uk> User-Agent: Mutt/1.4.2.3i Cc: miwi@freebsd.org, x11@freebsd.org, freebsd-sparc64@freebsd.org, freebsd-ppc@freebsd.org Subject: Re: graphics/libGL regression on sparc64 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 13:04:52 -0000 On Mon, Jul 09, 2012 at 10:49:59AM +0100, Anton Shterenlikht wrote: > On Sat, Jun 30, 2012 at 02:16:34PM +0200, Marius Strobl wrote: > > On Tue, Jun 19, 2012 at 11:42:47AM +0100, Anton Shterenlikht wrote: > > > On sparc64 r235474, > > > updating from libGL-7.4.4 to 7.6.1 I get: > > > > There are several problems preventing Xorg bits to build on sparc64 > > (and powerpc) since the update to 7.5.2. First, make sure you have a > > ports tree with graphics/libdrm/Makefile rev. 1.25. Then apply the > > following patches: > > http://people.freebsd.org/~bapt/fix-hal-on-sparc64.diff > > http://people.freebsd.org/~marius/dri_libGL_libdrm.diff > > > > According to a quick test, the old server works fine with both the > > mach64 and the sunffb driver on sparc64. When running `Xorg -configure` > > you need to manually fix the resulting configuration file though > > as any device on the PCI bus not being mach64 compatible is detected > > as a radeon chip. > > However, while the new server selected with WITH_NEW_XORG builds > > just fine on sparc64 with these patches, it doesn't work there. For > > mach64, there isn't any indication in the log why this doesn't work > > besides "no screens found", although the configuration is correct, > > libdrm is built without KMS support and the mach64 being detected. > > For sunffb, it just segfaults. > > > > Marius > > Is there a PR on this? I'd like to track it. No, not currently; I'm waiting for bapt@ to complete a -exp-run for the options fix and to commit that patch and on feedback from miwi@ regarding the patch for fixing the dri, libGL and libdrm ports on powerpc and sparc64. Marius From owner-freebsd-ppc@FreeBSD.ORG Tue Jul 10 05:33:40 2012 Return-Path: Delivered-To: powerpc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D743106566B; Tue, 10 Jul 2012 05:33:40 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id DADC38FC0C; Tue, 10 Jul 2012 05:33:39 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.5/8.14.5) with ESMTP id q6A5L5a9004144; Tue, 10 Jul 2012 01:21:05 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.5/8.14.5/Submit) id q6A5L5JP004139; Tue, 10 Jul 2012 05:21:05 GMT (envelope-from tinderbox@freebsd.org) Date: Tue, 10 Jul 2012 05:21:05 GMT Message-Id: <201207100521.q6A5L5JP004139@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on powerpc/powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 05:33:40 -0000 TB --- 2012-07-10 03:01:42 - tinderbox 2.9 running on freebsd-current.sentex.ca TB --- 2012-07-10 03:01:42 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 des@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2012-07-10 03:01:42 - starting HEAD tinderbox run for powerpc/powerpc TB --- 2012-07-10 03:01:42 - cleaning the object tree TB --- 2012-07-10 03:01:42 - cvsupping the source tree TB --- 2012-07-10 03:01:42 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/powerpc/powerpc/supfile TB --- 2012-07-10 03:02:24 - building world TB --- 2012-07-10 03:02:24 - CROSS_BUILD_TESTING=YES TB --- 2012-07-10 03:02:24 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-10 03:02:24 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-10 03:02:24 - SRCCONF=/dev/null TB --- 2012-07-10 03:02:24 - TARGET=powerpc TB --- 2012-07-10 03:02:24 - TARGET_ARCH=powerpc TB --- 2012-07-10 03:02:24 - TZ=UTC TB --- 2012-07-10 03:02:24 - __MAKE_CONF=/dev/null TB --- 2012-07-10 03:02:24 - cd /src TB --- 2012-07-10 03:02:24 - /usr/bin/make -B buildworld >>> World build started on Tue Jul 10 03:02:24 UTC 2012 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything >>> World build completed on Tue Jul 10 05:17:19 UTC 2012 TB --- 2012-07-10 05:17:19 - generating LINT kernel config TB --- 2012-07-10 05:17:19 - cd /src/sys/powerpc/conf TB --- 2012-07-10 05:17:19 - /usr/bin/make -B LINT TB --- 2012-07-10 05:17:19 - cd /src/sys/powerpc/conf TB --- 2012-07-10 05:17:19 - /usr/sbin/config -m LINT TB --- 2012-07-10 05:17:19 - building LINT kernel TB --- 2012-07-10 05:17:19 - CROSS_BUILD_TESTING=YES TB --- 2012-07-10 05:17:19 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-10 05:17:19 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-10 05:17:19 - SRCCONF=/dev/null TB --- 2012-07-10 05:17:19 - TARGET=powerpc TB --- 2012-07-10 05:17:19 - TARGET_ARCH=powerpc TB --- 2012-07-10 05:17:19 - TZ=UTC TB --- 2012-07-10 05:17:19 - __MAKE_CONF=/dev/null TB --- 2012-07-10 05:17:19 - cd /src TB --- 2012-07-10 05:17:19 - /usr/bin/make -B buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Tue Jul 10 05:17:20 UTC 2012 >>> stage 1: configuring the kernel >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3.1: making dependencies >>> stage 3.2: building everything [...] cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ath/if_ath_tx_ht.c -I/src/sys/dev/ath cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ath/if_ath_tdma.c -I/src/sys/dev/ath cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ath/if_ath_sysctl.c -I/src/sys/dev/ath cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ath/if_ath_rx.c -I/src/sys/dev/ath cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ath/if_ath_rx_edma.c -I/src/sys/dev/ath cc1: warnings being treated as errors /src/sys/dev/ath/if_ath_rx_edma.c: In function 'ath_edma_rxfifo_flush': /src/sys/dev/ath/if_ath_rx_edma.c:543: warning: unused variable 'bf' [-Wunused-variable] *** Error code 1 Stop in /obj/powerpc.powerpc/src/sys/LINT. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2012-07-10 05:21:05 - WARNING: /usr/bin/make returned exit code 1 TB --- 2012-07-10 05:21:05 - ERROR: failed to build LINT kernel TB --- 2012-07-10 05:21:05 - 6772.30 user 886.02 system 8362.71 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-powerpc-powerpc.full From owner-freebsd-ppc@FreeBSD.ORG Tue Jul 10 11:50:05 2012 Return-Path: Delivered-To: powerpc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3C61D106566C; Tue, 10 Jul 2012 11:50:05 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id 0E0308FC12; Tue, 10 Jul 2012 11:50:04 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.5/8.14.5) with ESMTP id q6ABo4HE061146; Tue, 10 Jul 2012 07:50:04 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.5/8.14.5/Submit) id q6ABo4XD061145; Tue, 10 Jul 2012 11:50:04 GMT (envelope-from tinderbox@freebsd.org) Date: Tue, 10 Jul 2012 11:50:04 GMT Message-Id: <201207101150.q6ABo4XD061145@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on powerpc/powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 11:50:05 -0000 TB --- 2012-07-10 09:31:44 - tinderbox 2.9 running on freebsd-current.sentex.ca TB --- 2012-07-10 09:31:44 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 des@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2012-07-10 09:31:44 - starting HEAD tinderbox run for powerpc/powerpc TB --- 2012-07-10 09:31:44 - cleaning the object tree TB --- 2012-07-10 09:33:31 - cvsupping the source tree TB --- 2012-07-10 09:33:31 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/powerpc/powerpc/supfile TB --- 2012-07-10 09:34:23 - building world TB --- 2012-07-10 09:34:23 - CROSS_BUILD_TESTING=YES TB --- 2012-07-10 09:34:23 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-10 09:34:23 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-10 09:34:23 - SRCCONF=/dev/null TB --- 2012-07-10 09:34:23 - TARGET=powerpc TB --- 2012-07-10 09:34:23 - TARGET_ARCH=powerpc TB --- 2012-07-10 09:34:23 - TZ=UTC TB --- 2012-07-10 09:34:23 - __MAKE_CONF=/dev/null TB --- 2012-07-10 09:34:23 - cd /src TB --- 2012-07-10 09:34:23 - /usr/bin/make -B buildworld >>> World build started on Tue Jul 10 09:34:24 UTC 2012 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything >>> World build completed on Tue Jul 10 11:46:17 UTC 2012 TB --- 2012-07-10 11:46:17 - generating LINT kernel config TB --- 2012-07-10 11:46:17 - cd /src/sys/powerpc/conf TB --- 2012-07-10 11:46:17 - /usr/bin/make -B LINT TB --- 2012-07-10 11:46:17 - cd /src/sys/powerpc/conf TB --- 2012-07-10 11:46:17 - /usr/sbin/config -m LINT TB --- 2012-07-10 11:46:17 - building LINT kernel TB --- 2012-07-10 11:46:17 - CROSS_BUILD_TESTING=YES TB --- 2012-07-10 11:46:17 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-10 11:46:17 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-10 11:46:17 - SRCCONF=/dev/null TB --- 2012-07-10 11:46:17 - TARGET=powerpc TB --- 2012-07-10 11:46:17 - TARGET_ARCH=powerpc TB --- 2012-07-10 11:46:17 - TZ=UTC TB --- 2012-07-10 11:46:17 - __MAKE_CONF=/dev/null TB --- 2012-07-10 11:46:17 - cd /src TB --- 2012-07-10 11:46:17 - /usr/bin/make -B buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Tue Jul 10 11:46:17 UTC 2012 >>> stage 1: configuring the kernel >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3.1: making dependencies >>> stage 3.2: building everything [...] /src/sys/dev/ath/if_ath.c:1499: error: (Each undeclared identifier is reported only once /src/sys/dev/ath/if_ath.c:1499: error: for each function it appears in.) /src/sys/dev/ath/if_ath.c:1577: error: 'ATH_KTR_ERR' undeclared (first use in this function) /src/sys/dev/ath/if_ath.c:1628: error: 'HAL_INT_RXHP' undeclared (first use in this function) /src/sys/dev/ath/if_ath.c:1628: error: 'HAL_INT_RXLP' undeclared (first use in this function) /src/sys/dev/ath/if_ath.c: In function 'ath_init': /src/sys/dev/ath/if_ath.c:1880: error: 'HAL_INT_RXHP' undeclared (first use in this function) /src/sys/dev/ath/if_ath.c:1880: error: 'HAL_INT_RXLP' undeclared (first use in this function) *** Error code 1 Stop in /obj/powerpc.powerpc/src/sys/LINT. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2012-07-10 11:50:04 - WARNING: /usr/bin/make returned exit code 1 TB --- 2012-07-10 11:50:04 - ERROR: failed to build LINT kernel TB --- 2012-07-10 11:50:04 - 6734.05 user 883.08 system 8300.17 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-powerpc-powerpc.full From owner-freebsd-ppc@FreeBSD.ORG Tue Jul 10 17:54:43 2012 Return-Path: Delivered-To: powerpc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D1C52106564A; Tue, 10 Jul 2012 17:54:43 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id 9C59D8FC12; Tue, 10 Jul 2012 17:54:43 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.5/8.14.5) with ESMTP id q6AHsgo6014863; Tue, 10 Jul 2012 13:54:42 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.5/8.14.5/Submit) id q6AHsgJ2014862; Tue, 10 Jul 2012 17:54:42 GMT (envelope-from tinderbox@freebsd.org) Date: Tue, 10 Jul 2012 17:54:42 GMT Message-Id: <201207101754.q6AHsgJ2014862@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on powerpc/powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 17:54:43 -0000 TB --- 2012-07-10 15:36:43 - tinderbox 2.9 running on freebsd-current.sentex.ca TB --- 2012-07-10 15:36:43 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 des@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2012-07-10 15:36:43 - starting HEAD tinderbox run for powerpc/powerpc TB --- 2012-07-10 15:36:43 - cleaning the object tree TB --- 2012-07-10 15:38:35 - cvsupping the source tree TB --- 2012-07-10 15:38:35 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/powerpc/powerpc/supfile TB --- 2012-07-10 15:39:24 - building world TB --- 2012-07-10 15:39:24 - CROSS_BUILD_TESTING=YES TB --- 2012-07-10 15:39:24 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-10 15:39:24 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-10 15:39:24 - SRCCONF=/dev/null TB --- 2012-07-10 15:39:24 - TARGET=powerpc TB --- 2012-07-10 15:39:24 - TARGET_ARCH=powerpc TB --- 2012-07-10 15:39:24 - TZ=UTC TB --- 2012-07-10 15:39:24 - __MAKE_CONF=/dev/null TB --- 2012-07-10 15:39:24 - cd /src TB --- 2012-07-10 15:39:24 - /usr/bin/make -B buildworld >>> World build started on Tue Jul 10 15:39:25 UTC 2012 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything >>> World build completed on Tue Jul 10 17:51:20 UTC 2012 TB --- 2012-07-10 17:51:20 - generating LINT kernel config TB --- 2012-07-10 17:51:20 - cd /src/sys/powerpc/conf TB --- 2012-07-10 17:51:20 - /usr/bin/make -B LINT TB --- 2012-07-10 17:51:20 - cd /src/sys/powerpc/conf TB --- 2012-07-10 17:51:20 - /usr/sbin/config -m LINT TB --- 2012-07-10 17:51:20 - building LINT kernel TB --- 2012-07-10 17:51:20 - CROSS_BUILD_TESTING=YES TB --- 2012-07-10 17:51:20 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-10 17:51:20 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-10 17:51:20 - SRCCONF=/dev/null TB --- 2012-07-10 17:51:20 - TARGET=powerpc TB --- 2012-07-10 17:51:20 - TARGET_ARCH=powerpc TB --- 2012-07-10 17:51:20 - TZ=UTC TB --- 2012-07-10 17:51:20 - __MAKE_CONF=/dev/null TB --- 2012-07-10 17:51:20 - cd /src TB --- 2012-07-10 17:51:20 - /usr/bin/make -B buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Tue Jul 10 17:51:20 UTC 2012 >>> stage 1: configuring the kernel >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3.1: making dependencies >>> stage 3.2: building everything [...] /src/sys/dev/ath/if_ath.c:1499: error: (Each undeclared identifier is reported only once /src/sys/dev/ath/if_ath.c:1499: error: for each function it appears in.) /src/sys/dev/ath/if_ath.c:1577: error: 'ATH_KTR_ERR' undeclared (first use in this function) /src/sys/dev/ath/if_ath.c:1628: error: 'HAL_INT_RXHP' undeclared (first use in this function) /src/sys/dev/ath/if_ath.c:1628: error: 'HAL_INT_RXLP' undeclared (first use in this function) /src/sys/dev/ath/if_ath.c: In function 'ath_init': /src/sys/dev/ath/if_ath.c:1880: error: 'HAL_INT_RXHP' undeclared (first use in this function) /src/sys/dev/ath/if_ath.c:1880: error: 'HAL_INT_RXLP' undeclared (first use in this function) *** Error code 1 Stop in /obj/powerpc.powerpc/src/sys/LINT. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2012-07-10 17:54:42 - WARNING: /usr/bin/make returned exit code 1 TB --- 2012-07-10 17:54:42 - ERROR: failed to build LINT kernel TB --- 2012-07-10 17:54:42 - 6729.49 user 879.75 system 8279.13 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-powerpc-powerpc.full From owner-freebsd-ppc@FreeBSD.ORG Tue Jul 10 20:00:43 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4E60106567A for ; Tue, 10 Jul 2012 20:00:43 +0000 (UTC) (envelope-from alan.l.cox@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7535F8FC12 for ; Tue, 10 Jul 2012 20:00:43 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so877348pbb.13 for ; Tue, 10 Jul 2012 13:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=sFzfXNGHTOyWdblufI6dZqKaRUvciQng/I2K6CB6Ljk=; b=CVR2bK8JKx1QGtK650/1Ob2RIa4lZaEL9WdhoDYL0xcH2ImYkcgz+QYEKFlkg8Rc0j 8PFdZiPjNiwxp9PIPFCK5X9+TLRSON/1F0VcKZzjSPYzUhixNCpGwBqHAi3nJXpzoFCz Uaqn9seUwVqQioI3YtOiqPOxuuWoVrZ+YOSAzMorHR59kQc/Ar+6csLERAfM+bUfjrNp dlFatyu+WpT2KS2ExZ+60UFo3vv8U4FfwyVZ18gy2rt0zohmlQHxx0ESaryeq7E8AzCE b3POYtj/zgciaN/BjL9FURedKXsDHpwN9KnBtgpYQyLPeIxS02uUzep52bXsR4ZgVJiD n1Vg== MIME-Version: 1.0 Received: by 10.68.204.129 with SMTP id ky1mr73310577pbc.32.1341950443257; Tue, 10 Jul 2012 13:00:43 -0700 (PDT) Received: by 10.68.226.7 with HTTP; Tue, 10 Jul 2012 13:00:43 -0700 (PDT) In-Reply-To: <4FF9F3CF.6050608@fgznet.ch> References: <20120707102004.3e874201@narn.knownspace> <4FF87446.2090903@rice.edu> <4FF9F3CF.6050608@fgznet.ch> Date: Tue, 10 Jul 2012 15:00:43 -0500 Message-ID: From: Alan Cox To: Andreas Tobler Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-ppc@freebsd.org, Justin Hibbits , Alan Cox Subject: Re: Panic with latest pmap lock changes. X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: alc@freebsd.org List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 20:00:43 -0000 On Sun, Jul 8, 2012 at 3:55 PM, Andreas Tobler wrote: > On 07.07.12 19:39, Alan Cox wrote: > >> On 07/07/2012 09:20, Justin Hibbits wrote: >> >>> Looks like I spoke too soon about the pmap lock changes working on my >>> G4. After about 24 hours of uptime, it panicked with the following: >>> >>> _rw_wlock_hard: recursing but non-recursive rw pmap pv global >>> @ /home/chmeee/freebsd/src/sys/**powerpc/aim/mmu_oea.c:2301 >>> >>> I think the attached patch should fix it (Untested, except for >>> compiling). >>> >>> >> Ugh. Sorry. >> >> The attached patch eliminates the lock recursion. While I was doing >> that, I noticed that the pmap_ts_referenced() implementations on powerpc >> have the wrong return type. Oddly, the comments in mmu_if.h have the >> return type correct, but the code two or three lines later has it wrong. >> > > Fyi, I'm building world with the patch mentioned in this thread and the > kernel updated to 238258. (G5-SMP 32-bit) > > So far it looks promising. > > Before 238258 I got reliable machine locks/freeze w/o any idea what was > happening. > > If I reverted mmu_oea.c back to 238158, one before the commit from you > Alan, I was able to get a successful full world/kernel build cycle. > Yes, I confirmed that it booted, but I was not able to run a full > world/kernel cycle since I lost my GEOM_APM config ;). > > Anyway, as said, it looks promising and it will take some hours to > complete. > > Should I commit the patch? Alan From owner-freebsd-ppc@FreeBSD.ORG Tue Jul 10 20:09:31 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7F202106564A; Tue, 10 Jul 2012 20:09:31 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 22BC38FC08; Tue, 10 Jul 2012 20:09:31 +0000 (UTC) Received: by ggnm2 with SMTP id m2so512335ggn.13 for ; Tue, 10 Jul 2012 13:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8zTtrgu4H52I+YA6Yvon5sj+G3MO9IZ3BepzqhHAGHo=; b=XVZIl0FntSE6R7G7KjcFkOZZR55JZBDSLJV0QP9iXa96tD0796R/PPXFMIHHPcx6T1 LVeT7IvOvGiKVFhZTnErgLdsFAAhjMvLC13JdTp/ltA2rAXbwKgRla1qZ35fyUVJEDQ5 +fCu9XO5+TTZYgOj2sE3XkJSi6KbbYdJX4TsyBOcitqeHtM5IJhitz3uy3RBzOjkcyD6 cir0dlzzQA1aFJzlTKoQlVNogpdp9V4QPx3JyUOCzMy1ufkqMsWBnrVIrr3oj7uKJfOD FDyOay8S0lwT0qNqJPsJOq/V6DR56BhCoRkfQFNgKHGE7sV6Q8dMa8pWTERtigXZwmfT iPXA== MIME-Version: 1.0 Received: by 10.66.80.193 with SMTP id t1mr60090555pax.40.1341950969737; Tue, 10 Jul 2012 13:09:29 -0700 (PDT) Received: by 10.68.224.226 with HTTP; Tue, 10 Jul 2012 13:09:29 -0700 (PDT) In-Reply-To: References: <20120707102004.3e874201@narn.knownspace> <4FF87446.2090903@rice.edu> <4FF9F3CF.6050608@fgznet.ch> Date: Tue, 10 Jul 2012 16:09:29 -0400 Message-ID: From: Justin Hibbits To: alc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-ppc@freebsd.org, Alan Cox Subject: Re: Panic with latest pmap lock changes. X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 20:09:31 -0000 On Tue, Jul 10, 2012 at 4:00 PM, Alan Cox wrote: > On Sun, Jul 8, 2012 at 3:55 PM, Andreas Tobler wrote: > >> On 07.07.12 19:39, Alan Cox wrote: >> >>> On 07/07/2012 09:20, Justin Hibbits wrote: >>> >>>> Looks like I spoke too soon about the pmap lock changes working on my >>>> G4. After about 24 hours of uptime, it panicked with the following: >>>> >>>> _rw_wlock_hard: recursing but non-recursive rw pmap pv global >>>> @ /home/chmeee/freebsd/src/sys/**powerpc/aim/mmu_oea.c:2301 >>>> >>>> I think the attached patch should fix it (Untested, except for >>>> compiling). >>>> >>>> >>> Ugh. Sorry. >>> >>> The attached patch eliminates the lock recursion. While I was doing >>> that, I noticed that the pmap_ts_referenced() implementations on powerpc >>> have the wrong return type. Oddly, the comments in mmu_if.h have the >>> return type correct, but the code two or three lines later has it wrong. >>> >> >> Fyi, I'm building world with the patch mentioned in this thread and the >> kernel updated to 238258. (G5-SMP 32-bit) >> >> So far it looks promising. >> >> Before 238258 I got reliable machine locks/freeze w/o any idea what was >> happening. >> >> If I reverted mmu_oea.c back to 238158, one before the commit from you >> Alan, I was able to get a successful full world/kernel build cycle. >> Yes, I confirmed that it booted, but I was not able to run a full >> world/kernel cycle since I lost my GEOM_APM config ;). >> >> Anyway, as said, it looks promising and it will take some hours to >> complete. >> >> > Should I commit the patch? > > Alan > > > Unfortunately the computer I was testing the patch on isn't cooperating with me (as shown in another mail), so I haven't had a chance to test it. Visual inspection looks good, though, so I'm not opposed. - Justin From owner-freebsd-ppc@FreeBSD.ORG Tue Jul 10 20:23:38 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F2A61065673; Tue, 10 Jul 2012 20:23:38 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 9D9A78FC1C; Tue, 10 Jul 2012 20:23:37 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q6AKNSE9097624; Tue, 10 Jul 2012 22:23:29 +0200 (CEST) (envelope-from andreast-list@fgznet.ch) Message-ID: <4FFC8F40.90505@fgznet.ch> Date: Tue, 10 Jul 2012 22:23:28 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 To: alc@freebsd.org References: <20120707102004.3e874201@narn.knownspace> <4FF87446.2090903@rice.edu> <4FF9F3CF.6050608@fgznet.ch> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: Alan Cox , Justin Hibbits , freebsd-ppc@freebsd.org, Alan Cox Subject: Re: Panic with latest pmap lock changes. X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 20:23:38 -0000 On 10.07.12 22:00, Alan Cox wrote: > On Sun, Jul 8, 2012 at 3:55 PM, Andreas Tobler > wrote: > > On 07.07.12 19:39, Alan Cox wrote: > > On 07/07/2012 09:20, Justin Hibbits wrote: > > Looks like I spoke too soon about the pmap lock changes > working on my > G4. After about 24 hours of uptime, it panicked with the > following: > > _rw_wlock_hard: recursing but non-recursive rw pmap pv global > @ /home/chmeee/freebsd/src/sys/__powerpc/aim/mmu_oea.c:2301 > > I think the attached patch should fix it (Untested, except for > compiling). > > > Ugh. Sorry. > > The attached patch eliminates the lock recursion. While I was doing > that, I noticed that the pmap_ts_referenced() implementations on > powerpc > have the wrong return type. Oddly, the comments in mmu_if.h > have the > return type correct, but the code two or three lines later has > it wrong. > > > Fyi, I'm building world with the patch mentioned in this thread and > the kernel updated to 238258. (G5-SMP 32-bit) > > So far it looks promising. > > Before 238258 I got reliable machine locks/freeze w/o any idea what > was happening. > > If I reverted mmu_oea.c back to 238158, one before the commit from > you Alan, I was able to get a successful full world/kernel build cycle. > Yes, I confirmed that it booted, but I was not able to run a full > world/kernel cycle since I lost my GEOM_APM config ;). > > Anyway, as said, it looks promising and it will take some hours to > complete. > > > Should I commit the patch? Hmmm, I had three successful world/kernel builds with this patch. All with a GENERIC kernel. But I also had one freeze, no info/panic nothing, with a kernel where I disabled the WITNESS/INVARIANTS stuff. I think the patch is an improvement. I need to figure why I do not get any info when the machine freezes/locks whatever. But this can be done with the committed patch. Maybe we get bigger testing audience when it is committed. Thanks, Andreas From owner-freebsd-ppc@FreeBSD.ORG Tue Jul 10 22:13:26 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C67B1065670 for ; Tue, 10 Jul 2012 22:13:26 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2C01C8FC12 for ; Tue, 10 Jul 2012 22:13:26 +0000 (UTC) Received: by qcsg15 with SMTP id g15so448001qcs.13 for ; Tue, 10 Jul 2012 15:13:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:content-type:mime-version:subject:date:x-mailer; bh=8O1R0m4nFRe2OXTXCBWMFGJ+pf4QqBXtMxquSJ+D1qY=; b=PhTlOQD9dc8AIX+mp3q4ysdBUFDAcgRcIQ2TwuBnBrymK/1c7FUXHMz1QefZM5wl4I zlSTVN9NGxEif9AHeSOJoCZgZU8fln7g25rsc2xzD3WOW0yJ74DEleLAnRbbyzZ/Ya4N bQDUp9orFh3tER8sGPyZ7ILS0orvCMG5PHEjGRPSLmbN9aw28lnxEB+psnjWjY770ZVn yg3aRXCBz0BSf9tAafx7rTqeGAfGrGr90eCKplGyNg7Fm9PxIfXc3Q50pOjlhhztPQ9v eGdhT0f9bpqHI2dhFXPl4HZcHa2sN+mVZTOCgkkbkoNkmSss/O1salJBw8RdxIOkCYw5 0wbA== Received: by 10.224.70.144 with SMTP id d16mr83060158qaj.45.1341958405356; Tue, 10 Jul 2012 15:13:25 -0700 (PDT) Received: from triad.knownspace (pool-71-163-84-156.washdc.fios.verizon.net. [71.163.84.156]) by mx.google.com with ESMTPS id gy5sm693351qab.3.2012.07.10.15.13.23 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Jul 2012 15:13:24 -0700 (PDT) Message-Id: From: Justin Hibbits To: FreeBSD PowerPC ML Content-Type: multipart/mixed; boundary=Apple-Mail-2-726466157 Mime-Version: 1.0 (Apple Message framework v936) Date: Tue, 10 Jul 2012 18:13:22 -0400 X-Mailer: Apple Mail (2.936) Subject: CFT: nVidia backlight driver X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 22:13:26 -0000 --Apple-Mail-2-726466157 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Here's a backlight driver for those pbook/ibook/imac users with nVidia chips. I've only tested it on Peter Grehan's PowerBook 12" (GeForce FX Go5200), so it's not tested on anything else. It _shouldn't_ harm the card, but don't blame me if it does :) I'd like to make sure it does work on more than this machine before I commit it. - Justin --Apple-Mail-2-726466157 Content-Disposition: attachment; filename=nvbl.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="nvbl.diff" Content-Transfer-Encoding: 7bit Index: sys/powerpc/conf/GENERIC64 =================================================================== --- sys/powerpc/conf/GENERIC64 (revision 238269) +++ sys/powerpc/conf/GENERIC64 (working copy) @@ -194,6 +194,7 @@ device powermac_nvram # Open Firmware configuration NVRAM device smu # Apple System Management Unit device atibl # ATI-based backlight driver for PowerBooks/iBooks +device nvbl # nVidia-based backlight driver for PowerBooks/iBooks # ADB support device adb Index: sys/powerpc/conf/GENERIC =================================================================== --- sys/powerpc/conf/GENERIC (revision 238269) +++ sys/powerpc/conf/GENERIC (working copy) @@ -197,6 +197,7 @@ device smu # Apple System Management Unit device windtunnel # Apple G4 MDD fan controller device atibl # ATI-based backlight driver for PowerBooks/iBooks +device nvbl # nVidia-based backlight driver for PowerBooks/iBooks # ADB support device adb Index: sys/powerpc/powermac/nvbl.c =================================================================== --- sys/powerpc/powermac/nvbl.c (revision 0) +++ sys/powerpc/powermac/nvbl.c (working copy) @@ -0,0 +1,209 @@ +/*- + * Copyright (c) 2012 Justin Hibbits + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD: head/sys/powerpc/powermac/nvbl.c 232177 2012-02-26 13:45:25Z jhibbits $"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#define NVIDIA_BRIGHT_MIN (0x0ec) +#define NVIDIA_BRIGHT_MAX (0x538) +#define NVIDIA_BRIGHT_SCALE ((NVIDIA_BRIGHT_MAX - NVIDIA_BRIGHT_MIN)/100) +/* nVidia's MMIO registers are at PCI BAR[0] */ +#define NVIDIA_MMIO_REG (0x0) +#define NVIDIA_MMIO_PMC (0x0) +#define NVIDIA_PMC_OFF (NVIDIA_MMIO_PMC + 0x10f0) +#define NVIDIA_PMC_BL_SHIFT (16) +#define NVIDIA_PMC_BL_EN (1 << 31) +#define NVIDIA_MMIO_PCRTC0 (0x00600000) +#define NVIDIA_PCRTC0_BL (NVIDIA_MMIO_PCRTC0 + 0x081C) +#define NVIDIA_PCRTC0_MASK (0xFFFFFFFC) +#define NVIDIA_MMIO_PRAMDAC (0x00680000) +#define NVIDIA_PRAMDAC_FPCTL (NVIDIA_MMIO_PRAMDAC + 0x0848) +#define NVIDIA_FPCTL_MASK (0xCFFFFFCC) +#define NVIDIA_PRAMDAC_NO_LEVEL (0x20000022) + + +struct nvbl_softc { + device_t dev; + struct resource *sc_memr; + uint32_t sc_saved_ramdac; +}; + +static void nvbl_identify(driver_t *driver, device_t parent); +static int nvbl_probe(device_t dev); +static int nvbl_attach(device_t dev); +static int nvbl_setlevel(struct nvbl_softc *sc, int newlevel); +static int nvbl_getlevel(struct nvbl_softc *sc); +static int nvbl_sysctl(SYSCTL_HANDLER_ARGS); + +static device_method_t nvbl_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, nvbl_identify), + DEVMETHOD(device_probe, nvbl_probe), + DEVMETHOD(device_attach, nvbl_attach), + {0, 0}, +}; + +static driver_t nvbl_driver = { + "backlight", + nvbl_methods, + sizeof(struct nvbl_softc) +}; + +static devclass_t nvbl_devclass; + +DRIVER_MODULE(nvbl, vgapci, nvbl_driver, nvbl_devclass, 0, 0); + +static void +nvbl_identify(driver_t *driver, device_t parent) +{ + if (device_find_child(parent, "backlight", -1) == NULL) + device_add_child(parent, "backlight", -1); +} + +static int +nvbl_probe(device_t dev) +{ + char control[8]; + phandle_t handle; + + handle = OF_finddevice("mac-io/backlight"); + + if (handle <= 0) + return (ENXIO); + + if (OF_getprop(handle, "backlight-control", &control, sizeof(control)) < 0) + return (ENXIO); + + if (strcmp(control, "mnca") != 0) + return (ENXIO); + + device_set_desc(dev, "PowerBook backlight for nVidia graphics"); + + return (0); +} + +static int +nvbl_attach(device_t dev) +{ + struct nvbl_softc *sc; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + int rid; + + sc = device_get_softc(dev); + + rid = 0x10; /* BAR[0], for the MMIO register */ + sc->sc_memr = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE | RF_SHAREABLE); + if (sc->sc_memr == NULL) { + device_printf(dev, "Could not alloc mem resource!\n"); + return (ENXIO); + } + + sc->sc_saved_ramdac = bus_read_4(sc->sc_memr, NVIDIA_PRAMDAC_FPCTL) & + (~NVIDIA_FPCTL_MASK); + + /* Turn on big-endian mode */ + if (!(bus_read_stream_4(sc->sc_memr, NVIDIA_MMIO_PMC + 4) & 0x01000001)) { + bus_write_stream_4(sc->sc_memr, NVIDIA_MMIO_PMC + 4, 0x01000001); + mb(); + } + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "level", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + nvbl_sysctl, "I", "Backlight level (0-100)"); + + return (0); +} + +static int +nvbl_setlevel(struct nvbl_softc *sc, int newlevel) +{ + uint32_t pmc_reg; + + if (newlevel > 100) + newlevel = 100; + + if (newlevel < 0) + newlevel = 0; + + if (newlevel > 0) + newlevel = (newlevel * NVIDIA_BRIGHT_SCALE) + NVIDIA_BRIGHT_MIN; + + pmc_reg = bus_read_stream_4(sc->sc_memr, NVIDIA_PMC_OFF) & 0xffff; + pmc_reg |= NVIDIA_PMC_BL_EN | (newlevel << NVIDIA_PMC_BL_SHIFT); + bus_write_stream_4(sc->sc_memr, NVIDIA_PMC_OFF, pmc_reg); + + return (0); +} + +static int +nvbl_getlevel(struct nvbl_softc *sc) +{ + uint16_t level; + + level = bus_read_stream_2(sc->sc_memr, NVIDIA_PMC_OFF) & 0x7fff; + + if (level < NVIDIA_BRIGHT_MIN) + return 0; + + level = (level - NVIDIA_BRIGHT_MIN) / NVIDIA_BRIGHT_SCALE; + + return (level); +} + +static int +nvbl_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct nvbl_softc *sc; + int newlevel, error; + + sc = arg1; + + newlevel = nvbl_getlevel(sc); + + error = sysctl_handle_int(oidp, &newlevel, 0, req); + + if (error || !req->newptr) + return (error); + + return (nvbl_setlevel(sc, newlevel)); +} Index: sys/conf/files.powerpc =================================================================== --- sys/conf/files.powerpc (revision 238269) +++ sys/conf/files.powerpc (working copy) @@ -160,6 +160,7 @@ powerpc/powermac/kiic.c optional powermac kiic powerpc/powermac/macgpio.c optional powermac pci powerpc/powermac/macio.c optional powermac pci +powerpc/powermac/nvbl.c optional powermac nvbl powerpc/powermac/openpic_macio.c optional powermac pci powerpc/powermac/platform_powermac.c optional powermac powerpc/powermac/powermac_thermal.c optional powermac --Apple-Mail-2-726466157 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit --Apple-Mail-2-726466157-- From owner-freebsd-ppc@FreeBSD.ORG Tue Jul 10 22:22:42 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 104A2106566C; Tue, 10 Jul 2012 22:22:42 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by mx1.freebsd.org (Postfix) with ESMTP id CA75C8FC16; Tue, 10 Jul 2012 22:22:41 +0000 (UTC) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id 7A12E4C0207; Tue, 10 Jul 2012 17:22:41 -0500 (CDT) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id 786E54C01D0; Tue, 10 Jul 2012 17:22:41 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from mh11.mail.rice.edu ([127.0.0.1]) by mh11.mail.rice.edu (mh11.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id CKW2ARcoPPN7; Tue, 10 Jul 2012 17:22:41 -0500 (CDT) Received: from [10.74.20.46] (staff-74-dun20-046.rice.edu [10.74.20.46]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id BA4834C01CB; Tue, 10 Jul 2012 17:22:40 -0500 (CDT) Message-ID: <4FFCAB21.1040400@rice.edu> Date: Tue, 10 Jul 2012 17:22:25 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Andreas Tobler References: <20120707102004.3e874201@narn.knownspace> <4FF87446.2090903@rice.edu> <4FF9F3CF.6050608@fgznet.ch> <4FFC8F40.90505@fgznet.ch> In-Reply-To: <4FFC8F40.90505@fgznet.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: alc@freebsd.org, Alan Cox , Justin Hibbits , freebsd-ppc@freebsd.org Subject: Re: Panic with latest pmap lock changes. X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 22:22:42 -0000 On 7/10/2012 3:23 PM, Andreas Tobler wrote: > On 10.07.12 22:00, Alan Cox wrote: >> On Sun, Jul 8, 2012 at 3:55 PM, Andreas Tobler > > wrote: >> >> On 07.07.12 19:39, Alan Cox wrote: >> >> On 07/07/2012 09:20, Justin Hibbits wrote: >> >> Looks like I spoke too soon about the pmap lock changes >> working on my >> G4. After about 24 hours of uptime, it panicked with the >> following: >> >> _rw_wlock_hard: recursing but non-recursive rw pmap pv >> global >> @ /home/chmeee/freebsd/src/sys/__powerpc/aim/mmu_oea.c:2301 >> >> I think the attached patch should fix it (Untested, >> except for >> compiling). >> >> >> Ugh. Sorry. >> >> The attached patch eliminates the lock recursion. While I >> was doing >> that, I noticed that the pmap_ts_referenced() implementations on >> powerpc >> have the wrong return type. Oddly, the comments in mmu_if.h >> have the >> return type correct, but the code two or three lines later has >> it wrong. >> >> >> Fyi, I'm building world with the patch mentioned in this thread and >> the kernel updated to 238258. (G5-SMP 32-bit) >> >> So far it looks promising. >> >> Before 238258 I got reliable machine locks/freeze w/o any idea what >> was happening. >> >> If I reverted mmu_oea.c back to 238158, one before the commit from >> you Alan, I was able to get a successful full world/kernel build >> cycle. >> Yes, I confirmed that it booted, but I was not able to run a full >> world/kernel cycle since I lost my GEOM_APM config ;). >> >> Anyway, as said, it looks promising and it will take some hours to >> complete. >> >> >> Should I commit the patch? > > Hmmm, I had three successful world/kernel builds with this patch. All > with a GENERIC kernel. But I also had one freeze, no info/panic > nothing, with a kernel where I disabled the WITNESS/INVARIANTS stuff. > > I think the patch is an improvement. I need to figure why I do not get > any info when the machine freezes/locks whatever. But this can be done > with the committed patch. Maybe we get bigger testing audience when it > is committed. > A combined effect of this and the previous patch is that there will be a little more concurrency within the VM system on 32-bit aim/oea systems. This might have exposed a race in the machine-dependent code. The state of the locking on 32-bit aim/oea systems is now comparable to i386 and sparc64, but behind amd64 and aim/oea64. Alan From owner-freebsd-ppc@FreeBSD.ORG Tue Jul 10 23:56:57 2012 Return-Path: Delivered-To: powerpc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7998F1065672; Tue, 10 Jul 2012 23:56:57 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id 4A5C28FC0A; Tue, 10 Jul 2012 23:56:57 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.5/8.14.5) with ESMTP id q6ANuuBV050973; Tue, 10 Jul 2012 19:56:56 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.5/8.14.5/Submit) id q6ANuuK0050972; Tue, 10 Jul 2012 23:56:56 GMT (envelope-from tinderbox@freebsd.org) Date: Tue, 10 Jul 2012 23:56:56 GMT Message-Id: <201207102356.q6ANuuK0050972@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on powerpc/powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 23:56:57 -0000 TB --- 2012-07-10 21:30:55 - tinderbox 2.9 running on freebsd-current.sentex.ca TB --- 2012-07-10 21:30:55 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 des@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2012-07-10 21:30:55 - starting HEAD tinderbox run for powerpc/powerpc TB --- 2012-07-10 21:30:55 - cleaning the object tree TB --- 2012-07-10 21:34:07 - cvsupping the source tree TB --- 2012-07-10 21:34:07 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/powerpc/powerpc/supfile TB --- 2012-07-10 21:35:29 - building world TB --- 2012-07-10 21:35:29 - CROSS_BUILD_TESTING=YES TB --- 2012-07-10 21:35:29 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-10 21:35:29 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-10 21:35:29 - SRCCONF=/dev/null TB --- 2012-07-10 21:35:29 - TARGET=powerpc TB --- 2012-07-10 21:35:29 - TARGET_ARCH=powerpc TB --- 2012-07-10 21:35:29 - TZ=UTC TB --- 2012-07-10 21:35:29 - __MAKE_CONF=/dev/null TB --- 2012-07-10 21:35:29 - cd /src TB --- 2012-07-10 21:35:29 - /usr/bin/make -B buildworld >>> World build started on Tue Jul 10 21:35:30 UTC 2012 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything >>> World build completed on Tue Jul 10 23:53:40 UTC 2012 TB --- 2012-07-10 23:53:40 - generating LINT kernel config TB --- 2012-07-10 23:53:40 - cd /src/sys/powerpc/conf TB --- 2012-07-10 23:53:40 - /usr/bin/make -B LINT TB --- 2012-07-10 23:53:40 - cd /src/sys/powerpc/conf TB --- 2012-07-10 23:53:40 - /usr/sbin/config -m LINT TB --- 2012-07-10 23:53:40 - building LINT kernel TB --- 2012-07-10 23:53:40 - CROSS_BUILD_TESTING=YES TB --- 2012-07-10 23:53:40 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-10 23:53:40 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-10 23:53:40 - SRCCONF=/dev/null TB --- 2012-07-10 23:53:40 - TARGET=powerpc TB --- 2012-07-10 23:53:40 - TARGET_ARCH=powerpc TB --- 2012-07-10 23:53:40 - TZ=UTC TB --- 2012-07-10 23:53:40 - __MAKE_CONF=/dev/null TB --- 2012-07-10 23:53:40 - cd /src TB --- 2012-07-10 23:53:40 - /usr/bin/make -B buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Tue Jul 10 23:53:40 UTC 2012 >>> stage 1: configuring the kernel >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3.1: making dependencies >>> stage 3.2: building everything [...] cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ata/chipsets/ata-sis.c cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ata/chipsets/ata-via.c cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ath/if_ath.c -I/src/sys/dev/ath /src/sys/dev/ath/if_ath.c: In function 'ath_intr': /src/sys/dev/ath/if_ath.c:1499: error: 'ATH_KTR_INTR' undeclared (first use in this function) /src/sys/dev/ath/if_ath.c:1499: error: (Each undeclared identifier is reported only once /src/sys/dev/ath/if_ath.c:1499: error: for each function it appears in.) /src/sys/dev/ath/if_ath.c:1577: error: 'ATH_KTR_ERR' undeclared (first use in this function) *** Error code 1 Stop in /obj/powerpc.powerpc/src/sys/LINT. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2012-07-10 23:56:56 - WARNING: /usr/bin/make returned exit code 1 TB --- 2012-07-10 23:56:56 - ERROR: failed to build LINT kernel TB --- 2012-07-10 23:56:56 - 6787.34 user 905.23 system 8761.41 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-powerpc-powerpc.full From owner-freebsd-ppc@FreeBSD.ORG Wed Jul 11 05:54:56 2012 Return-Path: Delivered-To: powerpc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C9FB106566C; Wed, 11 Jul 2012 05:54:56 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id 34A4F8FC0A; Wed, 11 Jul 2012 05:54:56 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.5/8.14.5) with ESMTP id q6B5st8B082732; Wed, 11 Jul 2012 01:54:55 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.5/8.14.5/Submit) id q6B5strC082727; Wed, 11 Jul 2012 05:54:55 GMT (envelope-from tinderbox@freebsd.org) Date: Wed, 11 Jul 2012 05:54:55 GMT Message-Id: <201207110554.q6B5strC082727@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on powerpc/powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 05:54:56 -0000 TB --- 2012-07-11 03:33:09 - tinderbox 2.9 running on freebsd-current.sentex.ca TB --- 2012-07-11 03:33:09 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 des@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2012-07-11 03:33:09 - starting HEAD tinderbox run for powerpc/powerpc TB --- 2012-07-11 03:33:09 - cleaning the object tree TB --- 2012-07-11 03:34:41 - cvsupping the source tree TB --- 2012-07-11 03:34:41 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/powerpc/powerpc/supfile TB --- 2012-07-11 03:35:32 - building world TB --- 2012-07-11 03:35:32 - CROSS_BUILD_TESTING=YES TB --- 2012-07-11 03:35:32 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-11 03:35:32 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-11 03:35:32 - SRCCONF=/dev/null TB --- 2012-07-11 03:35:32 - TARGET=powerpc TB --- 2012-07-11 03:35:32 - TARGET_ARCH=powerpc TB --- 2012-07-11 03:35:32 - TZ=UTC TB --- 2012-07-11 03:35:32 - __MAKE_CONF=/dev/null TB --- 2012-07-11 03:35:32 - cd /src TB --- 2012-07-11 03:35:32 - /usr/bin/make -B buildworld >>> World build started on Wed Jul 11 03:35:33 UTC 2012 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything >>> World build completed on Wed Jul 11 05:51:24 UTC 2012 TB --- 2012-07-11 05:51:24 - generating LINT kernel config TB --- 2012-07-11 05:51:24 - cd /src/sys/powerpc/conf TB --- 2012-07-11 05:51:24 - /usr/bin/make -B LINT TB --- 2012-07-11 05:51:24 - cd /src/sys/powerpc/conf TB --- 2012-07-11 05:51:24 - /usr/sbin/config -m LINT TB --- 2012-07-11 05:51:24 - building LINT kernel TB --- 2012-07-11 05:51:24 - CROSS_BUILD_TESTING=YES TB --- 2012-07-11 05:51:24 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-11 05:51:24 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-11 05:51:24 - SRCCONF=/dev/null TB --- 2012-07-11 05:51:24 - TARGET=powerpc TB --- 2012-07-11 05:51:24 - TARGET_ARCH=powerpc TB --- 2012-07-11 05:51:24 - TZ=UTC TB --- 2012-07-11 05:51:24 - __MAKE_CONF=/dev/null TB --- 2012-07-11 05:51:24 - cd /src TB --- 2012-07-11 05:51:24 - /usr/bin/make -B buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Wed Jul 11 05:51:24 UTC 2012 >>> stage 1: configuring the kernel >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3.1: making dependencies >>> stage 3.2: building everything [...] cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ata/chipsets/ata-sis.c cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ata/chipsets/ata-via.c cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ath/if_ath.c -I/src/sys/dev/ath /src/sys/dev/ath/if_ath.c: In function 'ath_intr': /src/sys/dev/ath/if_ath.c:1499: error: 'ATH_KTR_INTR' undeclared (first use in this function) /src/sys/dev/ath/if_ath.c:1499: error: (Each undeclared identifier is reported only once /src/sys/dev/ath/if_ath.c:1499: error: for each function it appears in.) /src/sys/dev/ath/if_ath.c:1577: error: 'ATH_KTR_ERR' undeclared (first use in this function) *** Error code 1 Stop in /obj/powerpc.powerpc/src/sys/LINT. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2012-07-11 05:54:55 - WARNING: /usr/bin/make returned exit code 1 TB --- 2012-07-11 05:54:55 - ERROR: failed to build LINT kernel TB --- 2012-07-11 05:54:55 - 6789.82 user 904.02 system 8505.89 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-powerpc-powerpc.full From owner-freebsd-ppc@FreeBSD.ORG Wed Jul 11 12:01:58 2012 Return-Path: Delivered-To: powerpc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39896106566B; Wed, 11 Jul 2012 12:01:58 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id 099998FC26; Wed, 11 Jul 2012 12:01:57 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.5/8.14.5) with ESMTP id q6BC1vRm016756; Wed, 11 Jul 2012 08:01:57 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.5/8.14.5/Submit) id q6BC1v9U016755; Wed, 11 Jul 2012 12:01:57 GMT (envelope-from tinderbox@freebsd.org) Date: Wed, 11 Jul 2012 12:01:57 GMT Message-Id: <201207111201.q6BC1v9U016755@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on powerpc/powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 12:01:58 -0000 TB --- 2012-07-11 09:38:22 - tinderbox 2.9 running on freebsd-current.sentex.ca TB --- 2012-07-11 09:38:22 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 des@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2012-07-11 09:38:22 - starting HEAD tinderbox run for powerpc/powerpc TB --- 2012-07-11 09:38:22 - cleaning the object tree TB --- 2012-07-11 09:41:04 - cvsupping the source tree TB --- 2012-07-11 09:41:04 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/powerpc/powerpc/supfile TB --- 2012-07-11 09:42:10 - building world TB --- 2012-07-11 09:42:10 - CROSS_BUILD_TESTING=YES TB --- 2012-07-11 09:42:10 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-11 09:42:10 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-11 09:42:10 - SRCCONF=/dev/null TB --- 2012-07-11 09:42:10 - TARGET=powerpc TB --- 2012-07-11 09:42:10 - TARGET_ARCH=powerpc TB --- 2012-07-11 09:42:10 - TZ=UTC TB --- 2012-07-11 09:42:10 - __MAKE_CONF=/dev/null TB --- 2012-07-11 09:42:10 - cd /src TB --- 2012-07-11 09:42:10 - /usr/bin/make -B buildworld >>> World build started on Wed Jul 11 09:42:11 UTC 2012 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything >>> World build completed on Wed Jul 11 11:58:26 UTC 2012 TB --- 2012-07-11 11:58:26 - generating LINT kernel config TB --- 2012-07-11 11:58:26 - cd /src/sys/powerpc/conf TB --- 2012-07-11 11:58:26 - /usr/bin/make -B LINT TB --- 2012-07-11 11:58:26 - cd /src/sys/powerpc/conf TB --- 2012-07-11 11:58:26 - /usr/sbin/config -m LINT TB --- 2012-07-11 11:58:26 - building LINT kernel TB --- 2012-07-11 11:58:26 - CROSS_BUILD_TESTING=YES TB --- 2012-07-11 11:58:26 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-11 11:58:26 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-11 11:58:26 - SRCCONF=/dev/null TB --- 2012-07-11 11:58:26 - TARGET=powerpc TB --- 2012-07-11 11:58:26 - TARGET_ARCH=powerpc TB --- 2012-07-11 11:58:26 - TZ=UTC TB --- 2012-07-11 11:58:26 - __MAKE_CONF=/dev/null TB --- 2012-07-11 11:58:26 - cd /src TB --- 2012-07-11 11:58:26 - /usr/bin/make -B buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Wed Jul 11 11:58:26 UTC 2012 >>> stage 1: configuring the kernel >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3.1: making dependencies >>> stage 3.2: building everything [...] cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ata/chipsets/ata-sis.c cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ata/chipsets/ata-via.c cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ath/if_ath.c -I/src/sys/dev/ath /src/sys/dev/ath/if_ath.c: In function 'ath_intr': /src/sys/dev/ath/if_ath.c:1499: error: 'ATH_KTR_INTR' undeclared (first use in this function) /src/sys/dev/ath/if_ath.c:1499: error: (Each undeclared identifier is reported only once /src/sys/dev/ath/if_ath.c:1499: error: for each function it appears in.) /src/sys/dev/ath/if_ath.c:1577: error: 'ATH_KTR_ERR' undeclared (first use in this function) *** Error code 1 Stop in /obj/powerpc.powerpc/src/sys/LINT. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2012-07-11 12:01:57 - WARNING: /usr/bin/make returned exit code 1 TB --- 2012-07-11 12:01:57 - ERROR: failed to build LINT kernel TB --- 2012-07-11 12:01:57 - 6788.95 user 906.38 system 8615.20 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-powerpc-powerpc.full From owner-freebsd-ppc@FreeBSD.ORG Thu Jul 12 20:29:00 2012 Return-Path: Delivered-To: powerpc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5867F106566B; Thu, 12 Jul 2012 20:29:00 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id E8CB98FC0C; Thu, 12 Jul 2012 20:28:59 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.5/8.14.5) with ESMTP id q6CKSxKH036702; Thu, 12 Jul 2012 16:28:59 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.5/8.14.5/Submit) id q6CKSw2v036689; Thu, 12 Jul 2012 20:28:58 GMT (envelope-from tinderbox@freebsd.org) Date: Thu, 12 Jul 2012 20:28:58 GMT Message-Id: <201207122028.q6CKSw2v036689@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on powerpc/powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 20:29:00 -0000 TB --- 2012-07-12 20:13:29 - tinderbox 2.9 running on freebsd-current.sentex.ca TB --- 2012-07-12 20:13:29 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 des@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2012-07-12 20:13:29 - starting HEAD tinderbox run for powerpc/powerpc TB --- 2012-07-12 20:13:29 - cleaning the object tree TB --- 2012-07-12 20:13:29 - cvsupping the source tree TB --- 2012-07-12 20:13:29 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/powerpc/powerpc/supfile TB --- 2012-07-12 20:15:27 - building world TB --- 2012-07-12 20:15:27 - CROSS_BUILD_TESTING=YES TB --- 2012-07-12 20:15:27 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-12 20:15:27 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-12 20:15:27 - SRCCONF=/dev/null TB --- 2012-07-12 20:15:27 - TARGET=powerpc TB --- 2012-07-12 20:15:27 - TARGET_ARCH=powerpc TB --- 2012-07-12 20:15:27 - TZ=UTC TB --- 2012-07-12 20:15:27 - __MAKE_CONF=/dev/null TB --- 2012-07-12 20:15:27 - cd /src TB --- 2012-07-12 20:15:27 - /usr/bin/make -B buildworld >>> World build started on Thu Jul 12 20:15:28 UTC 2012 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes [...] ===> sbin/sysctl (installincludes) ===> sbin/tunefs (installincludes) ===> sbin/umount (installincludes) ===> secure (includes) cd /src/secure; /usr/bin/make buildincludes; /usr/bin/make installincludes ===> secure/lib (buildincludes) ===> secure/lib/libcrypto (buildincludes) make: don't know how to make tmdiff.h. Stop *** Error code 2 Stop in /src/secure/lib. *** Error code 1 Stop in /src/secure. *** Error code 1 Stop in /src/secure. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2012-07-12 20:28:58 - WARNING: /usr/bin/make returned exit code 1 TB --- 2012-07-12 20:28:58 - ERROR: failed to build world TB --- 2012-07-12 20:28:58 - 632.52 user 79.98 system 929.36 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-powerpc-powerpc.full From owner-freebsd-ppc@FreeBSD.ORG Thu Jul 12 23:43:26 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1FD4106566B; Thu, 12 Jul 2012 23:43:26 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 419FA8FC18; Thu, 12 Jul 2012 23:43:26 +0000 (UTC) Received: by qcsg15 with SMTP id g15so2169105qcs.13 for ; Thu, 12 Jul 2012 16:43:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:cc:x-mailer; bh=cDZ2IcC/PteIDB98nPSbbKQgAO56aex/8xQN3HmL/7w=; b=hFdutBDQF3VzHAw9VZavhLk8MsEG+ZWXFDUnNrkwmxIBw7MkiyrAuMX61Qxummh8I8 anWDBPFFV0BuOa/sAD+zmNyLrRf2UdCb+WnGuhEyO+HJUYcZClfaHwoi32xtGihtN8iC p0hhsR5mwjGAd+DmHjBsNIzc9FJhEH3+Uzp44yUNd3A0t18wT0sZyyOiLD3/KB7UOzjz oE0uUFKrpZRkIREK8tghdn2apmCu5U2Xy6zW1gbZlZgYL7a169otNbhEyAoAsM5Mzn7Z iKl6c/fKRMSm6nGYq63As9VJw1/g+C2IC1zvP86/gnt4yDVD5CuAaqCpVtmCKMfNa8qn ohsA== Received: by 10.224.40.2 with SMTP id i2mr7901951qae.62.1342136605547; Thu, 12 Jul 2012 16:43:25 -0700 (PDT) Received: from triad.knownspace (pool-71-163-84-156.washdc.fios.verizon.net. [71.163.84.156]) by mx.google.com with ESMTPS id cg7sm8859632qab.19.2012.07.12.16.43.24 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Jul 2012 16:43:24 -0700 (PDT) Message-Id: From: Justin Hibbits To: FreeBSD PowerPC ML Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Thu, 12 Jul 2012 19:43:23 -0400 X-Mailer: Apple Mail (2.936) Cc: freebsd-current Subject: panic with DEBUG_MEMGUARD on PowerPC X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 23:43:26 -0000 When tracking down a panic exposed by INVARIANTS, I tried setting DEBUG_MEMGUARD, so I could find the culprit that's trashing freed memory. However, this causes a panic at bootup. It shows up right after the first WARNING: WITNESS message, with the following: panic: kmem_suballoc: bad status return of 3 cpuid = 0 KDB: stack backtrace: 0xd0004ad0: at kdb_backtrace+0x4c 0xd0004b40: at panic+0x224 0xd0004ba0: at kmem_suballoc+0x8c 0xd0004bd0: at kmeminit+0x1ac 0xd0004c20: at mi_startup+0x13c 0xd0004c50: at btext+0xc0 Tracing, and printf() debugging, I see arguments to vm_map_findspace(): start: 0xD0000000, length: 4246446080, and map- >max_offset = 4026531839. Beyond that, I'm lost with tracking this down. Machine is a dual processor PowerPC G4, with 2GB RAM. Anyone have any ideas? Thanks, Justin From owner-freebsd-ppc@FreeBSD.ORG Fri Jul 13 01:11:17 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 931221065670; Fri, 13 Jul 2012 01:11:17 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5F7968FC0A; Fri, 13 Jul 2012 01:11:17 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so5080280pbb.13 for ; Thu, 12 Jul 2012 18:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=e8JG8PY3voB1BPcJfQzkYg2OSd12BZA7WLwSiDc3HO8=; b=avdTi0/e1IRP4v5YzdKovS+Mj9iUBgVtS+IcgUlkWvgjxTdQ3V3q9vFEe70PRh+7cm bznN8gG9Gtak9zkoALHc9SbIPGzweMILDoyU99qKxEDCyVAmoBqHakvuqqA1ia55MXeQ SdwUF1If7fnB/X/q1rDrtBTafQ9evr/2cchGdxkyeUoCaFXACI/QQnQHH2lfv4XyfF/o 2kt9/RoH1qyLJgzHyuKHoJYg3x8JiVUT0dDAUFUzQ3VAU/NnYeMLuBAP4/9ygJ+gj3hb T75QXq/MfkxkTCJvUa+eYzVobft0cMUx8uYRLXw/p6Bn3dxAJl+cu0/f6dNaAS7HqBqB l/CQ== MIME-Version: 1.0 Received: by 10.68.242.7 with SMTP id wm7mr9930544pbc.98.1342141877141; Thu, 12 Jul 2012 18:11:17 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.208.168 with HTTP; Thu, 12 Jul 2012 18:11:16 -0700 (PDT) In-Reply-To: References: Date: Thu, 12 Jul 2012 18:11:16 -0700 X-Google-Sender-Auth: _wikGF-DUsKYgcAYh54rkxtSq6c Message-ID: From: mdf@FreeBSD.org To: Justin Hibbits Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current , FreeBSD PowerPC ML Subject: Re: panic with DEBUG_MEMGUARD on PowerPC X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 01:11:17 -0000 On Thu, Jul 12, 2012 at 4:43 PM, Justin Hibbits wrote: > When tracking down a panic exposed by INVARIANTS, I tried setting > DEBUG_MEMGUARD, so I could find the culprit that's trashing freed memory. > However, this causes a panic at bootup. It shows up right after the first > WARNING: WITNESS message, with the following: > > panic: kmem_suballoc: bad status return of 3 > cpuid = 0 > KDB: stack backtrace: > 0xd0004ad0: at kdb_backtrace+0x4c > 0xd0004b40: at panic+0x224 > 0xd0004ba0: at kmem_suballoc+0x8c > 0xd0004bd0: at kmeminit+0x1ac > 0xd0004c20: at mi_startup+0x13c > 0xd0004c50: at btext+0xc0 > > Tracing, and printf() debugging, I see arguments to vm_map_findspace(): > start: 0xD0000000, length: 4246446080, and map->max_offset = 4026531839. > > Beyond that, I'm lost with tracking this down. Machine is a dual processor > PowerPC G4, with 2GB RAM. The length is 0xFD1BA000 which is almost 4GB. Asking for 4GB of virtual space for 2GB of RAM sounds about right (it's been a while since I was in this code), unless this is a 32-bit kernel, in which case it'd be too much since there isn't that much virtual space available. So, is the kernel 32-bit? What are the values used and returned by memguard_fudge()? The intent of that routine is to get kmeminit() to allocate a larger map so memguard can use part of it for private virtual addresses. But it shouldn't be asking for "too much"; i.e. the intent was to check both physical and virtual space available and be greedy, but not too greedy. There were some issues with that code for some platforms that e.g. didn't define a VM_KMEM_SIZE_MAX, but alc@ fixed that in r216425. Thanks, matthew From owner-freebsd-ppc@FreeBSD.ORG Fri Jul 13 01:33:30 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0EB91106566B; Fri, 13 Jul 2012 01:33:30 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 88FD68FC0A; Fri, 13 Jul 2012 01:33:29 +0000 (UTC) Received: by qcsg15 with SMTP id g15so2207256qcs.13 for ; Thu, 12 Jul 2012 18:33:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; bh=J9lzbrPD07lW0bD1F9NokEnL7exyt5CQGPOgd9VzM9E=; b=IVK3gC2bY/3i0bEIpTDC0cUV9QIOLkV8pylGHWFqFO59wtsKiK8KGjbrBhZYD7v5sL 01PO7QZwaEVev/Uk1k3Bu6GvV44asX62HkpZOJpMTafmPu1b6zqU8QGnytAnWt4RB/rq uNqECtpzZ6SXdKe0knxr8qhCXcjod+jwggbovfCzGFvnJQdrzuJEpPZqdYWcir30tMEf k/zd9dT19ncAdz0OodlwRBU+rIshUrE+UrIwuYVQxNn3qwSjIRYzkiA/fwc0zNI7Fbr5 Mqn/+f/s7LMqVRJWxICEZGcEtR3hBRVoKWoB0CzS/kWx1SSYmo/waOWifNdWpjwpRSrQ RS+w== Received: by 10.224.176.204 with SMTP id bf12mr8429754qab.92.1342143208991; Thu, 12 Jul 2012 18:33:28 -0700 (PDT) Received: from triad.knownspace (pool-71-163-84-156.washdc.fios.verizon.net. [71.163.84.156]) by mx.google.com with ESMTPS id f14sm9232273qak.20.2012.07.12.18.33.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Jul 2012 18:33:28 -0700 (PDT) Message-Id: <307005B6-C8E5-4DCF-BD10-6BC79D8C2FE3@gmail.com> From: Justin Hibbits To: mdf@freebsd.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Thu, 12 Jul 2012 21:33:26 -0400 References: X-Mailer: Apple Mail (2.936) Cc: freebsd-current , FreeBSD PowerPC ML Subject: Re: panic with DEBUG_MEMGUARD on PowerPC X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 01:33:30 -0000 On Jul 12, 2012, at 9:11 PM, mdf@freebsd.org wrote: > On Thu, Jul 12, 2012 at 4:43 PM, Justin Hibbits > wrote: >> When tracking down a panic exposed by INVARIANTS, I tried setting >> DEBUG_MEMGUARD, so I could find the culprit that's trashing freed >> memory. >> However, this causes a panic at bootup. It shows up right after >> the first >> WARNING: WITNESS message, with the following: >> >> panic: kmem_suballoc: bad status return of 3 >> cpuid = 0 >> KDB: stack backtrace: >> 0xd0004ad0: at kdb_backtrace+0x4c >> 0xd0004b40: at panic+0x224 >> 0xd0004ba0: at kmem_suballoc+0x8c >> 0xd0004bd0: at kmeminit+0x1ac >> 0xd0004c20: at mi_startup+0x13c >> 0xd0004c50: at btext+0xc0 >> >> Tracing, and printf() debugging, I see arguments to >> vm_map_findspace(): >> start: 0xD0000000, length: 4246446080, and map->max_offset = >> 4026531839. >> >> Beyond that, I'm lost with tracking this down. Machine is a dual >> processor >> PowerPC G4, with 2GB RAM. > > The length is 0xFD1BA000 which is almost 4GB. Asking for 4GB of > virtual space for 2GB of RAM sounds about right (it's been a while > since I was in this code), unless this is a 32-bit kernel, in which > case it'd be too much since there isn't that much virtual space > available. > > So, is the kernel 32-bit? What are the values used and returned by > memguard_fudge()? The intent of that routine is to get kmeminit() to > allocate a larger map so memguard can use part of it for private > virtual addresses. But it shouldn't be asking for "too much"; i.e. > the intent was to check both physical and virtual space available and > be greedy, but not too greedy. > > There were some issues with that code for some platforms that e.g. > didn't define a VM_KMEM_SIZE_MAX, but alc@ fixed that in r216425. > > Thanks, > matthew It is a 32-bit kernel, on 32-bit hardware. The values for memguard_fudge are (defaults): tmp: 4246446080, vm_kmem_size: 117440512, vm_kmem_size_max: 0 When setting vm.kmem_size/vm.kmem_size_max to 2GB they are: tmp: 2147483648, vm_kmem_size: 214793648, vm_kmem_sizee_max: 2147483648 (all 2GB). But the start and map->max_offset remain the same on all runs I make. - Justin From owner-freebsd-ppc@FreeBSD.ORG Fri Jul 13 04:20:55 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5464C106564A; Fri, 13 Jul 2012 04:20:55 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1F5908FC17; Fri, 13 Jul 2012 04:20:55 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so5316843pbb.13 for ; Thu, 12 Jul 2012 21:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=PLaOEMn4ORdxM8wgSRp7kq3siperaJhLWrXgoqeN8ok=; b=eAqvdk4u42d3k7kLP98R+RD5cyVaj8swtSEcxIZVF4bgWlAtpZ/Ffr7F9M90zdjqj5 sinlMnu6csOPA/XvLl8m0XoOjfOAssxJf5pRuRf0U4EBLxih3d/I3OQ+xfyAISqS/n/b Nas4kEazcXxpMAm32ThT1yUyS2V0v/Hf0RZIL1SDt5pA1q49BEzLF/DpMGhfi06F7r0u qufVsB5TLVSVQvfXyhIxMcP8p6fASrH7oLUKxA/112D0bNMH4A0l6YKr4MpDmGIauDEL BePoxJLvmBnNfYzPLbQS6ELV2YvaIbSg2d4fsrB0oVUMgGL3n7Zswtsngdx/Cz6hUXE+ KdXQ== MIME-Version: 1.0 Received: by 10.68.233.132 with SMTP id tw4mr185651pbc.61.1342153254536; Thu, 12 Jul 2012 21:20:54 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.208.168 with HTTP; Thu, 12 Jul 2012 21:20:54 -0700 (PDT) In-Reply-To: <307005B6-C8E5-4DCF-BD10-6BC79D8C2FE3@gmail.com> References: <307005B6-C8E5-4DCF-BD10-6BC79D8C2FE3@gmail.com> Date: Thu, 12 Jul 2012 21:20:54 -0700 X-Google-Sender-Auth: jk7lQQAheZ6nUYf2Sp01lDQDqvo Message-ID: From: mdf@FreeBSD.org To: Justin Hibbits Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current , FreeBSD PowerPC ML Subject: Re: panic with DEBUG_MEMGUARD on PowerPC X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 04:20:55 -0000 On Thu, Jul 12, 2012 at 6:33 PM, Justin Hibbits wrote: > On Jul 12, 2012, at 9:11 PM, mdf@freebsd.org wrote: > >> On Thu, Jul 12, 2012 at 4:43 PM, Justin Hibbits >> wrote: >>> >>> When tracking down a panic exposed by INVARIANTS, I tried setting >>> DEBUG_MEMGUARD, so I could find the culprit that's trashing freed memory. >>> However, this causes a panic at bootup. It shows up right after the >>> first >>> WARNING: WITNESS message, with the following: >>> >>> Tracing, and printf() debugging, I see arguments to vm_map_findspace(): >>> start: 0xD0000000, length: 4246446080, and map->max_offset = 4026531839. >>> >>> Beyond that, I'm lost with tracking this down. Machine is a dual >>> processor >>> PowerPC G4, with 2GB RAM. >> >> >> The length is 0xFD1BA000 which is almost 4GB. Asking for 4GB of >> virtual space for 2GB of RAM sounds about right (it's been a while >> since I was in this code), unless this is a 32-bit kernel, in which >> case it'd be too much since there isn't that much virtual space >> available. >> >> So, is the kernel 32-bit? What are the values used and returned by >> memguard_fudge()? The intent of that routine is to get kmeminit() to >> allocate a larger map so memguard can use part of it for private >> virtual addresses. But it shouldn't be asking for "too much"; i.e. >> the intent was to check both physical and virtual space available and >> be greedy, but not too greedy. >> >> There were some issues with that code for some platforms that e.g. >> didn't define a VM_KMEM_SIZE_MAX, but alc@ fixed that in r216425. > > It is a 32-bit kernel, on 32-bit hardware. The values for memguard_fudge > are (defaults): > > tmp: 4246446080, vm_kmem_size: 117440512, vm_kmem_size_max: 0 > > When setting vm.kmem_size/vm.kmem_size_max to 2GB they are: > > tmp: 2147483648, vm_kmem_size: 214793648, vm_kmem_sizee_max: 2147483648 (all > 2GB). > > But the start and map->max_offset remain the same on all runs I make. memguard_fudge is still broken for 32-bit architectures with no vm_kmem_max. In the absence of a km_max to limit the value, we essentially use twice the physical memory for the virtual limit. But with 2GB on a 32-bit machine, this requires 4GB of virtual space. Setting vm_kmem_size_max to 2GB should work; I'd expect to see tmp=about 200MB, which is much larger than the input 112MB but the allocation should work. But I don't really know what else PowerPC has need of for virtual space, so that still could be too large. You can try smaller values of vm_kmem_size_max, like 1GB or 512MB. You shouldn't need to set vm_kmem_size at all. At some point the added space for the memguard_map will be small enough that the kmem_suballoc will work. Hmm, what is the min_offset and max_offset of kernel_map when the call to memguard_fudge is made? Thanks, matthew From owner-freebsd-ppc@FreeBSD.ORG Sat Jul 14 07:33:18 2012 Return-Path: Delivered-To: powerpc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F12E9106564A; Sat, 14 Jul 2012 07:33:18 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id BEB5E8FC08; Sat, 14 Jul 2012 07:33:18 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.5/8.14.5) with ESMTP id q6E7XHea017624; Sat, 14 Jul 2012 03:33:17 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.5/8.14.5/Submit) id q6E7XHTG017612; Sat, 14 Jul 2012 07:33:17 GMT (envelope-from tinderbox@freebsd.org) Date: Sat, 14 Jul 2012 07:33:17 GMT Message-Id: <201207140733.q6E7XHTG017612@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on powerpc/powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 07:33:19 -0000 TB --- 2012-07-14 04:57:22 - tinderbox 2.9 running on freebsd-current.sentex.ca TB --- 2012-07-14 04:57:22 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 des@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2012-07-14 04:57:22 - starting HEAD tinderbox run for powerpc/powerpc TB --- 2012-07-14 04:57:22 - cleaning the object tree TB --- 2012-07-14 04:57:22 - cvsupping the source tree TB --- 2012-07-14 04:57:22 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/powerpc/powerpc/supfile TB --- 2012-07-14 04:58:38 - building world TB --- 2012-07-14 04:58:38 - CROSS_BUILD_TESTING=YES TB --- 2012-07-14 04:58:38 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-14 04:58:38 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-14 04:58:38 - SRCCONF=/dev/null TB --- 2012-07-14 04:58:38 - TARGET=powerpc TB --- 2012-07-14 04:58:38 - TARGET_ARCH=powerpc TB --- 2012-07-14 04:58:38 - TZ=UTC TB --- 2012-07-14 04:58:38 - __MAKE_CONF=/dev/null TB --- 2012-07-14 04:58:38 - cd /src TB --- 2012-07-14 04:58:38 - /usr/bin/make -B buildworld >>> World build started on Sat Jul 14 04:58:39 UTC 2012 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything >>> World build completed on Sat Jul 14 07:28:38 UTC 2012 TB --- 2012-07-14 07:28:38 - generating LINT kernel config TB --- 2012-07-14 07:28:38 - cd /src/sys/powerpc/conf TB --- 2012-07-14 07:28:38 - /usr/bin/make -B LINT TB --- 2012-07-14 07:28:38 - cd /src/sys/powerpc/conf TB --- 2012-07-14 07:28:38 - /usr/sbin/config -m LINT TB --- 2012-07-14 07:28:38 - building LINT kernel TB --- 2012-07-14 07:28:38 - CROSS_BUILD_TESTING=YES TB --- 2012-07-14 07:28:38 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-14 07:28:38 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-14 07:28:38 - SRCCONF=/dev/null TB --- 2012-07-14 07:28:38 - TARGET=powerpc TB --- 2012-07-14 07:28:38 - TARGET_ARCH=powerpc TB --- 2012-07-14 07:28:38 - TZ=UTC TB --- 2012-07-14 07:28:38 - __MAKE_CONF=/dev/null TB --- 2012-07-14 07:28:38 - cd /src TB --- 2012-07-14 07:28:38 - /usr/bin/make -B buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Sat Jul 14 07:28:38 UTC 2012 >>> stage 1: configuring the kernel >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3.1: making dependencies >>> stage 3.2: building everything [...] cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ata/chipsets/ata-serverworks.c cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ata/chipsets/ata-siliconimage.c cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ata/chipsets/ata-sis.c cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ata/chipsets/ata-via.c cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ath/if_ath.c -I/src/sys/dev/ath cc1: warnings being treated as errors /src/sys/dev/ath/if_ath.c: In function 'ath_descdma_setup_rx_edma': /src/sys/dev/ath/if_ath.c:2949: warning: 'error' is used uninitialized in this function *** Error code 1 Stop in /obj/powerpc.powerpc/src/sys/LINT. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2012-07-14 07:33:17 - WARNING: /usr/bin/make returned exit code 1 TB --- 2012-07-14 07:33:17 - ERROR: failed to build LINT kernel TB --- 2012-07-14 07:33:17 - 6851.54 user 891.73 system 9354.97 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-powerpc-powerpc.full From owner-freebsd-ppc@FreeBSD.ORG Sat Jul 14 13:33:30 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2DBB11065670; Sat, 14 Jul 2012 13:33:30 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 819F68FC12; Sat, 14 Jul 2012 13:33:29 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id q6EDXDA5093957; Sat, 14 Jul 2012 15:33:13 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id q6EDXDUN093956; Sat, 14 Jul 2012 15:33:13 +0200 (CEST) (envelope-from marius) Date: Sat, 14 Jul 2012 15:33:13 +0200 From: Marius Strobl To: x11@freebsd.org Message-ID: <20120714133313.GA93858@alchemy.franken.de> References: <20120619104247.GA13630@mech-cluster241.men.bris.ac.uk> <20120630121634.GA94551@alchemy.franken.de> <20120709094958.GB52954@mech-cluster241.men.bris.ac.uk> <20120709130430.GN63893@alchemy.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120709130430.GN63893@alchemy.franken.de> User-Agent: Mutt/1.4.2.3i Cc: miwi@freebsd.org, Anton Shterenlikht , freebsd-sparc64@freebsd.org, freebsd-ppc@freebsd.org Subject: Re: graphics/libGL regression on sparc64 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 13:33:30 -0000 On Mon, Jul 09, 2012 at 03:04:30PM +0200, Marius Strobl wrote: > On Mon, Jul 09, 2012 at 10:49:59AM +0100, Anton Shterenlikht wrote: > > On Sat, Jun 30, 2012 at 02:16:34PM +0200, Marius Strobl wrote: > > > On Tue, Jun 19, 2012 at 11:42:47AM +0100, Anton Shterenlikht wrote: > > > > On sparc64 r235474, > > > > updating from libGL-7.4.4 to 7.6.1 I get: > > > > > > There are several problems preventing Xorg bits to build on sparc64 > > > (and powerpc) since the update to 7.5.2. First, make sure you have a > > > ports tree with graphics/libdrm/Makefile rev. 1.25. Then apply the > > > following patches: > > > http://people.freebsd.org/~bapt/fix-hal-on-sparc64.diff > > > http://people.freebsd.org/~marius/dri_libGL_libdrm.diff > > > > > > According to a quick test, the old server works fine with both the > > > mach64 and the sunffb driver on sparc64. When running `Xorg -configure` > > > you need to manually fix the resulting configuration file though > > > as any device on the PCI bus not being mach64 compatible is detected > > > as a radeon chip. > > > However, while the new server selected with WITH_NEW_XORG builds > > > just fine on sparc64 with these patches, it doesn't work there. For > > > mach64, there isn't any indication in the log why this doesn't work > > > besides "no screens found", although the configuration is correct, > > > libdrm is built without KMS support and the mach64 being detected. > > > For sunffb, it just segfaults. > > > > > > Marius > > > > Is there a PR on this? I'd like to track it. > > No, not currently; I'm waiting for bapt@ to complete a -exp-run for > the options fix and to commit that patch and on feedback from miwi@ > regarding the patch for fixing the dri, libGL and libdrm ports on > powerpc and sparc64. > Given that I haven't received any feedback on the above mentioned dri_libGL_libdrm.diff so far, I'm going to commit it on June 16th unless someone comes up with an objection and given that I can get an approval from a ports committer. %% - Since the update to the Xorg 7.5.2 bits, graphics/libdrm no longer installs the necessary headers for compiling the Intel DRI drivers on !x86 (see graphics/libdrm/Makefile rev. 1.25), so exclude them on powerpc and sparc64 as they are of no use there anyway. This now generally follows the behavior used on Linux of only building the DRI drivers that are of possible use on a given architecture. This includes no longer building the i810 DRI driver on amd64 as there is no amd64 machine in existence where it could be used. - Fix/add some endian conversion bits also preventing things from building on powerpc and sparc64. %% Marius From owner-freebsd-ppc@FreeBSD.ORG Sat Jul 14 14:32:13 2012 Return-Path: Delivered-To: powerpc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 750A3106566B; Sat, 14 Jul 2012 14:32:13 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id 32AE08FC0C; Sat, 14 Jul 2012 14:32:13 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.5/8.14.5) with ESMTP id q6EEWC3n092882; Sat, 14 Jul 2012 10:32:12 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.5/8.14.5/Submit) id q6EEWCeW092881; Sat, 14 Jul 2012 14:32:12 GMT (envelope-from tinderbox@freebsd.org) Date: Sat, 14 Jul 2012 14:32:12 GMT Message-Id: <201207141432.q6EEWCeW092881@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on powerpc/powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 14:32:13 -0000 TB --- 2012-07-14 12:06:58 - tinderbox 2.9 running on freebsd-current.sentex.ca TB --- 2012-07-14 12:06:59 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 des@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2012-07-14 12:06:59 - starting HEAD tinderbox run for powerpc/powerpc TB --- 2012-07-14 12:06:59 - cleaning the object tree TB --- 2012-07-14 12:09:54 - cvsupping the source tree TB --- 2012-07-14 12:09:54 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/powerpc/powerpc/supfile TB --- 2012-07-14 12:11:03 - building world TB --- 2012-07-14 12:11:03 - CROSS_BUILD_TESTING=YES TB --- 2012-07-14 12:11:03 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-14 12:11:03 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-14 12:11:03 - SRCCONF=/dev/null TB --- 2012-07-14 12:11:03 - TARGET=powerpc TB --- 2012-07-14 12:11:03 - TARGET_ARCH=powerpc TB --- 2012-07-14 12:11:03 - TZ=UTC TB --- 2012-07-14 12:11:03 - __MAKE_CONF=/dev/null TB --- 2012-07-14 12:11:03 - cd /src TB --- 2012-07-14 12:11:03 - /usr/bin/make -B buildworld >>> World build started on Sat Jul 14 12:11:04 UTC 2012 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything >>> World build completed on Sat Jul 14 14:28:14 UTC 2012 TB --- 2012-07-14 14:28:14 - generating LINT kernel config TB --- 2012-07-14 14:28:14 - cd /src/sys/powerpc/conf TB --- 2012-07-14 14:28:14 - /usr/bin/make -B LINT TB --- 2012-07-14 14:28:14 - cd /src/sys/powerpc/conf TB --- 2012-07-14 14:28:14 - /usr/sbin/config -m LINT TB --- 2012-07-14 14:28:14 - building LINT kernel TB --- 2012-07-14 14:28:14 - CROSS_BUILD_TESTING=YES TB --- 2012-07-14 14:28:14 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-14 14:28:14 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-14 14:28:14 - SRCCONF=/dev/null TB --- 2012-07-14 14:28:14 - TARGET=powerpc TB --- 2012-07-14 14:28:14 - TARGET_ARCH=powerpc TB --- 2012-07-14 14:28:14 - TZ=UTC TB --- 2012-07-14 14:28:14 - __MAKE_CONF=/dev/null TB --- 2012-07-14 14:28:14 - cd /src TB --- 2012-07-14 14:28:14 - /usr/bin/make -B buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Sat Jul 14 14:28:14 UTC 2012 >>> stage 1: configuring the kernel >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3.1: making dependencies >>> stage 3.2: building everything [...] cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ath/if_ath_tx_ht.c -I/src/sys/dev/ath cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ath/if_ath_tdma.c -I/src/sys/dev/ath cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ath/if_ath_sysctl.c -I/src/sys/dev/ath cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ath/if_ath_rx.c -I/src/sys/dev/ath cc -c -O -pipe -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many -fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding -fstack-protector -Werror /src/sys/dev/ath/if_ath_rx_edma.c -I/src/sys/dev/ath cc1: warnings being treated as errors /src/sys/dev/ath/if_ath_rx_edma.c: In function 'ath_edma_recv_tasklet': /src/sys/dev/ath/if_ath_rx_edma.c:450: warning: unused variable 'ic' [-Wunused-variable] *** Error code 1 Stop in /obj/powerpc.powerpc/src/sys/LINT. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2012-07-14 14:32:12 - WARNING: /usr/bin/make returned exit code 1 TB --- 2012-07-14 14:32:12 - ERROR: failed to build LINT kernel TB --- 2012-07-14 14:32:12 - 6794.13 user 915.06 system 8713.20 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-powerpc-powerpc.full From owner-freebsd-ppc@FreeBSD.ORG Sat Jul 14 15:39:47 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25A05106564A; Sat, 14 Jul 2012 15:39:47 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9E8E88FC0C; Sat, 14 Jul 2012 15:39:46 +0000 (UTC) Received: by qcsg15 with SMTP id g15so3091789qcs.13 for ; Sat, 14 Jul 2012 08:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; bh=lcbXdD4DIrAOIke/qnHbgDZfJaDQEKaQzS+bbd12xRM=; b=XrZOVWPwdXewN7KiXtoZnlHNYdMnKTXcrD673T97rKl9fm7ljUwIcp26Nr3GWk5t8M LE4TOXdgZFf7CF+vCXbf+0VikupPC66rtwx0T0BmdLGaCvpf5VKyZV71CuKxdewE0oi0 GeDU6TMRbtMXtWuN1aCZzp/Z4cntYOMs+VdZK0IIq64eWVTRKZiXuD3/6id/Gtq2ZIhE 8npT1sY27vw4RVfpQJph4pZG7+G80XuM7KKxogE0AlyVCzU7zq86ACtQQZA7/Qj4Frve Ixw39geGtWOFdTS9t+UAbiEgMXRlCVfUAkLgUUyu2fwM2LbZMlFsxGv3QkOthXcEa2Gl 35gA== Received: by 10.224.59.212 with SMTP id m20mr10514523qah.35.1342280386107; Sat, 14 Jul 2012 08:39:46 -0700 (PDT) Received: from triad.knownspace (pool-71-163-84-156.washdc.fios.verizon.net. [71.163.84.156]) by mx.google.com with ESMTPS id fx5sm15288208qab.14.2012.07.14.08.39.44 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 14 Jul 2012 08:39:45 -0700 (PDT) Message-Id: From: Justin Hibbits To: mdf@freebsd.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Sat, 14 Jul 2012 11:39:43 -0400 References: <307005B6-C8E5-4DCF-BD10-6BC79D8C2FE3@gmail.com> X-Mailer: Apple Mail (2.936) Cc: freebsd-current , FreeBSD PowerPC ML Subject: Re: panic with DEBUG_MEMGUARD on PowerPC X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 15:39:47 -0000 On Jul 13, 2012, at 12:20 AM, mdf@freebsd.org wrote: > On Thu, Jul 12, 2012 at 6:33 PM, Justin Hibbits > wrote: >> On Jul 12, 2012, at 9:11 PM, mdf@freebsd.org wrote: >> >>> On Thu, Jul 12, 2012 at 4:43 PM, Justin Hibbits >> > >>> wrote: >>>> >>>> When tracking down a panic exposed by INVARIANTS, I tried setting >>>> DEBUG_MEMGUARD, so I could find the culprit that's trashing freed >>>> memory. >>>> However, this causes a panic at bootup. It shows up right after >>>> the >>>> first >>>> WARNING: WITNESS message, with the following: >>>> >>>> Tracing, and printf() debugging, I see arguments to >>>> vm_map_findspace(): >>>> start: 0xD0000000, length: 4246446080, and map->max_offset = >>>> 4026531839. >>>> >>>> Beyond that, I'm lost with tracking this down. Machine is a dual >>>> processor >>>> PowerPC G4, with 2GB RAM. >>> >>> >>> The length is 0xFD1BA000 which is almost 4GB. Asking for 4GB of >>> virtual space for 2GB of RAM sounds about right (it's been a while >>> since I was in this code), unless this is a 32-bit kernel, in which >>> case it'd be too much since there isn't that much virtual space >>> available. >>> >>> So, is the kernel 32-bit? What are the values used and returned by >>> memguard_fudge()? The intent of that routine is to get kmeminit() >>> to >>> allocate a larger map so memguard can use part of it for private >>> virtual addresses. But it shouldn't be asking for "too much"; i.e. >>> the intent was to check both physical and virtual space available >>> and >>> be greedy, but not too greedy. >>> >>> There were some issues with that code for some platforms that e.g. >>> didn't define a VM_KMEM_SIZE_MAX, but alc@ fixed that in r216425. >> >> It is a 32-bit kernel, on 32-bit hardware. The values for >> memguard_fudge >> are (defaults): >> >> tmp: 4246446080, vm_kmem_size: 117440512, vm_kmem_size_max: 0 >> >> When setting vm.kmem_size/vm.kmem_size_max to 2GB they are: >> >> tmp: 2147483648, vm_kmem_size: 214793648, vm_kmem_sizee_max: >> 2147483648 (all >> 2GB). >> >> But the start and map->max_offset remain the same on all runs I make. > > memguard_fudge is still broken for 32-bit architectures with no > vm_kmem_max. In the absence of a km_max to limit the value, we > essentially use twice the physical memory for the virtual limit. But > with 2GB on a 32-bit machine, this requires 4GB of virtual space. > > Setting vm_kmem_size_max to 2GB should work; I'd expect to see > tmp=about 200MB, which is much larger than the input 112MB but the > allocation should work. But I don't really know what else PowerPC has > need of for virtual space, so that still could be too large. > > You can try smaller values of vm_kmem_size_max, like 1GB or 512MB. > You shouldn't need to set vm_kmem_size at all. At some point the > added space for the memguard_map will be small enough that the > kmem_suballoc will work. > > Hmm, what is the min_offset and max_offset of kernel_map when the call > to memguard_fudge is made? > > Thanks, > matthew Without setting vm.kmem_size/vm.kmem_size_max, I see the following: map: 0x1000000, min_offset: 0xD0000000, max_offset: 0xEFFFFFFF It does boot when I set vm.kmem_size=256M/vm.kmem_size_max=512M. When I tried 512M/1024M, it panicked at the same place -- kmem_suballoc from kmeminit. So it looks like I have to set vm.kmem_size/vm.kmem_size_max way back in order for it to boot with memguard(9). - Justin From owner-freebsd-ppc@FreeBSD.ORG Sat Jul 14 17:01:16 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A70BE106566B; Sat, 14 Jul 2012 17:01:16 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 700FF8FC08; Sat, 14 Jul 2012 17:01:16 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so8056766pbb.13 for ; Sat, 14 Jul 2012 10:01:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=SZWV7xSUSiifW1jCUbelNQWaHyFCrr3m8GQXGWAQ0os=; b=L9Sh29SOFPfnWU/9H7JWAK6I3hr61QbzOspsPCBvioXnV06NI/qa+yQetbdNeNSuyr fnsiwiAB2BiZY90zDP/lkA2jkfu0YEwcTl06xNEHkdGmKl9nj0xKRMl40IVeQ5YFVYsB ITv5svFHDW6NtD/ZGsrC+5yXPP91zkP+xdnHua02x8WarWFUtHxapZ9mqgUiiBL01DqA Bmj7Gr06jIPB+3lbdKxJzxgWcJu/BDdkYE55/hWaf09hYY69kRUNMAVgNzvUDwGcC7JZ 42VcOEFF/CiGR4Xh4S8GWhhabnIlaiqKOOMI5tagpJRrI0JAlnPyCb0in7PcK2LHAQoQ zzcg== MIME-Version: 1.0 Received: by 10.66.81.106 with SMTP id z10mr10412805pax.26.1342285276001; Sat, 14 Jul 2012 10:01:16 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.208.168 with HTTP; Sat, 14 Jul 2012 10:01:15 -0700 (PDT) In-Reply-To: References: <307005B6-C8E5-4DCF-BD10-6BC79D8C2FE3@gmail.com> Date: Sat, 14 Jul 2012 10:01:15 -0700 X-Google-Sender-Auth: ZAI8j_cPZpXgG7iLt1plTml3Qxg Message-ID: From: mdf@FreeBSD.org To: Justin Hibbits Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current , FreeBSD PowerPC ML Subject: Re: panic with DEBUG_MEMGUARD on PowerPC X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 17:01:16 -0000 On Sat, Jul 14, 2012 at 8:39 AM, Justin Hibbits wrote: > On Jul 13, 2012, at 12:20 AM, mdf@freebsd.org wrote: > >> On Thu, Jul 12, 2012 at 6:33 PM, Justin Hibbits >> wrote: >>> >>> On Jul 12, 2012, at 9:11 PM, mdf@freebsd.org wrote: >>> >>>> On Thu, Jul 12, 2012 at 4:43 PM, Justin Hibbits >>>> wrote: >>>>> >>>>> >>>>> When tracking down a panic exposed by INVARIANTS, I tried setting >>>>> DEBUG_MEMGUARD, so I could find the culprit that's trashing freed >>>>> memory. >>>>> However, this causes a panic at bootup. It shows up right after the >>>>> first >>>>> WARNING: WITNESS message, with the following: >>>>> >>>>> Tracing, and printf() debugging, I see arguments to vm_map_findspace(): >>>>> start: 0xD0000000, length: 4246446080, and map->max_offset = >>>>> 4026531839. >>>>> >>>>> Beyond that, I'm lost with tracking this down. Machine is a dual >>>>> processor >>>>> PowerPC G4, with 2GB RAM. >>>> >>>> >>>> >>>> The length is 0xFD1BA000 which is almost 4GB. Asking for 4GB of >>>> virtual space for 2GB of RAM sounds about right (it's been a while >>>> since I was in this code), unless this is a 32-bit kernel, in which >>>> case it'd be too much since there isn't that much virtual space >>>> available. >>>> >>>> So, is the kernel 32-bit? What are the values used and returned by >>>> memguard_fudge()? The intent of that routine is to get kmeminit() to >>>> allocate a larger map so memguard can use part of it for private >>>> virtual addresses. But it shouldn't be asking for "too much"; i.e. >>>> the intent was to check both physical and virtual space available and >>>> be greedy, but not too greedy. >>>> >>>> There were some issues with that code for some platforms that e.g. >>>> didn't define a VM_KMEM_SIZE_MAX, but alc@ fixed that in r216425. >>> >>> >>> It is a 32-bit kernel, on 32-bit hardware. The values for memguard_fudge >>> are (defaults): >>> >>> tmp: 4246446080, vm_kmem_size: 117440512, vm_kmem_size_max: 0 >>> >>> When setting vm.kmem_size/vm.kmem_size_max to 2GB they are: >>> >>> tmp: 2147483648, vm_kmem_size: 214793648, vm_kmem_sizee_max: 2147483648 >>> (all >>> 2GB). >>> >>> But the start and map->max_offset remain the same on all runs I make. >> >> >> memguard_fudge is still broken for 32-bit architectures with no >> vm_kmem_max. In the absence of a km_max to limit the value, we >> essentially use twice the physical memory for the virtual limit. But >> with 2GB on a 32-bit machine, this requires 4GB of virtual space. >> >> Setting vm_kmem_size_max to 2GB should work; I'd expect to see >> tmp=about 200MB, which is much larger than the input 112MB but the >> allocation should work. But I don't really know what else PowerPC has >> need of for virtual space, so that still could be too large. >> >> You can try smaller values of vm_kmem_size_max, like 1GB or 512MB. >> You shouldn't need to set vm_kmem_size at all. At some point the >> added space for the memguard_map will be small enough that the >> kmem_suballoc will work. >> >> Hmm, what is the min_offset and max_offset of kernel_map when the call >> to memguard_fudge is made? >> >> Thanks, >> matthew > > > > Without setting vm.kmem_size/vm.kmem_size_max, I see the following: > > map: 0x1000000, min_offset: 0xD0000000, max_offset: 0xEFFFFFFF > > It does boot when I set vm.kmem_size=256M/vm.kmem_size_max=512M. > > When I tried 512M/1024M, it panicked at the same place -- kmem_suballoc from > kmeminit. So it looks like I have to set vm.kmem_size/vm.kmem_size_max way > back in order for it to boot with memguard(9). I'll see about crafting a patch when I can get access to a machine that works (my current woes with my laptop, VM image, etc. are quite frustrating). The gist is that, in the absence of a kmem_max, the routine for determining the size of the kmem map should use the kernel_map's size as a limiting factor. In this case it looks like the map's size is 512MB. Cheers, matthew