From owner-freebsd-arm@FreeBSD.ORG Sat May 4 21:41:07 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D33E7144 for ; Sat, 4 May 2013 21:41:07 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id B4217183 for ; Sat, 4 May 2013 21:41:07 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id r44Lf3Xg022038; Sat, 4 May 2013 21:41:03 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.123] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id i3sb8zkh6d7e4i2ppk4e6swjdw; Sat, 04 May 2013 21:41:03 +0000 (UTC) (envelope-from tim@kientzle.com) Subject: Re: Is this related to the general panic discussed in freebsd-current? Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: <5183BF8C.4040406@thieprojects.ch> Date: Sat, 4 May 2013 14:41:02 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <51835891.4050409@thieprojects.ch> <03971BD1-4ADE-4435-BDD0-B94B62634F1D@bsdimp.com> <5183BF8C.4040406@thieprojects.ch> To: freebsd-arm@freebsd.org, Warner Losh X-Mailer: Apple Mail (2.1283) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 May 2013 21:41:07 -0000 On May 3, 2013, at 6:45 AM, Werner Thie wrote: > On 5/3/13 3:13 PM, Warner Losh wrote: >> On May 3, 2013, at 12:26 AM, Werner Thie wrote: >>=20 >>> Hi all >>>=20 >>> just came around yesterday to start playing with crochet, built an = image and KDB entering panic when booting >>>=20 >>> FreeBSD 10.0-CURRENT #0 r250144M: Thu May 2 10:10:20 CEST 2013 >>> = root@xtools:/usr/home/wthie/proj/crochet-freebsd/work/obj/arm.armv6/usr/lo= cal/src/sys/BEAGLEBONE arm >>> FreeBSD clang version 3.3 (trunk 178860) 20130405 >>> WARNING: WITNESS option enabled, expect reduced performance. >>> panic: acquiring blockable sleep lock with spinlock or critical = section held (rw) pmap pv global @ = /usr/local/src/sys/arm/arm/pmap-v6.c:1187 >>> KDB: enter: panic >>> [ thread pid 0 tid 0 ] >>> Stopped at $d: ldrb r15, [r15, r15, ror r15]! I think I've managed to isolate this to the stack_capture function in = sys/arm/arm/stack_machdep.c. Here's the breadcrumb trail I've followed so far: 1. Witness is complaining about pmap_fault_fixup trying to acquire the = "pmap pv global" lock before it dies. 2. Inserted printfs, found that pmap_fault_fixup was being called from = data_abort_handler (in sys/arm/arm/trap.c). 3. Uncommenting the printf in data_abort_handler gives the next step: data abort: fault address=3D0xe28db008 (from pc=3D0xc0519d08 = lr=3D0xc0519d14) 4. According to objdump, the PC address above is in stack_save = (actually, the inlined version of stack_capture), in = sys/arm/arm/stack_machdep.c. If I add a printf() to the middle of stack_capture, the kernel boots. = So it definitely smells like a code-generation error of some sort. I'm going to start digging through the assembly next. Tim