From owner-freebsd-arm@FreeBSD.ORG Mon Feb 15 01:58:26 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68D3F106566B for ; Mon, 15 Feb 2010 01:58:26 +0000 (UTC) (envelope-from crymb9@gmail.com) Received: from mail-fx0-f228.google.com (mail-fx0-f228.google.com [209.85.220.228]) by mx1.freebsd.org (Postfix) with ESMTP id 002F78FC0A for ; Mon, 15 Feb 2010 01:58:25 +0000 (UTC) Received: by fxm28 with SMTP id 28so126956fxm.31 for ; Sun, 14 Feb 2010 17:58:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=Poil5iRDFKywuUO5o8j0gPoh0HEZ/JM9kRn4ibulK24=; b=tpuigs3oieHCqWCSMEjOlDsP/nwhuZ+2rcvubt14+/Fonbawwj8sprwg0weYZYQn7e 7fEX67n3U0HrTOhDAR8Of/UAgEU4K/I8Mj5NMPX+DRvW50hbI4K2dyKAbgA4QraGbhAn jUmiWlVBL18zI39vlFNI1H564mRCbsNzDXicg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=rsWdttnWDSGxzp2r+oPOqrAzPDdPG4FIahl9y+iZZistoTII63FSJ+aJoqHfe8UR/b I85EUnxYqKJfhxbOTqCcU/U4pUcbzHNrZQf5CIM05oKI3yIc4w5yVY4HrDb0gmTzVjjF 65TAjVMWGHiY1gz6lGIWFXXWFSELErAyYccjo= MIME-Version: 1.0 Sender: crymb9@gmail.com Received: by 10.103.50.36 with SMTP id c36mr3400234muk.26.1266197351498; Sun, 14 Feb 2010 17:29:11 -0800 (PST) Date: Mon, 15 Feb 2010 03:29:11 +0200 X-Google-Sender-Auth: 9e64f409fe6b0637 Message-ID: <60dff88b1002141729l68ce609ave6b66f1c882eb31f@mail.gmail.com> From: Elf Dark To: sepotvin@videotron.ca, freebsd-arm@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: FreeBSD arm HP5555 iPAQ X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 01:58:26 -0000 Good day, team!!! I am interesting to make possible to run FreeBSD 8.0 on the iPAQ HP5555 platform. Please if you have any time, can you help me? Thank you for support. Vladimir V.K. From owner-freebsd-arm@FreeBSD.ORG Mon Feb 15 07:01:06 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBC141065670 for ; Mon, 15 Feb 2010 07:01:06 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 90FC78FC1B for ; Mon, 15 Feb 2010 07:01:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1F6v7ar009447; Sun, 14 Feb 2010 23:57:07 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 14 Feb 2010 23:57:17 -0700 (MST) Message-Id: <20100214.235717.53867696478245785.imp@bsdimp.com> To: jabbe@mail.ru From: "M. Warner Losh" In-Reply-To: <60dff88b1002141729l68ce609ave6b66f1c882eb31f@mail.gmail.com> References: <60dff88b1002141729l68ce609ave6b66f1c882eb31f@mail.gmail.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org Subject: Re: FreeBSD arm HP5555 iPAQ X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 07:01:06 -0000 In message: <60dff88b1002141729l68ce609ave6b66f1c882eb31f@mail.gmail.com> Elf Dark writes: : Good day, team!!! : : I am interesting to make possible to run FreeBSD 8.0 on the iPAQ : HP5555 platform. Please if you have any time, can you help me? "The 5550 has an Intel XScale PXA255 processor running at 400 MHz." So, it may be possible to support this in FreeBSD. We have basic xscale support in the tree, but nothing specific for the PXA255 cpus. You likely can snag a bunch of that support from NetBSD, since they have lots of support, but no apparent support for the hp 5555 (based solely on a grep of the tree). Is this enough to get you going? Warner From owner-freebsd-arm@FreeBSD.ORG Mon Feb 15 08:09:01 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54200106566C for ; Mon, 15 Feb 2010 08:09:01 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: from mail-ew0-f211.google.com (mail-ew0-f211.google.com [209.85.219.211]) by mx1.freebsd.org (Postfix) with ESMTP id DEB538FC14 for ; Mon, 15 Feb 2010 08:09:00 +0000 (UTC) Received: by ewy3 with SMTP id 3so4819263ewy.13 for ; Mon, 15 Feb 2010 00:08:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=bE7v3/bR+9bNvcyJvz2ApOwr143Rb1r4ZbjYyE7VENw=; b=oWh6eDYZR3V2kxkwmv2fCy3KeEG+Lak8oErkNyAeemTDc4K0Cm4odoMigPAhSDsnIT IznbSLsAaGfcq651y1mK75kr9UFu71sdXdrATK3lY/9sHoseAWa4o9CI+C1CcGi5A9tO VpYLQ6LaeFq9+vt1Uld6UwouxjuebwUxCv5zM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=kwNJd+wdCM3h0W+6XEMxdJoB4TMJPGiJ4cGgdalrbb7G0AS9UeKGDZ5PIfoNjxJTKD k8N3Dg2ljetu83DKSebjE966dfOIkl2pQlT6zD3W62IhloKzsN7Om9yLXd4/5x/SZaZS ZCjagBP/fx3S5MdKWbpBigQsDUtsj5zm/OW4g= MIME-Version: 1.0 Received: by 10.216.174.129 with SMTP id x1mr567350wel.140.1266221339676; Mon, 15 Feb 2010 00:08:59 -0800 (PST) In-Reply-To: <20100214.235717.53867696478245785.imp@bsdimp.com> References: <60dff88b1002141729l68ce609ave6b66f1c882eb31f@mail.gmail.com> <20100214.235717.53867696478245785.imp@bsdimp.com> Date: Mon, 15 Feb 2010 10:08:59 +0200 Message-ID: From: Jacques Fourie To: "M. Warner Losh" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arm@freebsd.org, jabbe@mail.ru Subject: Re: FreeBSD arm HP5555 iPAQ X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 08:09:01 -0000 > In message: <60dff88b1002141729l68ce609ave6b66f1c882eb31f@mail.gmail.com> > =A0 =A0 =A0 =A0 =A0 =A0Elf Dark writes: > : Good day, team!!! > : > : I am interesting to make possible to run FreeBSD 8.0 on the iPAQ > : HP5555 platform. Please if you have any time, can you help me? > > "The 5550 has an Intel XScale PXA255 processor running at 400 MHz." > > So, it may be possible to support this in FreeBSD. =A0We have basic > xscale support in the tree, but nothing specific for the PXA255 cpus. > You likely can snag a bunch of that support from NetBSD, since they > have lots of support, but no apparent support for the hp 5555 (based > solely on a grep of the tree). > > Is this enough to get you going? > > Warner > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > I have done some work on a custom platform based on the PXA255 cpu. The existing support in the tree was more than enough to get me going, only had to write drivers for some of the internal peripherals found on the PXA255 (MMC, SPI, I2C etc.). This was relatively easy because the hardware was fully documented and I could flash a new bootloader (u-boot) that played nicely with FreeBSD. From owner-freebsd-arm@FreeBSD.ORG Mon Feb 15 09:24:33 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B042D106566C for ; Mon, 15 Feb 2010 09:24:33 +0000 (UTC) (envelope-from benno@jeamland.net) Received: from mail.jeamland.net (rafe.jeamland.net [203.20.99.33]) by mx1.freebsd.org (Postfix) with ESMTP id 6E6158FC1C for ; Mon, 15 Feb 2010 09:24:33 +0000 (UTC) Received: from mail.jeamland.net (localhost [127.0.0.1]) by mail.jeamland.net (Postfix) with ESMTP id 990B31CD5E; Mon, 15 Feb 2010 20:04:35 +1100 (EST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on rafe.jeamland.net X-Spam-Level: X-Spam-Status: No, score=-6.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from urtzweil.int.jeamland.net (ppp118-209-37-96.lns20.mel4.internode.on.net [118.209.37.96]) by mail.jeamland.net (Postfix) with ESMTPSA id 2D3551CCFC; Mon, 15 Feb 2010 20:04:35 +1100 (EST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Benno Rice In-Reply-To: <20100214.235717.53867696478245785.imp@bsdimp.com> Date: Mon, 15 Feb 2010 20:04:27 +1100 Content-Transfer-Encoding: 7bit Message-Id: References: <60dff88b1002141729l68ce609ave6b66f1c882eb31f@mail.gmail.com> <20100214.235717.53867696478245785.imp@bsdimp.com> To: M. Warner Losh X-Mailer: Apple Mail (2.1077) X-Virus-Scanned: ClamAV using ClamSMTP at rafe.jeamland.net Cc: freebsd-arm@FreeBSD.org, jabbe@mail.ru Subject: Re: FreeBSD arm HP5555 iPAQ X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 09:24:33 -0000 On 15/02/2010, at 5:57 PM, M. Warner Losh wrote: > In message: <60dff88b1002141729l68ce609ave6b66f1c882eb31f@mail.gmail.com> > Elf Dark writes: > : Good day, team!!! > : > : I am interesting to make possible to run FreeBSD 8.0 on the iPAQ > : HP5555 platform. Please if you have any time, can you help me? > > "The 5550 has an Intel XScale PXA255 processor running at 400 MHz." > > So, it may be possible to support this in FreeBSD. We have basic > xscale support in the tree, but nothing specific for the PXA255 cpus. http://svn.freebsd.org/viewvc/base/head/sys/arm/xscale/pxa/ =) -- Benno Rice benno@jeamland.net From owner-freebsd-arm@FreeBSD.ORG Mon Feb 15 11:06:56 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E39E31065692 for ; Mon, 15 Feb 2010 11:06:56 +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 D1E768FC0A for ; Mon, 15 Feb 2010 11:06:56 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FB6uh3070257 for ; Mon, 15 Feb 2010 11:06:56 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o1FB6u7b070255 for freebsd-arm@FreeBSD.org; Mon, 15 Feb 2010 11:06:56 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 15 Feb 2010 11:06:56 GMT Message-Id: <201002151106.o1FB6u7b070255@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arm@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 11:06:57 -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 arm/134368 arm [patch] nslu2_led driver for the LEDs on the NSLU2 o arm/134338 arm [patch] Lock GPIO accesses on ixp425 o arm/134092 arm [patch] NSLU.hints contains wrong hints for on board n 3 problems total. From owner-freebsd-arm@FreeBSD.ORG Tue Feb 16 18:56:19 2010 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68E261065697; Tue, 16 Feb 2010 18:56:19 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id E4ACB8FC08; Tue, 16 Feb 2010 18:56:18 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1GIuHvb052353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 16 Feb 2010 19:56:17 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1GIuEF8041444 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Feb 2010 19:56:14 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1GIuE9d072634; Tue, 16 Feb 2010 19:56:14 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1GIuEte072633; Tue, 16 Feb 2010 19:56:14 +0100 (CET) (envelope-from ticso) Date: Tue, 16 Feb 2010 19:56:14 +0100 From: Bernd Walter To: Doug Barton Message-ID: <20100216185614.GK43625@cicely7.cicely.de> References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> <4B7AE7BA.406@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B7AE7BA.406@FreeBSD.org> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: arm@FreeBSD.org, Bernd Walter , ticso@cicely.de, current@FreeBSD.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 18:56:19 -0000 On Tue, Feb 16, 2010 at 10:45:14AM -0800, Doug Barton wrote: > On 2/16/2010 10:39 AM, Bernd Walter wrote: > > [55]Please.tell.me.who.am.I# gdb /usr/sbin/named named.core > > GNU gdb 6.1.1 [FreeBSD] > > Copyright 2004 Free Software Foundation, Inc. > > GDB is free software, covered by the GNU General Public License, and you are > > welcome to change it and/or distribute copies of it under certain conditions. > > Type "show copying" to see the conditions. > > There is absolutely no warranty for GDB. Type "show warranty" for details. > > This GDB was configured as "arm-marcel-freebsd"...(no debugging symbols found)... > > Core was generated by `named'. > > Program terminated with signal 5, Trace/breakpoint trap. > > Reading symbols from /lib/libcrypto.so.6...(no debugging symbols found)...done. > > Loaded symbols for /lib/libcrypto.so.6 > > Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done. > > Loaded symbols for /lib/libthr.so.3 > > Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. > > Loaded symbols for /lib/libc.so.7 > > Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. > > Loaded symbols for /libexec/ld-elf.so.1 > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > > [New Thread 20804280 (LWP 100062)] > > [New Thread 20804140 (LWP 100052)] > > (gdb) bt > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > > #1 0x203572b8 in _thread_bp_death () from /lib/libthr.so.3 > > #2 0x20349da4 in pthread_create () from /lib/libthr.so.3 > > #3 0x00164cb8 in ?? () > > (gdb) > > > > Do we have a general threading problem on ARM? > > Wow, that was fast. :) It sure looks like that's the problem. Can you > try compiling ports/dns/bind96 without threads and see if that works for > you? If it does then it would be good to follow up on > freebsd-arm@FreeBSD.org and see if the problem can be addressed. I'd send it before I saw your mail. Compiling however will take some time. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Tue Feb 16 19:02:25 2010 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59D7C10656BA for ; Tue, 16 Feb 2010 19:02:25 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id DAE788FC1E for ; Tue, 16 Feb 2010 19:02:24 +0000 (UTC) Received: (qmail 17190 invoked by uid 399); 16 Feb 2010 19:02:24 -0000 Received: from localhost (HELO ?192.168.0.145?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 16 Feb 2010 19:02:24 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B7AEBC0.5050506@FreeBSD.org> Date: Tue, 16 Feb 2010 11:02:24 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: ticso@cicely.de References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> <4B7AE7BA.406@FreeBSD.org> <20100216185614.GK43625@cicely7.cicely.de> In-Reply-To: <20100216185614.GK43625@cicely7.cicely.de> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: arm@FreeBSD.org, Bernd Walter , current@FreeBSD.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 19:02:25 -0000 On 2/16/2010 10:56 AM, Bernd Walter wrote: >> Wow, that was fast. :) It sure looks like that's the problem. Can you >> try compiling ports/dns/bind96 without threads and see if that works for >> you? If it does then it would be good to follow up on >> freebsd-arm@FreeBSD.org and see if the problem can be addressed. > > I'd send it before I saw your mail. Yeah, I figured that when I got your other reply just now. :) I received the trace message to the list in the same mail download as my message to the list, which I thought was quite impressive on your part. :) > Compiling however will take some time. No problem, let us know how it works out. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-freebsd-arm@FreeBSD.ORG Tue Feb 16 19:09:13 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13DAC10656B1 for ; Tue, 16 Feb 2010 19:09:13 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id AAB098FC1F for ; Tue, 16 Feb 2010 19:09:12 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1GIe0hq051867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 16 Feb 2010 19:40:00 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1GIdpeP040713 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Feb 2010 19:39:51 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1GIdpK0072542; Tue, 16 Feb 2010 19:39:51 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1GIdpxw072541; Tue, 16 Feb 2010 19:39:51 +0100 (CET) (envelope-from ticso) Date: Tue, 16 Feb 2010 19:39:51 +0100 From: Bernd Walter To: current@freebsd.org, arm@freebsd.org Message-ID: <20100216183951.GI43625@cicely7.cicely.de> References: <20100215213907.GA43625@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100215213907.GA43625@cicely7.cicely.de> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: Bernd Walter Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 19:09:13 -0000 On Mon, Feb 15, 2010 at 10:39:07PM +0100, Bernd Walter wrote: > [62]# uname -a > FreeBSD 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r203927: Mon Feb 15 19:12:36 CET 2010 ticso@cicely14.cicely.de:/data/builder/arm-current/head/sys/arm/compile/FBOX arm > [64]# /etc/rc.d/named start > Starting named. > /etc/rc.d/named: WARNING: failed to start named > 1.000u 0.000s 0:03.94 54.0% 7446+33509k 0+0io 17pf+0w > Exit 1 > > [65]# tail /var/log/messages > ... > Feb 15 21:29:51 named[2567]: starting BIND 9.6.1-P3 -u bind > Feb 15 21:29:51 named[2567]: built with '--prefix=/usr' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--enable-threads' '--disable-ipv6' '--enable-getifaddrs' '--disable-linux-caps' '--with-openssl=/usr' '--with-randomdev=/dev/random' '--without-idn' '--without-libxml2' > Feb 15 21:29:51 kernel: pid 2567 (named), uid 0: exited on signal 11 > Feb 15 21:29:51 ticso: /etc/rc.d/named: WARNING: failed to start named > > [66]# cat /etc/rc.conf > hostname="Please.tell.me.who.am.I" > tmpmfs="AUTO" > tmpsize="4m" > tmpmfs_flags="-S -M" > varmfs="AUTO" > varsize="5m" > varmfs_flags="-S -M" > sshd_enable="YES" > ntpdate_enable="YES" > ntpdate_program="ntpdate" > ntpd_enable="YES" > thttpd_enable="NO" > fsck_y_enable="YES" > background_fsck="NO" > gateway_enable="YES" > named_enable="YES" > named_chrootdir="" > ifconfig_ate0="up" > mpd_enable="NO" > mpd_flags="-b" > dhcpd_enable="NO" > dhcpd_ifaces="vlan0" > firewall_enable="YES" > firewall_script="/etc/rc.ipfw" > cloned_interfaces="vlan0 vlan1 vlan2 vlan3" > ifconfig_vlan0="192.168.53.1/24 vlan 256 vlandev ate0" > ifconfig_vlan1="vlan 257 vlandev ate0" > ifconfig_vlan2="vlan 258 vlandev ate0" > ifconfig_vlan3="vlan 259 vlandev ate0" > > /etc/namedb isn't changed from distribution yet [55]Please.tell.me.who.am.I# gdb /usr/sbin/named named.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "arm-marcel-freebsd"...(no debugging symbols found)... Core was generated by `named'. Program terminated with signal 5, Trace/breakpoint trap. Reading symbols from /lib/libcrypto.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libcrypto.so.6 Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done. Loaded symbols for /lib/libthr.so.3 Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 [New Thread 20804280 (LWP 100062)] [New Thread 20804140 (LWP 100052)] (gdb) bt #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 #1 0x203572b8 in _thread_bp_death () from /lib/libthr.so.3 #2 0x20349da4 in pthread_create () from /lib/libthr.so.3 #3 0x00164cb8 in ?? () (gdb) Do we have a general threading problem on ARM? -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Tue Feb 16 19:11:54 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A0111065676 for ; Tue, 16 Feb 2010 19:11:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 320DA8FC1E for ; Tue, 16 Feb 2010 19:11:53 +0000 (UTC) Received: (qmail 20867 invoked by uid 399); 16 Feb 2010 18:45:13 -0000 Received: from localhost (HELO ?192.168.0.145?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 16 Feb 2010 18:45:13 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B7AE7BA.406@FreeBSD.org> Date: Tue, 16 Feb 2010 10:45:14 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: ticso@cicely.de References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> In-Reply-To: <20100216183951.GI43625@cicely7.cicely.de> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: arm@freebsd.org, Bernd Walter , current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 19:11:54 -0000 On 2/16/2010 10:39 AM, Bernd Walter wrote: > [55]Please.tell.me.who.am.I# gdb /usr/sbin/named named.core > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "arm-marcel-freebsd"...(no debugging symbols found)... > Core was generated by `named'. > Program terminated with signal 5, Trace/breakpoint trap. > Reading symbols from /lib/libcrypto.so.6...(no debugging symbols found)...done. > Loaded symbols for /lib/libcrypto.so.6 > Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done. > Loaded symbols for /lib/libthr.so.3 > Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. > Loaded symbols for /lib/libc.so.7 > Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. > Loaded symbols for /libexec/ld-elf.so.1 > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > [New Thread 20804280 (LWP 100062)] > [New Thread 20804140 (LWP 100052)] > (gdb) bt > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > #1 0x203572b8 in _thread_bp_death () from /lib/libthr.so.3 > #2 0x20349da4 in pthread_create () from /lib/libthr.so.3 > #3 0x00164cb8 in ?? () > (gdb) > > Do we have a general threading problem on ARM? Wow, that was fast. :) It sure looks like that's the problem. Can you try compiling ports/dns/bind96 without threads and see if that works for you? If it does then it would be good to follow up on freebsd-arm@FreeBSD.org and see if the problem can be addressed. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-freebsd-arm@FreeBSD.ORG Tue Feb 16 20:36:13 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFEA6106568F; Tue, 16 Feb 2010 20:36:13 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 797DF8FC1B; Tue, 16 Feb 2010 20:36:13 +0000 (UTC) Received: from orion.SpringDaemons.com (adsl-99-48-191-9.dsl.snfc21.sbcglobal.net [99.48.191.9]) by mx0.deglitch.com (Postfix) with ESMTPA id 442028FC4E; Tue, 16 Feb 2010 23:36:10 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id EB26439C4E; Tue, 16 Feb 2010 12:36:51 -0800 (PST) Date: Tue, 16 Feb 2010 12:36:46 -0800 From: Stanislav Sedov To: ticso@cicely.de Message-Id: <20100216123646.fc741643.stas@FreeBSD.org> In-Reply-To: <20100216183951.GI43625@cicely7.cicely.de> References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> Organization: The FreeBSD Project X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Tue__16_Feb_2010_12_36_46_-0800_ktv1ZEN10U=duo34" Cc: arm@freebsd.org, Bernd Walter , current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 20:36:13 -0000 --Signature=_Tue__16_Feb_2010_12_36_46_-0800_ktv1ZEN10U=duo34 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 16 Feb 2010 19:39:51 +0100 Bernd Walter mentioned: >=20 > Do we have a general threading problem on ARM? >=20 I don't think so. I used a lot of threaded applications on arm, and they worked fine. However, this might be some obscure bug. --=20 Stanislav Sedov ST4096-RIPE --Signature=_Tue__16_Feb_2010_12_36_46_-0800_ktv1ZEN10U=duo34 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJLewHjAAoJEL8lojEJL9nwGVIP/3TWFKG+7sMk+74SDXzoTcXv P436c99mDsiO0TDaIZXrpVHIifpBFbpsiCo6YU1HJkrEnmcilZIF4JIH8X2M47NC DuDk7s30ymMXcSNRbqFJMSiI2Jk3H9lXq5GfgPk7DdefHkyt0vzLoZIfChu9zpCT vi9ouVq1k1NW7C++N8jOQRkN2F1EAVQoygPf4EzsUmM6yGQoPHdU+yL/XAn9TIRb yznzOts0lrKVLbH0rpsPzW7WPCoNrDBubdqCbI7ejcD1uX0JkNCNGWsCa6VjHi91 ZQYUkxe7YgS35hcb/3oOC6MOzqBgawYVnToDRoUiLz624Bxm6Q9Ci0Vwml/6o+EX 8eie/OO0tcEFBySS4jwf+uN69Ume159BzXKajIbWEdl2WV7wZTY6T700nPmSBaFq oVRKhM+WEoQBAsZYLXgFo6K+RyLsYkvnfkzfxj6WMjBS9KcfRZoPT5676BL5pYcR lENXTj3tC430m5RSXR7KXRhST1VkhQO20iHGewlepZMCrpiLA8Qi/0BRbHo26E3Q sT/sjkaHTK3VWjKh4Fti9XDCOZTy4FKgO+EVmlq3Qt425Sm1baJAR9BtRFQwJAx9 rCtbx6kjBbYUryWfpAJwsHuTRz0MaAJpoRNkPmH1S1ZI5iPP95e9/OV5xMU0/4be XDeGD8AhaqLrOSbHkGcn =Emts -----END PGP SIGNATURE----- --Signature=_Tue__16_Feb_2010_12_36_46_-0800_ktv1ZEN10U=duo34-- From owner-freebsd-arm@FreeBSD.ORG Tue Feb 16 20:58:53 2010 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62D2C106566C; Tue, 16 Feb 2010 20:58:53 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 18AB88FC0C; Tue, 16 Feb 2010 20:58:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1GKsH2r034995; Tue, 16 Feb 2010 13:54:17 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 16 Feb 2010 13:54:30 -0700 (MST) Message-Id: <20100216.135430.702773873773944731.imp@bsdimp.com> To: stas@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20100216123646.fc741643.stas@FreeBSD.org> References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> <20100216123646.fc741643.stas@FreeBSD.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: arm@FreeBSD.org, ticso@cicely7.cicely.de, ticso@cicely.de, current@FreeBSD.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 20:58:53 -0000 In message: <20100216123646.fc741643.stas@FreeBSD.org> Stanislav Sedov writes: : On Tue, 16 Feb 2010 19:39:51 +0100 : Bernd Walter mentioned: : : > : > Do we have a general threading problem on ARM? : > : : I don't think so. I used a lot of threaded applications on arm, and they : worked fine. However, this might be some obscure bug. I know that 6.x ARM worked with threads no problem. We had dozens of threads in our control programs. The one caveat is that I've found bugs in the atomic routines in the past, and have had people submit fixes as well. All of those should be in the tree, but since some arrived when I was crazy busy for Cisco, they might have fallen on the floor. Warner From owner-freebsd-arm@FreeBSD.ORG Tue Feb 16 21:09:23 2010 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4333106568D; Tue, 16 Feb 2010 21:09:23 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 2DCC88FC18; Tue, 16 Feb 2010 21:09:22 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1GL9J6k056926 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 16 Feb 2010 22:09:19 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1GL9GS1049226 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Feb 2010 22:09:16 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1GL9GQH073307; Tue, 16 Feb 2010 22:09:16 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1GL9GWf073306; Tue, 16 Feb 2010 22:09:16 +0100 (CET) (envelope-from ticso) Date: Tue, 16 Feb 2010 22:09:16 +0100 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20100216210916.GN43625@cicely7.cicely.de> References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> <20100216123646.fc741643.stas@FreeBSD.org> <20100216.135430.702773873773944731.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100216.135430.702773873773944731.imp@bsdimp.com> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: stas@FreeBSD.org, arm@FreeBSD.org, ticso@cicely7.cicely.de, ticso@cicely.de, current@FreeBSD.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 21:09:23 -0000 On Tue, Feb 16, 2010 at 01:54:30PM -0700, M. Warner Losh wrote: > In message: <20100216123646.fc741643.stas@FreeBSD.org> > Stanislav Sedov writes: > : On Tue, 16 Feb 2010 19:39:51 +0100 > : Bernd Walter mentioned: > : > : > > : > Do we have a general threading problem on ARM? > : > > : > : I don't think so. I used a lot of threaded applications on arm, and they > : worked fine. However, this might be some obscure bug. > > I know that 6.x ARM worked with threads no problem. We had dozens of > threads in our control programs. No doubt - I'm running 7.0-current: [82]arm9# uname -a FreeBSD arm9.cicely.de 7.0-CURRENT FreeBSD 7.0-CURRENT #12: Thu Dec 6 02:39:25 CET 2007 ticso@arm9.cicely.de:/data/builder/arm-p4-running-2/src/sys/arm/compile/FBOX arm [83]arm9# uptime 10:02PM up 690 days, 19:43, 1 user, load averages: 0.29, 0.22, 0.15 Including named, although not on exactly this machine. This one is even compiled O2 - with a few hand selected exceptions. Compiling perl fails with sig11 as well, but I hadn't verified this problem any further. > The one caveat is that I've found bugs in the atomic routines in the > past, and have had people submit fixes as well. All of those should > be in the tree, but since some arrived when I was crazy busy for > Cisco, they might have fallen on the floor. I'm running on RM9200, so it is a UP system. Of course this won't rule out all possible atomic cases. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Tue Feb 16 21:12:35 2010 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0E81106566C; Tue, 16 Feb 2010 21:12:35 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 8D0948FC1F; Tue, 16 Feb 2010 21:12:35 +0000 (UTC) Received: from orion.SpringDaemons.com (unknown [99.48.191.9]) by mx0.deglitch.com (Postfix) with ESMTPA id 7EADA8FC52; Wed, 17 Feb 2010 00:12:33 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id BCDDB39C4E; Tue, 16 Feb 2010 13:13:15 -0800 (PST) Date: Tue, 16 Feb 2010 13:13:06 -0800 From: Stanislav Sedov To: Ulrich =?UTF-8?B?U3DDtnJsZWlu?= Message-Id: <20100216131306.969fa4b8.stas@FreeBSD.org> In-Reply-To: <20100213181021.GR9748@acme.spoerlein.net> References: <20100213181021.GR9748@acme.spoerlein.net> Organization: The FreeBSD Project X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Tue__16_Feb_2010_13_13_06_-0800_ra.IGD4TfuITZVOT" Cc: arm@FreeBSD.org Subject: Re: RFC: patch to crt1.c, fixing a typo/oversight X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 21:12:36 -0000 --Signature=_Tue__16_Feb_2010_13_13_06_-0800_ra.IGD4TfuITZVOT Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, 13 Feb 2010 19:10:21 +0100 Ulrich Sp=C3=B6rlein mentioned: > Dear ARM devs, >=20 > I have no resources to test the following patch, which fixes a typo > regarding the function declaration of _start. If some knowledgable folks > could please review/test the change. Thanks >=20 > https://www.spoerlein.net/gitweb/?p=3Dfreebsd-head.work/.git;a=3Dcommitdi= ff;h=3D0e393a134bf00729756f00f539536956fc170dd9 >=20 Hi, Ulrich! I wonder if we need this prototype here at all? --=20 Stanislav Sedov ST4096-RIPE --Signature=_Tue__16_Feb_2010_13_13_06_-0800_ra.IGD4TfuITZVOT Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJLewprAAoJEL8lojEJL9nww60P/2hqm5mlYKo2tbLXjI9eg+/b PuIbdIaNlFUQMdouJrtcxWlyJTf5BQ7PJrIaUI/KCF7ISnMcpyYnWpB/VVwu8ymt Ju2tN0uIYWa2YQqr5uI98BuCf4m6uwN63pX9mLqMkjRzMca0twl6uxHZ2qI95/vE WYSPB5TXn4GtJAhs80W7giwQUwehwtqzIu2VnSp3AHpHeO28dYeqC4c8M83gQyGA uZpCoAL2wk7pWv3vftvrrD+/KhnPdzCXpA2tBRzfgiTaQ5xd1or5akbVjp6r8d0c lprQIQCb0VaJGzf53RdsYcmApN4yuH4eJcFH6/eKEAGxDpFcL6Ll7hEYrpRkwqG/ dY0s7/LZ9V+Xb+RJoylYqJtXPNRP7o5VjVSTiNrRUbPF4T8vGugxEo2RxEI9OmyI obvw6a+mHkWTpJeVAsWTsFsEcJ/rzxPB4C/kmcP9nhLaUGsNayY7eR8xnAS9PWoW odKyMVLq6CjZlktkn6E4jk/rXl7f9vSDb/lNHg8rFiSNZ6DdkmsP8GgqaVuG9fgH JZPOtfcCmnTqLX8cTWIK/b6qtdIvZhQIfQ8/Aja0wi/7f/MZBie/22LBdFWn7z+Y y4se+kWTvBO6rzBfTko0ZVV8QaiiZ1nkmF7IdSEfjBoY8za2a54MTxf/C5PG9+AO lkO4tw6qN1LdCNRQjGPp =FM68 -----END PGP SIGNATURE----- --Signature=_Tue__16_Feb_2010_13_13_06_-0800_ra.IGD4TfuITZVOT-- From owner-freebsd-arm@FreeBSD.ORG Tue Feb 16 21:13:32 2010 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAD42106566B; Tue, 16 Feb 2010 21:13:31 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 684918FC0C; Tue, 16 Feb 2010 21:13:31 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1GLDThx057108 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 16 Feb 2010 22:13:30 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1GLDRcM049481 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Feb 2010 22:13:27 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1GLDRLw073345; Tue, 16 Feb 2010 22:13:27 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1GLDR61073344; Tue, 16 Feb 2010 22:13:27 +0100 (CET) (envelope-from ticso) Date: Tue, 16 Feb 2010 22:13:27 +0100 From: Bernd Walter To: Doug Barton Message-ID: <20100216211327.GO43625@cicely7.cicely.de> References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> <4B7AE7BA.406@FreeBSD.org> <20100216185614.GK43625@cicely7.cicely.de> <4B7AEBC0.5050506@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B7AEBC0.5050506@FreeBSD.org> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: arm@FreeBSD.org, Bernd Walter , ticso@cicely.de, current@FreeBSD.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 21:13:32 -0000 On Tue, Feb 16, 2010 at 11:02:24AM -0800, Doug Barton wrote: > On 2/16/2010 10:56 AM, Bernd Walter wrote: > >> Wow, that was fast. :) It sure looks like that's the problem. Can you > >> try compiling ports/dns/bind96 without threads and see if that works for > >> you? If it does then it would be good to follow up on > >> freebsd-arm@FreeBSD.org and see if the problem can be addressed. > > > > I'd send it before I saw your mail. > > Yeah, I figured that when I got your other reply just now. :) I > received the trace message to the list in the same mail download as my > message to the list, which I thought was quite impressive on your part. :) > > > Compiling however will take some time. > > No problem, let us know how it works out. A first try failed because a dependend lib won't compile :( I will retry without XML. But iconv isn't that unimportant, so this needs investigation as well. [...] install -o root -g wheel -m 444 include/libcharset.h /usr/obj/usr/ports/converters/libiconv/work/libiconv-1.13.1/lib/libcharset.h install -o root -g wheel -m 444 include/localcharset.h.inst /usr/obj/usr/ports/converters/libiconv/work/libiconv-1.13.1/lib/localcharset.h cd lib && make all /bin/sh /usr/local/bin/libtool --mode=compile --tag=CC cc -I. -I. -I../include -I./../include -I.. -I./.. -O -pipe -mcpu=arm9 -std=gnu89 -DLIBDIR=\"/usr/local/lib\" -DBUILDING_LIBICONV -DBUILDING_DLL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libiconv_set_relocation_prefix -Drelocate=libiconv_relocate -DHAVE_CONFIG_H -c ./iconv.c libtool: compile: cc -I. -I. -I../include -I./../include -I.. -I./.. -O -pipe -mcpu=arm9 -std=gnu89 -DLIBDIR=\"/usr/local/lib\" -DBUILDING_LIBICONV -DBUILDING_DLL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libiconv_set_relocation_prefix -Drelocate=libiconv_relocate -DHAVE_CONFIG_H -c ./iconv.c -fPIC -DPIC -o .libs/iconv.o {standard input}: Assembler messages: {standard input}:569470: Error: symbol definition loop encountered at `.L4822' *** Error code 1 Stop in /usr/obj/usr/ports/converters/libiconv/work/libiconv-1.13.1/lib. *** Error code 1 Stop in /usr/obj/usr/ports/converters/libiconv/work/libiconv-1.13.1. *** Error code 1 Stop in /usr/ports/converters/libiconv. *** Error code 1 Stop in /usr/ports/converters/libiconv. *** Error code 1 Stop in /usr/ports/devel/gettext. *** Error code 1 Stop in /usr/ports/devel/gmake. *** Error code 1 Stop in /usr/ports/textproc/libxml2. *** Error code 1 Stop in /usr/ports/dns/bind96. *** Error code 1 Stop in /usr/ports/dns/bind96. 3214.000u 1468.000s 2:12:18.00 58.9% 3300+1299k 845+23834io 5433pf+0w Exit 1 -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Tue Feb 16 21:15:12 2010 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50AB21065696; Tue, 16 Feb 2010 21:15:12 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id CA83F8FC17; Tue, 16 Feb 2010 21:15:11 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1GLFAtA057180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 16 Feb 2010 22:15:10 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1GLF8qR049543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Feb 2010 22:15:08 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1GLF8mt073361; Tue, 16 Feb 2010 22:15:08 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1GLF8JS073360; Tue, 16 Feb 2010 22:15:08 +0100 (CET) (envelope-from ticso) Date: Tue, 16 Feb 2010 22:15:08 +0100 From: Bernd Walter To: Stanislav Sedov Message-ID: <20100216211508.GP43625@cicely7.cicely.de> References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> <20100216123646.fc741643.stas@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100216123646.fc741643.stas@FreeBSD.org> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: arm@FreeBSD.org, Bernd Walter , ticso@cicely.de, current@FreeBSD.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 21:15:12 -0000 On Tue, Feb 16, 2010 at 12:36:46PM -0800, Stanislav Sedov wrote: > On Tue, 16 Feb 2010 19:39:51 +0100 > Bernd Walter mentioned: > > > > > Do we have a general threading problem on ARM? > > > > I don't think so. I used a lot of threaded applications on arm, and they > worked fine. However, this might be some obscure bug. The question is if it works on current. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 02:22:02 2010 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D59E5106579F; Wed, 17 Feb 2010 02:22:02 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 3FDCD8FC13; Wed, 17 Feb 2010 02:22:01 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1H2Lvfc086199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Feb 2010 03:21:57 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1H2LtSX069260 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Feb 2010 03:21:55 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1H2LsYH075036; Wed, 17 Feb 2010 03:21:54 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1H2LrjA075035; Wed, 17 Feb 2010 03:21:53 +0100 (CET) (envelope-from ticso) Date: Wed, 17 Feb 2010 03:21:53 +0100 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20100217022153.GR43625@cicely7.cicely.de> References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> <20100216123646.fc741643.stas@FreeBSD.org> <20100216.135430.702773873773944731.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100216.135430.702773873773944731.imp@bsdimp.com> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: stas@FreeBSD.org, arm@FreeBSD.org, ticso@cicely7.cicely.de, ticso@cicely.de, current@FreeBSD.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 02:22:02 -0000 On Tue, Feb 16, 2010 at 01:54:30PM -0700, M. Warner Losh wrote: > In message: <20100216123646.fc741643.stas@FreeBSD.org> > Stanislav Sedov writes: > : On Tue, 16 Feb 2010 19:39:51 +0100 > : Bernd Walter mentioned: > : > : > > : > Do we have a general threading problem on ARM? > : > > : > : I don't think so. I used a lot of threaded applications on arm, and they > : worked fine. However, this might be some obscure bug. > > I know that 6.x ARM worked with threads no problem. We had dozens of > threads in our control programs. > > The one caveat is that I've found bugs in the atomic routines in the > past, and have had people submit fixes as well. All of those should > be in the tree, but since some arrived when I was crazy busy for > Cisco, they might have fallen on the floor. At least in my short test threads seem to work: [70]Please.tell.me.who.am.I# gcc -Wall -pthread -o thread thread.c 5.000u 0.000s 0:15.80 42.7% 39273+42143k 7+0io 0pf+0w [71]Please.tell.me.who.am.I# ./thread hello world hello world from thread [72]Please.tell.me.who.am.I# cat thread.c #include #include #include #include void * mythread(void *arg) { printf("hello world from thread\n"); return NULL; } int main(int argc, char *argv[]) { printf("hello world\n"); pthread_t id = 0; pthread_create(&id, NULL, mythread, NULL); sleep(10); return 0; } -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 02:30:36 2010 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61C441065697; Wed, 17 Feb 2010 02:30:36 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id E1EB28FC26; Wed, 17 Feb 2010 02:30:35 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1H2UYvX086604 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Feb 2010 03:30:34 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1H2UQmE069608 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Feb 2010 03:30:26 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1H2UQkZ075080; Wed, 17 Feb 2010 03:30:26 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1H2UQOX075079; Wed, 17 Feb 2010 03:30:26 +0100 (CET) (envelope-from ticso) Date: Wed, 17 Feb 2010 03:30:26 +0100 From: Bernd Walter To: Doug Barton Message-ID: <20100217023026.GS43625@cicely7.cicely.de> References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> <4B7AE7BA.406@FreeBSD.org> <20100216185614.GK43625@cicely7.cicely.de> <4B7AEBC0.5050506@FreeBSD.org> <20100216211327.GO43625@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100216211327.GO43625@cicely7.cicely.de> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: arm@FreeBSD.org, Bernd Walter , ticso@cicely.de, current@FreeBSD.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 02:30:36 -0000 On Tue, Feb 16, 2010 at 10:13:27PM +0100, Bernd Walter wrote: > On Tue, Feb 16, 2010 at 11:02:24AM -0800, Doug Barton wrote: > > On 2/16/2010 10:56 AM, Bernd Walter wrote: > > >> Wow, that was fast. :) It sure looks like that's the problem. Can you > > >> try compiling ports/dns/bind96 without threads and see if that works for > > >> you? If it does then it would be good to follow up on > > >> freebsd-arm@FreeBSD.org and see if the problem can be addressed. > > > > > > I'd send it before I saw your mail. > > > > Yeah, I figured that when I got your other reply just now. :) I > > received the trace message to the list in the same mail download as my > > message to the list, which I thought was quite impressive on your part. :) > > > > > Compiling however will take some time. > > > > No problem, let us know how it works out. Mmm - the port (without thread and without XML) works fine: [78]Please.tell.me.who.am.I# host -a www.freebsd.org 127.0.0.1 Trying "www.freebsd.org" Using domain server: Name: 10.1.1.9 Address: 10.1.1.9#53 Aliases: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2501 ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 3, ADDITIONAL: 5 ;; QUESTION SECTION: ;www.freebsd.org. IN ANY ;; ANSWER SECTION: www.freebsd.org. 3600 IN MX 0 . www.freebsd.org. 3600 IN AAAA 2001:4f8:fff6::21 www.freebsd.org. 3600 IN A 69.147.83.33 ;; AUTHORITY SECTION: freebsd.org. 3544 IN NS ns3.isc-sns.info. freebsd.org. 3544 IN NS ns2.isc-sns.com. freebsd.org. 3544 IN NS ns1.isc-sns.net. ;; ADDITIONAL SECTION: ns2.isc-sns.com. 87978 IN A 38.103.2.1 ns1.isc-sns.net. 87978 IN A 72.52.71.1 ns1.isc-sns.net. 87978 IN AAAA 2001:470:1a::1 ns3.isc-sns.info. 3546 IN A 63.243.194.1 ns3.isc-sns.info. 3546 IN AAAA 2001:5a0:10::1 Received 284 bytes from 10.1.1.9#53 in 135 ms Feb 17 02:21:48 Please named[28754]: starting BIND 9.6.1-P3 Feb 17 02:21:48 Please named[28754]: built with '--localstatedir=/var' '--disable-linux-caps' '--with-randomdev=/dev/random' '--with-openssl=/usr' '--without-libxml2' '--without-idn' '--disable-threads' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=arm-portbld-freebsd9.0' 'build_alias=arm-portbld-freebsd9.0' 'CC=cc' 'CFLAGS=-O -pipe -mcpu=arm9' 'LDFLAGS= -rpath=/usr/lib:/usr/local/lib' 'CXX=c++' 'CXXFLAGS=-O -pipe -mcpu=arm9' Feb 17 02:21:54 Please named[28754]: max open files (957) is smaller than max sockets (4096) Feb 17 02:21:57 Please named[28754]: command channel listening on 127.0.0.1#953 Feb 17 02:21:57 Please named[28754]: command channel listening on ::1#953 Feb 17 02:22:05 Please named[28754]: running [75]Please.tell.me.who.am.I# sockstat | grep named root named 28754 3 dgram -> /var/run/logpriv root named 28754 20 tcp4 127.0.0.1:53 *:* root named 28754 21 tcp4 127.0.0.1:953 *:* root named 28754 22 tcp6 ::1:953 *:* root named 28754 512 udp4 127.0.0.1:53 *:* On the other hand a short pthread test worked fine as well. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 04:33:38 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23BFA1065695; Wed, 17 Feb 2010 04:33:38 +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 C6F678FC15; Wed, 17 Feb 2010 04:33:37 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.3/8.14.3) with ESMTP id o1H4Xbms039688; Tue, 16 Feb 2010 23:33:37 -0500 (EST) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.3/8.14.3/Submit) id o1H4Xb93039670; Wed, 17 Feb 2010 04:33:37 GMT (envelope-from tinderbox@freebsd.org) Date: Wed, 17 Feb 2010 04:33:37 GMT Message-Id: <201002170433.o1H4Xb93039670@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 arm/arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 04:33:38 -0000 TB --- 2010-02-17 03:45:00 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2010-02-17 03:45:00 - starting HEAD tinderbox run for arm/arm TB --- 2010-02-17 03:45:00 - cleaning the object tree TB --- 2010-02-17 03:45:20 - cvsupping the source tree TB --- 2010-02-17 03:45:20 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/arm/arm/supfile TB --- 2010-02-17 03:45:56 - building world TB --- 2010-02-17 03:45:56 - MAKEOBJDIRPREFIX=/obj TB --- 2010-02-17 03:45:56 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-02-17 03:45:56 - TARGET=arm TB --- 2010-02-17 03:45:56 - TARGET_ARCH=arm TB --- 2010-02-17 03:45:56 - TZ=UTC TB --- 2010-02-17 03:45:56 - __MAKE_CONF=/dev/null TB --- 2010-02-17 03:45:56 - cd /src TB --- 2010-02-17 03:45:56 - /usr/bin/make -B buildworld >>> World build started on Wed Feb 17 03:45:56 UTC 2010 >>> 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 [...] cc -O -pipe -DPORTMAP -DLIBWRAP -DINET6 -std=gnu99 -Wsystem-headers -Werror -Wno-pointer-sign -c /src/usr.sbin/rpcbind/rpcb_svc.c cc -O -pipe -DPORTMAP -DLIBWRAP -DINET6 -std=gnu99 -Wsystem-headers -Werror -Wno-pointer-sign -c /src/usr.sbin/rpcbind/rpcb_svc_com.c cc -O -pipe -DPORTMAP -DLIBWRAP -DINET6 -std=gnu99 -Wsystem-headers -Werror -Wno-pointer-sign -c /src/usr.sbin/rpcbind/security.c cc -O -pipe -DPORTMAP -DLIBWRAP -DINET6 -std=gnu99 -Wsystem-headers -Werror -Wno-pointer-sign -c /src/usr.sbin/rpcbind/warmstart.c cc -O -pipe -DPORTMAP -DLIBWRAP -DINET6 -std=gnu99 -Wsystem-headers -Werror -Wno-pointer-sign -c /src/usr.sbin/rpcbind/util.c cc1: warnings being treated as errors /src/usr.sbin/rpcbind/util.c: In function 'addrmerge': /src/usr.sbin/rpcbind/util.c:181: warning: implicit declaration of function 'addr_is_bound' *** Error code 1 Stop in /src/usr.sbin/rpcbind. *** Error code 1 Stop in /src/usr.sbin. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2010-02-17 04:33:37 - WARNING: /usr/bin/make returned exit code 1 TB --- 2010-02-17 04:33:37 - ERROR: failed to build world TB --- 2010-02-17 04:33:37 - 2077.93 user 569.32 system 2916.51 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-arm-arm.full From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 05:54:21 2010 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DBBD106566C for ; Wed, 17 Feb 2010 05:54:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 8F6F08FC24 for ; Wed, 17 Feb 2010 05:54:20 +0000 (UTC) Received: (qmail 31557 invoked by uid 399); 17 Feb 2010 05:54:19 -0000 Received: from localhost (HELO ?192.168.0.145?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 17 Feb 2010 05:54:19 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B7B848C.8010003@FreeBSD.org> Date: Tue, 16 Feb 2010 21:54:20 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: ticso@cicely.de References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> <4B7AE7BA.406@FreeBSD.org> <20100216185614.GK43625@cicely7.cicely.de> <4B7AEBC0.5050506@FreeBSD.org> <20100216211327.GO43625@cicely7.cicely.de> <20100217023026.GS43625@cicely7.cicely.de> In-Reply-To: <20100217023026.GS43625@cicely7.cicely.de> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: arm@FreeBSD.org, Bernd Walter , current@FreeBSD.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 05:54:21 -0000 On 2/16/2010 6:30 PM, Bernd Walter wrote: > Mmm - the port (without thread and without XML) works fine: I'm glad to here that you got something that works. Unfortunately when you start talking about threads on ARM you've pole vaulted outside of my competency area. If the folks on the -arm list can't come up with any good suggestions you might want to send e-mail to bind-users@isc.org, especially if it's a case where some threaded things work, but BIND doesn't. It would probably also be useful to try with the same version of BIND, same kind of system, on a different FreeBSD version with and without threaded BIND. Not sure if that's possible for you or not, but it would definitely be an interesting data point. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 08:05:26 2010 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75368106566B; Wed, 17 Feb 2010 08:05:26 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2001:470:9a47::1]) by mx1.freebsd.org (Postfix) with ESMTP id 14BAD8FC1B; Wed, 17 Feb 2010 08:05:25 +0000 (UTC) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id o1H85PkJ048842 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Feb 2010 09:05:25 +0100 (CET) (envelope-from uqs@FreeBSD.org) Received: (from uqs@localhost) by acme.spoerlein.net (8.14.4/8.14.4/Submit) id o1H85PHJ048841; Wed, 17 Feb 2010 09:05:25 +0100 (CET) (envelope-from uqs@FreeBSD.org) Date: Wed, 17 Feb 2010 09:05:25 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Stanislav Sedov Message-ID: <20100217080524.GJ57731@acme.spoerlein.net> References: <20100213181021.GR9748@acme.spoerlein.net> <20100216131306.969fa4b8.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20100216131306.969fa4b8.stas@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: arm@FreeBSD.org Subject: Re: RFC: patch to crt1.c, fixing a typo/oversight X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 08:05:26 -0000 On Tue, 16.02.2010 at 13:13:06 -0800, Stanislav Sedov wrote: > On Sat, 13 Feb 2010 19:10:21 +0100 > Ulrich Spörlein mentioned: > > > Dear ARM devs, > > > > I have no resources to test the following patch, which fixes a typo > > regarding the function declaration of _start. If some knowledgable folks > > could please review/test the change. Thanks > > > > https://www.spoerlein.net/gitweb/?p=freebsd-head.work/.git;a=commitdiff;h=0e393a134bf00729756f00f539536956fc170dd9 > > > > Hi, Ulrich! > > I wonder if we need this prototype here at all? Please disregard the previous patch. Warner had some helpful comments and I came up with this: https://www.spoerlein.net/gitweb/?p=freebsd.work/.git;a=commitdiff;h=b6ec6bfb331b2fa132d6fc3e74ebe6605d1ab8e3 which I think is the better approach to silencing gcc warnings and get this to WARNS=6. Regards, Uli From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 14:18:15 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B1551065670 for ; Wed, 17 Feb 2010 14:18:15 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id E82238FC15 for ; Wed, 17 Feb 2010 14:18:14 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id DA9F9C427D for ; Wed, 17 Feb 2010 15:20:06 +0100 (CET) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id 0d-tWMiHAAMT for ; Wed, 17 Feb 2010 15:20:06 +0100 (CET) Received: from [10.0.0.75] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPA id 219D4C41E7 for ; Wed, 17 Feb 2010 15:20:06 +0100 (CET) Message-ID: <4B7BFAA4.4040607@semihalf.com> Date: Wed, 17 Feb 2010 15:18:12 +0100 From: Grzegorz Bernacki User-Agent: Thunderbird 2.0.0.16 (X11/20090618) MIME-Version: 1.0 To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 14:18:15 -0000 Hi, I've noticed that kdump on ARM doesn't work properly, it generates bus error. The problem is that structures dumped into ktrace.out are not aligned. Processing such a structure causes Aligment Fault. One solution is to copy structure into local variable and then process it, please see patch below. But I am not sure if this is the best solution and maybe someone has a better idea. grzesiek diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index 386221e..5a15886 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -1325,6 +1325,10 @@ ktrstat(struct stat *statp) void ktrstruct(char *buf, size_t buflen) { +#if defined(__arm__) + struct stat stat; + struct sockaddr sockaddr; +#endif char *name, *data; size_t namelen, datalen; int i; @@ -1348,12 +1352,22 @@ ktrstruct(char *buf, size_t buflen) if (strcmp(name, "stat") == 0) { if (datalen != sizeof(struct stat)) goto invalid; +#if defined(__arm__) + memcpy(&stat, data, sizeof(struct stat)); + ktrstat(&stat); +#else ktrstat((struct stat *)data); +#endif } else if (strcmp(name, "sockaddr") == 0) { if (datalen < sizeof(struct sockaddr) || datalen != ((struct sockaddr *)(data))->sa_len) goto invalid; +#if defined(__arm__) + memcpy(&sockaddr, data, sizeof(struct sockaddr)); + ktrsockaddr(&sockaddr); +#else ktrsockaddr((struct sockaddr *)data); +#endif } else { printf("unknown structure\n"); } From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 14:44:08 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F904106566C for ; Wed, 17 Feb 2010 14:44:08 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 992258FC1F for ; Wed, 17 Feb 2010 14:44:07 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=b7Me_CeqYRheD2dx2JQA:9 a=Fj_g-0flJBSx6uBwkyIA:7 a=X42QrNPQRFndd6da7SR3AGOlUYQA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 1274151488; Wed, 17 Feb 2010 15:44:05 +0100 From: Hans Petter Selasky To: freebsd-arm@freebsd.org Date: Wed, 17 Feb 2010 15:42:35 +0100 User-Agent: KMail/1.12.4 (FreeBSD/8.0-STABLE; KDE/4.3.4; amd64; ; ) References: <4B7BFAA4.4040607@semihalf.com> In-Reply-To: <4B7BFAA4.4040607@semihalf.com> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201002171542.35757.hselasky@c2i.net> Cc: Subject: Re: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 14:44:08 -0000 On Wednesday 17 February 2010 15:18:12 Grzegorz Bernacki wrote: > Hi, > > I've noticed that kdump on ARM doesn't work properly, it generates bus > error. The problem is that structures dumped into ktrace.out are not > aligned. Processing such a structure causes Aligment Fault. One solution > is to copy structure into local variable and then process it, please see > patch below. But I am not sure if this is the best solution and maybe > someone has a better idea. > > grzesiek > > > diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c > index 386221e..5a15886 100644 > --- a/usr.bin/kdump/kdump.c > +++ b/usr.bin/kdump/kdump.c > @@ -1325,6 +1325,10 @@ ktrstat(struct stat *statp) > void > ktrstruct(char *buf, size_t buflen) > { > +#if defined(__arm__) > + struct stat stat; > + struct sockaddr sockaddr; > +#endif > char *name, *data; > size_t namelen, datalen; > int i; > @@ -1348,12 +1352,22 @@ ktrstruct(char *buf, size_t buflen) > if (strcmp(name, "stat") == 0) { > if (datalen != sizeof(struct stat)) > goto invalid; > +#if defined(__arm__) > + memcpy(&stat, data, sizeof(struct stat)); > + ktrstat(&stat); > +#else > ktrstat((struct stat *)data); > +#endif > } else if (strcmp(name, "sockaddr") == 0) { > if (datalen < sizeof(struct sockaddr) || > datalen != ((struct sockaddr *)(data))->sa_len) > goto invalid; > +#if defined(__arm__) > + memcpy(&sockaddr, data, sizeof(struct sockaddr)); > + ktrsockaddr(&sockaddr); > +#else > ktrsockaddr((struct sockaddr *)data); > +#endif > } else { > printf("unknown structure\n"); > } I think more than ARM is affected by this. --HPS From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 14:54:10 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97F1D1065676 for ; Wed, 17 Feb 2010 14:54:10 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-fx0-f226.google.com (mail-fx0-f226.google.com [209.85.220.226]) by mx1.freebsd.org (Postfix) with ESMTP id 263718FC13 for ; Wed, 17 Feb 2010 14:54:09 +0000 (UTC) Received: by fxm26 with SMTP id 26so7297215fxm.13 for ; Wed, 17 Feb 2010 06:54:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=GePqW7/Xxmr4hVbM07UyaDvHOriSm1egV8AHZ2tgY9Q=; b=R6dd9/o9aZKeDIH1oeppz/KmCilw4NJqbyupZeiI9PIb2pY+ifAi/fYzltDTRgLWPP 59/Jchu1kFi/w+Ee8+7fhKbS5hnYiD4dK58rUWX5YnjtpGf4R35ODm6hFTQ6bMqijn/m 1ho56kSXySVbZdHPxPqCm+c1Mi/tU4+U71TeM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=CEHktJ6Yb0SAzNYuOWdSaZZIlPwKV0LsLS9cEjSXuzBOG1J21suDcbEnqk05Fku2NQ H4q74igBKnqCvBWfvuu93du3prVZqxuRo85bow8LP17rekvEiBjgNWo494wkbrZ7rw0D zgWHjRPF942+LyKUg6YYwyVgabivSxLXufCAk= Received: by 10.87.48.11 with SMTP id a11mr14488375fgk.36.1266418448788; Wed, 17 Feb 2010 06:54:08 -0800 (PST) Received: from ?10.0.10.4? (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by mx.google.com with ESMTPS id e3sm11977837fga.11.2010.02.17.06.54.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Feb 2010 06:54:07 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <4B7BFAA4.4040607@semihalf.com> Date: Wed, 17 Feb 2010 14:54:05 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4B7BFAA4.4040607@semihalf.com> To: Grzegorz Bernacki X-Mailer: Apple Mail (2.1077) Cc: freebsd-arm@freebsd.org Subject: Re: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 14:54:10 -0000 On 17 Feb 2010, at 14:18, Grzegorz Bernacki wrote: > Hi, >=20 > I've noticed that kdump on ARM doesn't work properly, it generates bus = error. The problem is that structures dumped into ktrace.out are not = aligned. Processing such a structure causes Aligment Fault. One solution = is to copy structure into local variable and then process it, please see = patch below. But I am not sure if this is the best solution and maybe = someone has a better idea. >=20 > grzesiek >=20 >=20 > diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c > index 386221e..5a15886 100644 > --- a/usr.bin/kdump/kdump.c > +++ b/usr.bin/kdump/kdump.c > @@ -1325,6 +1325,10 @@ ktrstat(struct stat *statp) > void > ktrstruct(char *buf, size_t buflen) > { > +#if defined(__arm__) > + struct stat stat; > + struct sockaddr sockaddr; > +#endif > char *name, *data; > size_t namelen, datalen; > int i; > @@ -1348,12 +1352,22 @@ ktrstruct(char *buf, size_t buflen) > if (strcmp(name, "stat") =3D=3D 0) { > if (datalen !=3D sizeof(struct stat)) > goto invalid; > +#if defined(__arm__) > + memcpy(&stat, data, sizeof(struct stat)); > + ktrstat(&stat); > +#else > ktrstat((struct stat *)data); > +#endif > } else if (strcmp(name, "sockaddr") =3D=3D 0) { > if (datalen < sizeof(struct sockaddr) || > datalen !=3D ((struct sockaddr *)(data))->sa_len) > goto invalid; > +#if defined(__arm__) > + memcpy(&sockaddr, data, sizeof(struct sockaddr)); > + ktrsockaddr(&sockaddr); > +#else > ktrsockaddr((struct sockaddr *)data); > +#endif > } else { > printf("unknown structure\n"); > } I wonder if this can't be made non arm conditional? -- Rui Paulo From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 15:16:18 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A977106566B for ; Wed, 17 Feb 2010 15:16:18 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id C3C7B8FC0A for ; Wed, 17 Feb 2010 15:16:17 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1HFGFfT025500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Feb 2010 16:16:16 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1HFG8ZX096249 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Feb 2010 16:16:08 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1HFG8EA078654; Wed, 17 Feb 2010 16:16:08 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1HFG79n078653; Wed, 17 Feb 2010 16:16:07 +0100 (CET) (envelope-from ticso) Date: Wed, 17 Feb 2010 16:16:07 +0100 From: Bernd Walter To: Rui Paulo Message-ID: <20100217151607.GU43625@cicely7.cicely.de> References: <4B7BFAA4.4040607@semihalf.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: freebsd-arm@freebsd.org Subject: Re: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 15:16:18 -0000 On Wed, Feb 17, 2010 at 02:54:05PM +0000, Rui Paulo wrote: > > On 17 Feb 2010, at 14:18, Grzegorz Bernacki wrote: > > > Hi, > > > > I've noticed that kdump on ARM doesn't work properly, it generates bus error. The problem is that structures dumped into ktrace.out are not aligned. Processing such a structure causes Aligment Fault. One solution is to copy structure into local variable and then process it, please see patch below. But I am not sure if this is the best solution and maybe someone has a better idea. Excellent! > > grzesiek > > > > > > diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c > > index 386221e..5a15886 100644 > > --- a/usr.bin/kdump/kdump.c > > +++ b/usr.bin/kdump/kdump.c > > @@ -1325,6 +1325,10 @@ ktrstat(struct stat *statp) > > void > > ktrstruct(char *buf, size_t buflen) > > { > > +#if defined(__arm__) > > + struct stat stat; > > + struct sockaddr sockaddr; > > +#endif > > char *name, *data; > > size_t namelen, datalen; > > int i; > > @@ -1348,12 +1352,22 @@ ktrstruct(char *buf, size_t buflen) > > if (strcmp(name, "stat") == 0) { > > if (datalen != sizeof(struct stat)) > > goto invalid; > > +#if defined(__arm__) > > + memcpy(&stat, data, sizeof(struct stat)); > > + ktrstat(&stat); > > +#else > > ktrstat((struct stat *)data); > > +#endif > > } else if (strcmp(name, "sockaddr") == 0) { > > if (datalen < sizeof(struct sockaddr) || > > datalen != ((struct sockaddr *)(data))->sa_len) > > goto invalid; > > +#if defined(__arm__) > > + memcpy(&sockaddr, data, sizeof(struct sockaddr)); > > + ktrsockaddr(&sockaddr); > > +#else > > ktrsockaddr((struct sockaddr *)data); > > +#endif > > } else { > > printf("unknown structure\n"); > > } > > I wonder if this can't be made non arm conditional? Either this struct is properly aligned or not. So why should this be made conditional? Non strict alignment architecturs also have problems with this, but it is usualy just speed penalties. There is one ARM sepcific struct missalignment problem. In this case we usually add __packed macro to structure definition. For most structures this usually means no change on other archtitectures and we only declare the struct to forcibly be what the programmer already expected. Only a few programmers are aware that they expect something from structures, which is not garantied. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 15:19:46 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E67D81065672 for ; Wed, 17 Feb 2010 15:19:45 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 72ABA8FC19 for ; Wed, 17 Feb 2010 15:19:45 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1HFJiIP025800 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Feb 2010 16:19:44 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1HFJffH096308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Feb 2010 16:19:41 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1HFJfDi078661; Wed, 17 Feb 2010 16:19:41 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1HFJfjV078660; Wed, 17 Feb 2010 16:19:41 +0100 (CET) (envelope-from ticso) Date: Wed, 17 Feb 2010 16:19:41 +0100 From: Bernd Walter To: Rui Paulo Message-ID: <20100217151941.GV43625@cicely7.cicely.de> References: <4B7BFAA4.4040607@semihalf.com> <20100217151607.GU43625@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100217151607.GU43625@cicely7.cicely.de> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: freebsd-arm@freebsd.org Subject: Re: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 15:19:46 -0000 On Wed, Feb 17, 2010 at 04:16:07PM +0100, Bernd Walter wrote: > On Wed, Feb 17, 2010 at 02:54:05PM +0000, Rui Paulo wrote: > > > > On 17 Feb 2010, at 14:18, Grzegorz Bernacki wrote: > > > > > Hi, > > > > > > I've noticed that kdump on ARM doesn't work properly, it generates bus error. The problem is that structures dumped into ktrace.out are not aligned. Processing such a structure causes Aligment Fault. One solution is to copy structure into local variable and then process it, please see patch below. But I am not sure if this is the best solution and maybe someone has a better idea. > > Excellent! > > > > grzesiek > > > > > > > > > diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c > > > index 386221e..5a15886 100644 > > > --- a/usr.bin/kdump/kdump.c > > > +++ b/usr.bin/kdump/kdump.c > > > @@ -1325,6 +1325,10 @@ ktrstat(struct stat *statp) > > > void > > > ktrstruct(char *buf, size_t buflen) > > > { > > > +#if defined(__arm__) > > > + struct stat stat; > > > + struct sockaddr sockaddr; > > > +#endif > > > char *name, *data; > > > size_t namelen, datalen; > > > int i; > > > @@ -1348,12 +1352,22 @@ ktrstruct(char *buf, size_t buflen) > > > if (strcmp(name, "stat") == 0) { > > > if (datalen != sizeof(struct stat)) > > > goto invalid; > > > +#if defined(__arm__) > > > + memcpy(&stat, data, sizeof(struct stat)); > > > + ktrstat(&stat); > > > +#else > > > ktrstat((struct stat *)data); > > > +#endif > > > } else if (strcmp(name, "sockaddr") == 0) { > > > if (datalen < sizeof(struct sockaddr) || > > > datalen != ((struct sockaddr *)(data))->sa_len) > > > goto invalid; > > > +#if defined(__arm__) > > > + memcpy(&sockaddr, data, sizeof(struct sockaddr)); > > > + ktrsockaddr(&sockaddr); > > > +#else > > > ktrsockaddr((struct sockaddr *)data); > > > +#endif > > > } else { > > > printf("unknown structure\n"); > > > } > > > > I wonder if this can't be made non arm conditional? Ups - I'd just recovered from Mr. Sandman's work. So we all agree about. Nevertheless it should be verified if this is just a faulty struct definition. On the other hand I think it is not because someone else wrote it is a brokem on mips as well. > Either this struct is properly aligned or not. > So why should this be made conditional? > Non strict alignment architecturs also have problems with this, but > it is usualy just speed penalties. > There is one ARM sepcific struct missalignment problem. > In this case we usually add __packed macro to structure definition. > For most structures this usually means no change on other > archtitectures and we only declare the struct to forcibly be what the > programmer already expected. > Only a few programmers are aware that they expect something from > structures, which is not garantied. > -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 15:24:01 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7ED24106566B for ; Wed, 17 Feb 2010 15:24:01 +0000 (UTC) (envelope-from batcilla@gmail.com) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.189]) by mx1.freebsd.org (Postfix) with ESMTP id 13E608FC0A for ; Wed, 17 Feb 2010 15:24:00 +0000 (UTC) Received: by gv-out-0910.google.com with SMTP id y18so24049gvf.39 for ; Wed, 17 Feb 2010 07:24:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=GPAq5G1bsIx0zt5Fm4+y/W7Muvg1sqISbEjWBta2t+k=; b=eC3SE5k8YNF+QlDRnuKQA2uzJ+t6mQ+y2PWNizi44MASz7kifFM1+rDs0c/DivohmF n/VSAI2zrAzUrb5ToXitJ9MMVB8N1AbrdVq2e2WzGXIlmsf1ncldKtWvqIk6A+ycqT+r ZqXpKwr/B2rOeTM4ofBhF0xMkwLGRWGxfH/qk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=SJeTJW4pr4Mul5KJDFztHQE7E1zw4eQwb+fctLu2mNR6I9f4h0J+xipZXdpxaCwrdv BPjrhFDR9tNkYdQsFF06qdsx/7Ciuz7Or0MaxW7RU2aRYCTTeSFAbww9rnYv/svozeJJ IxM/qDfQQMfoyhJKo9GlhijSqCcGeaMoQE694= MIME-Version: 1.0 Received: by 10.239.193.5 with SMTP id g5mr939212hbi.3.1266418496751; Wed, 17 Feb 2010 06:54:56 -0800 (PST) In-Reply-To: <201002171542.35757.hselasky@c2i.net> References: <4B7BFAA4.4040607@semihalf.com> <201002171542.35757.hselasky@c2i.net> Date: Wed, 17 Feb 2010 16:54:56 +0200 Message-ID: <6c36ec371002170654n5e441c6eib9a8c9aad61c1e87@mail.gmail.com> From: batcilla itself To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arm@freebsd.org Subject: Re: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 15:24:01 -0000 2010/2/17 Hans Petter Selasky > > On Wednesday 17 February 2010 15:18:12 Grzegorz Bernacki wrote: > > Hi, > > > > I've noticed that kdump on ARM doesn't work properly, it generates bus > > =A0error. The problem is that structures dumped into ktrace.out are not > > =A0aligned. Processing such a structure causes Aligment Fault. One solu= tion > > =A0is to copy structure into local variable and then process it, please= see > > =A0patch below. But I am not sure if this is the best solution and mayb= e > > =A0someone has a better idea. > > > > grzesiek > > > > > > diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c > > index 386221e..5a15886 100644 > > --- a/usr.bin/kdump/kdump.c > > +++ b/usr.bin/kdump/kdump.c > > @@ -1325,6 +1325,10 @@ ktrstat(struct stat *statp) > > =A0 void > > =A0 ktrstruct(char *buf, size_t buflen) > > =A0 { > > +#if defined(__arm__) > > + =A0 =A0 =A0 struct stat stat; > > + =A0 =A0 =A0 struct sockaddr sockaddr; > > +#endif > > =A0 =A0 =A0 =A0 =A0char *name, *data; > > =A0 =A0 =A0 =A0 =A0size_t namelen, datalen; > > =A0 =A0 =A0 =A0 =A0int i; > > @@ -1348,12 +1352,22 @@ ktrstruct(char *buf, size_t buflen) > > =A0 =A0 =A0 =A0 =A0if (strcmp(name, "stat") =3D=3D 0) { > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (datalen !=3D sizeof(struct stat)= ) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto invalid; > > +#if defined(__arm__) > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 memcpy(&stat, data, sizeof(struct stat)); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ktrstat(&stat); > > +#else > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ktrstat((struct stat *)data); > > +#endif > > =A0 =A0 =A0 =A0 =A0} else if (strcmp(name, "sockaddr") =3D=3D 0) { > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (datalen < sizeof(struct sockaddr= ) || > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0datalen !=3D ((struct sockad= dr *)(data))->sa_len) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto invalid; > > +#if defined(__arm__) > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 memcpy(&sockaddr, data, sizeof(struct soc= kaddr)); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ktrsockaddr(&sockaddr); > > +#else > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ktrsockaddr((struct sockaddr *)data)= ; > > +#endif > > =A0 =A0 =A0 =A0 =A0} else { > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0printf("unknown structure\n"); > > =A0 =A0 =A0 =A0 =A0} > > I think more than ARM is affected by this. > > --HPS ARM affected definitely, just today had that Align error with -current while tried to use ng_bridge with wlan0 //batcilla From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 15:26:06 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 263BB1065676; Wed, 17 Feb 2010 15:26:06 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id A6C058FC18; Wed, 17 Feb 2010 15:26:01 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1HFQ0Pw026396 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Feb 2010 16:26:00 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1HFPvxu096612 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Feb 2010 16:25:57 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1HFPvBK078706; Wed, 17 Feb 2010 16:25:57 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1HFPvGq078705; Wed, 17 Feb 2010 16:25:57 +0100 (CET) (envelope-from ticso) Date: Wed, 17 Feb 2010 16:25:57 +0100 From: Bernd Walter To: arm@freebsd.org, current@freebsd.org Message-ID: <20100217152557.GW43625@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: Bernd Walter Subject: lang/perl5.10 broken X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 15:26:06 -0000 Not sure if this is ARM related or not. `sh cflags "optimize='-O -pipe -mcpu=arm9'" opmini.o` -DPIC -fPIC -DPERL_EXTERNAL_GLOB opmini.c CCCMD = cc -DPERL_CORE -c -DAPPLLIB_EXP="/usr/local/lib/perl5/5.10.1/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -O -pipe -mcpu=arm9 -Wall -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat `sh cflags "optimize='-O -pipe -mcpu=arm9'" perlmini.o` -DPIC -fPIC -DPERL_IS_MINIPERL perlmini.c CCCMD = cc -DPERL_CORE -c -DAPPLLIB_EXP="/usr/local/lib/perl5/5.10.1/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -O -pipe -mcpu=arm9 -Wall -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat LD_LIBRARY_PATH=/usr/obj/usr/ports/lang/perl5.10/work/perl-5.10.1 cc -Wl,-E -fstack-protector -L/usr/local/lib -o miniperl gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o miniperlmain.o opmini.o perlmini.o -lm -lcrypt -lutil LD_LIBRARY_PATH=/usr/obj/usr/ports/lang/perl5.10/work/perl-5.10.1 ./miniperl -w -Ilib -MExporter -e '' || make minitest cp ext/re/re.pm lib/re.pm LD_LIBRARY_PATH=/usr/obj/usr/ports/lang/perl5.10/work/perl-5.10.1 ./miniperl -Ilib make_patchnum.pl *** Signal 11 Stop in /usr/obj/usr/ports/lang/perl5.10/work/perl-5.10.1. *** Error code 1 (ignored) You may see some irrelevant test failures if you have been unable to build lib/Config.pm, lib/lib.pm or the Unicode data files. cd t && (rm -f perl; /bin/ln -s ../miniperl perl) && LD_LIBRARY_PATH=/usr/obj/usr/ports/lang/perl5.10/work/perl-5.10.1 ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 15:29:10 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8E76106566B for ; Wed, 17 Feb 2010 15:29:10 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 174118FC08 for ; Wed, 17 Feb 2010 15:29:09 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1HFT8oJ026695 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Feb 2010 16:29:08 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1HFT0Wd096648 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Feb 2010 16:29:00 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1HFT09X078712; Wed, 17 Feb 2010 16:29:00 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1HFT0cj078711; Wed, 17 Feb 2010 16:29:00 +0100 (CET) (envelope-from ticso) Date: Wed, 17 Feb 2010 16:29:00 +0100 From: Bernd Walter To: Rui Paulo Message-ID: <20100217152900.GX43625@cicely7.cicely.de> References: <4B7BFAA4.4040607@semihalf.com> <20100217151607.GU43625@cicely7.cicely.de> <20100217151941.GV43625@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100217151941.GV43625@cicely7.cicely.de> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: freebsd-arm@freebsd.org Subject: Re: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 15:29:10 -0000 On Wed, Feb 17, 2010 at 04:19:41PM +0100, Bernd Walter wrote: > On Wed, Feb 17, 2010 at 04:16:07PM +0100, Bernd Walter wrote: > > On Wed, Feb 17, 2010 at 02:54:05PM +0000, Rui Paulo wrote: > > > On 17 Feb 2010, at 14:18, Grzegorz Bernacki wrote: > > > I wonder if this can't be made non arm conditional? > > Ups - I'd just recovered from Mr. Sandman's work. > So we all agree about. > Nevertheless it should be verified if this is just a faulty struct > definition. > On the other hand I think it is not because someone else wrote it is > a brokem on mips as well. I'm really still sleeping - noone mentioned mips at all. > > Either this struct is properly aligned or not. > > So why should this be made conditional? > > Non strict alignment architecturs also have problems with this, but > > it is usualy just speed penalties. > > There is one ARM sepcific struct missalignment problem. > > In this case we usually add __packed macro to structure definition. > > For most structures this usually means no change on other > > archtitectures and we only declare the struct to forcibly be what the > > programmer already expected. > > Only a few programmers are aware that they expect something from > > structures, which is not garantied. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 16:47:19 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20648106566B for ; Wed, 17 Feb 2010 16:47:19 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id B98F18FC13 for ; Wed, 17 Feb 2010 16:47:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1HGiVM0048257; Wed, 17 Feb 2010 09:44:31 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 17 Feb 2010 09:44:44 -0700 (MST) Message-Id: <20100217.094444.4959786828202967.imp@bsdimp.com> To: gjb@semihalf.com From: "M. Warner Losh" In-Reply-To: <4B7BFAA4.4040607@semihalf.com> References: <4B7BFAA4.4040607@semihalf.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org Subject: Re: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 16:47:19 -0000 In message: <4B7BFAA4.4040607@semihalf.com> Grzegorz Bernacki writes: : Hi, : : I've noticed that kdump on ARM doesn't work properly, it generates bus : error. The problem is that structures dumped into ktrace.out are not : aligned. Processing such a structure causes Aligment Fault. One : solution is to copy structure into local variable and then process it, : please see patch below. But I am not sure if this is the best solution : and maybe someone has a better idea. : : grzesiek : : : diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c : index 386221e..5a15886 100644 : --- a/usr.bin/kdump/kdump.c : +++ b/usr.bin/kdump/kdump.c : @@ -1325,6 +1325,10 @@ ktrstat(struct stat *statp) : void : ktrstruct(char *buf, size_t buflen) : { : +#if defined(__arm__) : + struct stat stat; : + struct sockaddr sockaddr; : +#endif Lose the ifdefs. Also, sockaddr is the wrong structure, it should be sockaddr_storage. : char *name, *data; : size_t namelen, datalen; : int i; : @@ -1348,12 +1352,22 @@ ktrstruct(char *buf, size_t buflen) : if (strcmp(name, "stat") == 0) { : if (datalen != sizeof(struct stat)) : goto invalid; : +#if defined(__arm__) : + memcpy(&stat, data, sizeof(struct stat)); : + ktrstat(&stat); : +#else : ktrstat((struct stat *)data); : +#endif This is needlessly complicated. Replace with: stat = *(struct stat *)data; ktrstat(&stat); : } else if (strcmp(name, "sockaddr") == 0) { : if (datalen < sizeof(struct sockaddr) || : datalen != ((struct sockaddr *)(data))->sa_len) : goto invalid; : +#if defined(__arm__) : + memcpy(&sockaddr, data, sizeof(struct sockaddr)); : + ktrsockaddr(&sockaddr); : +#else : ktrsockaddr((struct sockaddr *)data); : +#endif This is actually wrong. You're only copying part of the structure and it will be wrong for IPv6 addresses. Consider memcpy(&sockaddr, data, datalen); ktrsockaddr(&sockaddr); instead. However, this is already too late. We've already dereferenced through data in its unaligned state. Warner From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 16:58:32 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D26A8106566B for ; Wed, 17 Feb 2010 16:58:32 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 72A6D8FC14 for ; Wed, 17 Feb 2010 16:58:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1HGjjrS048311; Wed, 17 Feb 2010 09:45:45 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 17 Feb 2010 09:45:59 -0700 (MST) Message-Id: <20100217.094559.29593248078653355.imp@bsdimp.com> To: batcilla@gmail.com From: "M. Warner Losh" In-Reply-To: <6c36ec371002170654n5e441c6eib9a8c9aad61c1e87@mail.gmail.com> References: <4B7BFAA4.4040607@semihalf.com> <201002171542.35757.hselasky@c2i.net> <6c36ec371002170654n5e441c6eib9a8c9aad61c1e87@mail.gmail.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arm@FreeBSD.org Subject: Re: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 16:58:32 -0000 In message: <6c36ec371002170654n5e441c6eib9a8c9aad61c1e87@mail.gmail.co= m> batcilla itself writes: : 2010/2/17 Hans Petter Selasky : > : > On Wednesday 17 February 2010 15:18:12 Grzegorz Bernacki wrote: : > > Hi, : > > : > > I've noticed that kdump on ARM doesn't work properly, it generate= s bus : > > =A0error. The problem is that structures dumped into ktrace.out a= re not : > > =A0aligned. Processing such a structure causes Aligment Fault. On= e solution : > > =A0is to copy structure into local variable and then process it, = please see : > > =A0patch below. But I am not sure if this is the best solution an= d maybe : > > =A0someone has a better idea. : > > : > > grzesiek : > > : > > : > > diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c : > > index 386221e..5a15886 100644 : > > --- a/usr.bin/kdump/kdump.c : > > +++ b/usr.bin/kdump/kdump.c : > > @@ -1325,6 +1325,10 @@ ktrstat(struct stat *statp) : > > =A0 void : > > =A0 ktrstruct(char *buf, size_t buflen) : > > =A0 { : > > +#if defined(__arm__) : > > + =A0 =A0 =A0 struct stat stat; : > > + =A0 =A0 =A0 struct sockaddr sockaddr; : > > +#endif : > > =A0 =A0 =A0 =A0 =A0char *name, *data; : > > =A0 =A0 =A0 =A0 =A0size_t namelen, datalen; : > > =A0 =A0 =A0 =A0 =A0int i; : > > @@ -1348,12 +1352,22 @@ ktrstruct(char *buf, size_t buflen) : > > =A0 =A0 =A0 =A0 =A0if (strcmp(name, "stat") =3D=3D 0) { : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (datalen !=3D sizeof(struct= stat)) : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto invalid; : > > +#if defined(__arm__) : > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 memcpy(&stat, data, sizeof(struct s= tat)); : > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ktrstat(&stat); : > > +#else : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ktrstat((struct stat *)data); : > > +#endif : > > =A0 =A0 =A0 =A0 =A0} else if (strcmp(name, "sockaddr") =3D=3D 0) = { : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (datalen < sizeof(struct so= ckaddr) || : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0datalen !=3D ((struct = sockaddr *)(data))->sa_len) : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto invalid; : > > +#if defined(__arm__) : > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 memcpy(&sockaddr, data, sizeof(stru= ct sockaddr)); : > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ktrsockaddr(&sockaddr); : > > +#else : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ktrsockaddr((struct sockaddr *= )data); : > > +#endif : > > =A0 =A0 =A0 =A0 =A0} else { : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0printf("unknown structure\n");= : > > =A0 =A0 =A0 =A0 =A0} : > : > I think more than ARM is affected by this. : > : > --HPS : ARM affected definitely, just today had that Align error with -curren= t : while tried to use ng_bridge with wlan0 Where exactly was the error? Do you have a traceback? Warner From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 17:08:43 2010 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3305B106566B; Wed, 17 Feb 2010 17:08:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id CFB928FC08; Wed, 17 Feb 2010 17:08:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1HH0xDc048510; Wed, 17 Feb 2010 10:00:59 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 17 Feb 2010 10:01:13 -0700 (MST) Message-Id: <20100217.100113.506212773099063928.imp@bsdimp.com> To: ticso@cicely.de, ticso@cicely7.cicely.de From: "M. Warner Losh" In-Reply-To: <20100217152557.GW43625@cicely7.cicely.de> References: <20100217152557.GW43625@cicely7.cicely.de> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: arm@FreeBSD.org, current@FreeBSD.org Subject: Re: lang/perl5.10 broken X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 17:08:43 -0000 In message: <20100217152557.GW43625@cicely7.cicely.de> Bernd Walter writes: : Not sure if this is ARM related or not. ... : *** Signal 11 Silly question: do you have enough swap space enabled? Warner From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 17:08:45 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0C52106566C for ; Wed, 17 Feb 2010 17:08:44 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 90E148FC0A for ; Wed, 17 Feb 2010 17:08:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1HGxoiq048489; Wed, 17 Feb 2010 09:59:50 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 17 Feb 2010 10:00:04 -0700 (MST) Message-Id: <20100217.100004.321689434032786752.imp@bsdimp.com> To: ticso@cicely.de, ticso@cicely7.cicely.de From: "M. Warner Losh" In-Reply-To: <20100217152900.GX43625@cicely7.cicely.de> References: <20100217151607.GU43625@cicely7.cicely.de> <20100217151941.GV43625@cicely7.cicely.de> <20100217152900.GX43625@cicely7.cicely.de> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: rpaulo@gmail.com, freebsd-arm@FreeBSD.org Subject: Re: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 17:08:45 -0000 In message: <20100217152900.GX43625@cicely7.cicely.de> Bernd Walter writes: : On Wed, Feb 17, 2010 at 04:19:41PM +0100, Bernd Walter wrote: : > On Wed, Feb 17, 2010 at 04:16:07PM +0100, Bernd Walter wrote: : > > On Wed, Feb 17, 2010 at 02:54:05PM +0000, Rui Paulo wrote: : > > > On 17 Feb 2010, at 14:18, Grzegorz Bernacki wrote: : > > > I wonder if this can't be made non arm conditional? : > : > Ups - I'd just recovered from Mr. Sandman's work. : > So we all agree about. : > Nevertheless it should be verified if this is just a faulty struct : > definition. : > On the other hand I think it is not because someone else wrote it is : > a brokem on mips as well. : : I'm really still sleeping - noone mentioned mips at all. : > > Either this struct is properly aligned or not. : > > So why should this be made conditional? : > > Non strict alignment architecturs also have problems with this, but : > > it is usualy just speed penalties. : > > There is one ARM sepcific struct missalignment problem. : > > In this case we usually add __packed macro to structure definition. : > > For most structures this usually means no change on other : > > archtitectures and we only declare the struct to forcibly be what the : > > programmer already expected. : > > Only a few programmers are aware that they expect something from : > > structures, which is not garantied. This code is clearly nutso when it comes to alignment. I've come up with a slightly better patch. I'd though about doing the structure assignment that I suggested in a prior note, but the compiler is free to assume alignment when copying the structures, which may end badly. There's no way we can add __packed or __aligned easily to this code (although the ktrstat and ktrsockaddr routines should be able to have that annotation, a quick test suggests that the annotations I tried didn't take right). I don't have a good ARM setup at the moment to actually test these changes. Can others test them? They seem to work for me on x86, but that isn't saying much. Warner Index: kdump.c =================================================================== --- kdump.c (revision 203976) +++ kdump.c (working copy) @@ -1328,6 +1328,8 @@ char *name, *data; size_t namelen, datalen; int i; + struct stat sb; + struct sockaddr_storage ss; for (name = buf, namelen = 0; namelen < buflen && name[namelen] != '\0'; @@ -1348,12 +1350,16 @@ if (strcmp(name, "stat") == 0) { if (datalen != sizeof(struct stat)) goto invalid; - ktrstat((struct stat *)data); + memcpy(&sb, data, datalen); + ktrstat(&sb); } else if (strcmp(name, "sockaddr") == 0) { + if (datalen > sizeof(ss)) + goto invalid; + memcpy(&ss, data, datalen); if (datalen < sizeof(struct sockaddr) || - datalen != ((struct sockaddr *)(data))->sa_len) + datalen != ss.ss_len) goto invalid; - ktrsockaddr((struct sockaddr *)data); + ktrsockaddr((struct sockaddr *)&ss); } else { printf("unknown structure\n"); } From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 17:17:48 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BEC01065670 for ; Wed, 17 Feb 2010 17:17:48 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id 12F4C8FC0A for ; Wed, 17 Feb 2010 17:17:47 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id 7E0E7C427D; Wed, 17 Feb 2010 18:19:40 +0100 (CET) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id J0QnKgIFfBDD; Wed, 17 Feb 2010 18:19:39 +0100 (CET) Received: from [10.0.0.34] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPSA id B3AA0C41E7; Wed, 17 Feb 2010 18:19:39 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Rafal Jaworowski In-Reply-To: <20100217.100004.321689434032786752.imp@bsdimp.com> Date: Wed, 17 Feb 2010 18:17:45 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20100217151607.GU43625@cicely7.cicely.de> <20100217151941.GV43625@cicely7.cicely.de> <20100217152900.GX43625@cicely7.cicely.de> <20100217.100004.321689434032786752.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1077) Cc: rpaulo@gmail.com, freebsd-arm@FreeBSD.org, ticso@cicely7.cicely.de, ticso@cicely.de Subject: Re: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 17:17:48 -0000 On 2010-02-17, at 18:00, M. Warner Losh wrote: > In message: <20100217152900.GX43625@cicely7.cicely.de> > Bernd Walter writes: > : On Wed, Feb 17, 2010 at 04:19:41PM +0100, Bernd Walter wrote: > : > On Wed, Feb 17, 2010 at 04:16:07PM +0100, Bernd Walter wrote: > : > > On Wed, Feb 17, 2010 at 02:54:05PM +0000, Rui Paulo wrote: > : > > > On 17 Feb 2010, at 14:18, Grzegorz Bernacki wrote: > : > > > I wonder if this can't be made non arm conditional? > : >=20 > : > Ups - I'd just recovered from Mr. Sandman's work. > : > So we all agree about. > : > Nevertheless it should be verified if this is just a faulty struct > : > definition. > : > On the other hand I think it is not because someone else wrote it = is > : > a brokem on mips as well. > :=20 > : I'm really still sleeping - noone mentioned mips at all. > : > > Either this struct is properly aligned or not. > : > > So why should this be made conditional? > : > > Non strict alignment architecturs also have problems with this, = but > : > > it is usualy just speed penalties. > : > > There is one ARM sepcific struct missalignment problem. > : > > In this case we usually add __packed macro to structure = definition. > : > > For most structures this usually means no change on other > : > > archtitectures and we only declare the struct to forcibly be = what the > : > > programmer already expected. > : > > Only a few programmers are aware that they expect something from > : > > structures, which is not garantied. >=20 > This code is clearly nutso when it comes to alignment. I've come up > with a slightly better patch. I'd though about doing the structure > assignment that I suggested in a prior note, but the compiler is free > to assume alignment when copying the structures, which may end badly. > There's no way we can add __packed or __aligned easily to this code > (although the ktrstat and ktrsockaddr routines should be able to have > that annotation, a quick test suggests that the annotations I tried > didn't take right). >=20 > I don't have a good ARM setup at the moment to actually test these > changes. Can others test them? They seem to work for me on x86, but > that isn't saying much. Thanks, this looks better. We'll test this in our set-up and verify, but = only tomorrow I guess... Rafal From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 17:39:47 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 4BAAA106566B; Wed, 17 Feb 2010 17:39:46 +0000 (UTC) (envelope-from nork@FreeBSD.org) Date: Thu, 18 Feb 2010 02:39:45 +0900 From: Norikatsu Shigemura To: mav@FreeBSD.org, freebsd-arm@FreeBSD.org Message-Id: <20100218023945.848cd01a.nork@FreeBSD.org> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.5; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, Norikatsu Shigemura Subject: ATA_CAM-ed mvsata(4) on OpenRD-client X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 17:39:47 -0000 Hi mav! I got a OpenRD-client (Marvell 88F6281 SoC), and I'm tring to make mvsata(4) ATA_CAM, like following: based on sys/arm/conf/DB-88F6XXX - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # SATA #device ata #device atadisk device atacore device atamvsata options ATA_CAM - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - But I got following panic, my I help you? In this time, I attached no devices to SATA/eSATA port. - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sata0: at mem 0xf1080000-0xf1085fff irq 21 on mbus0 sata0: [MPSAFE] sata0: [ITHREAD] ata0: on sata0 ata0: [MPSAFE] ata0: [ITHREAD] ata1: on sata0 ata1: [MPSAFE] ata1: [ITHREAD] spin lock 0xc3766680 (fvH) held by 0xc3613b48 (tid -1061308344) too long panic: spin lock held too long KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped at 0xc09dcb50 = kdb_enter+0x48: ldrb r15, [r15, r15, ror r15]! db> - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - So I tried to get following information: - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - db> show locks exclusive sleep mutex Giant (Giant) r = 0 (0xc0be3ad4) locked @ /usr/src/sys/kern/kern_module.c:117 db> show alllocks Process 0 (kernel) thread 0xc0be1fa0 (100000) exclusive sleep mutex Giant (Giant) r = 0 (0xc0be3ad4) locked @ /usr/src/sys/kern/kern_module.c:117 db> show lockedvnods Locked vnodes db> show pcpu cpuid = 0 dynamic pcpu = 0x17fc00 curthread = 0xc0be1fa0: pid 0 "swapper" curpcb = 0xc0d62ef8 fpcurthread = none idlethread = 0xc357bd80: pid 10 "idle" spin locks held: db> bt Tracing pid 0 tid 100000 td 0xc0be1fa0 kdb_enter() at 0xc09dcb18 = kdb_enter+0x10 scp=0xc09dcb18 rlv=0xc09b2cf0 (0xc09b2cf0 = panic+0xcc) rsp=0xc0d62c1c rfp=0xc0d62c30 r4=0x00000100 panic() at 0xc09b2c38 = panic+0x14 scp=0xc09b2c38 rlv=0xc09a6fb8 (0xc09a6fb8 = _thread_lock_flags+0x170) rsp=0xc0d62c44 rfp=0xc0d62c8c _thread_lock_flags() at 0xc09a6e58 = _thread_lock_flags+0x10 scp=0xc09a6e58 rlv=0xc09e9e98 (0xc09e9e98 = turnstile_claim+0x174) rsp=0xc0d62c90 rfp=0xc0d62cac r10=0xc3556000 r9=0x00000000 r8=0xc3556000 r7=0x00000044 r6=0xc3556000 r5=0xc3766680 r4=0xc0b644c0 turnstile_claim() at 0xc09e9e40 = turnstile_claim+0x11c scp=0xc09e9e40 rlv=0xc09ea17c (0xc09ea17c = turnstile_wait+0x208) rsp=0xc0d62cb0 rfp=0xc0d62cdc r7=0xc0be1fa0 r6=0xc0be8e40 r5=0xc0b644c0 r4=0x00000000 turnstile_wait() at 0xc09e9f84 = turnstile_wait+0x10 scp=0xc09e9f84 rlv=0xc09a6b30 (0xc09a6b30 = _mtx_lock_sleep+0x11c) rsp=0xc0d62ce0 rfp=0xc0d62d10 r10=0xc0b47100 r9=0x00000000 r8=0x00000000 r7=0x00000000 r6=0xc0be1fa0 r5=0xc3556000 r4=0xc35dd974 _mtx_lock_sleep() at 0xc09a6a24 = _mtx_lock_sleep+0x10 scp=0xc09a6a24 rlv=0xc09a6c0c (0xc09a6c0c = _mtx_lock_flags+0x7c) rsp=0xc0d62d14 rfp=0xc0d62d3c r10=0xc0d62d70 r9=0xc09039a8 r8=0x00000000 r7=0x00000851 r6=0xc0b47100 r5=0x00000000 r4=0xc35dd974 _mtx_lock_flags() at 0xc09a6ba0 = _mtx_lock_flags+0x10 scp=0xc09a6ba0 rlv=0xc0903fac (0xc0903fac = xpt_sim_opened+0x17c) rsp=0xc0d62d40 rfp=0xc0d62d68 r8=0xc0bde8f0 r7=0xc090d4a4 r6=0xc3765e00 r5=0xc0b47100 r4=0xc3766240 xpt_sim_opened() at 0xc0903f3c = xpt_sim_opened+0x10c scp=0xc0903f3c rlv=0xc0904068 (0xc0904068 = xpt_sim_opened+0x238) rsp=0xc0d62d6c rfp=0xc0d62d88 r10=0xc0bde904 r9=0xc0b47100 r8=0x00000000 r7=0xc090d4a4 r6=0x00000080 r5=0x00000000 r4=0x00000001 xpt_sim_opened() at 0xc0904048 = xpt_sim_opened+0x218 scp=0xc0904048 rlv=0xc0905940 (0xc0905940 = xpt_register_async+0xd0) rsp=0xc0d62d8c rfp=0xc0d62e34 xpt_register_async() at 0xc0905880 = xpt_register_async+0x10 scp=0xc0905880 rlv=0xc090d484 (0xc090d484 = ata_get_xport+0x2198) rsp=0xc0d62e38 rfp=0xc0d62e44 r10=0x00000000 r9=0x00000000 r8=0x005fffcc r7=0xc35593c0 r6=0xc0b62170 r5=0xc0be74d0 r4=0x0000001c ata_get_xport() at 0xc090d474 = ata_get_xport+0x2188 scp=0xc090d474 rlv=0xc0900868 (0xc0900868 = periphdriver_init+0x60) rsp=0xc0d62e48 rfp=0xc0d62e58 periphdriver_init() at 0xc0900818 = periphdriver_init+0x10 scp=0xc0900818 rlv=0xc0904584 (0xc0904584 = xpt_alloc_ccb+0x6c) rsp=0xc0d62e5c rfp=0xc0d62e74 r4=0x00000000 xpt_alloc_ccb() at 0xc0904554 = xpt_alloc_ccb+0x3c scp=0xc0904554 rlv=0xc09d2d9c (0xc09d2d9c = vaccess_acl_posix1e+0x628) rsp=0xc0d62e78 rfp=0xc0d62ee0 r4=0x00000000 vaccess_acl_posix1e() at 0xc09d2d44 = vaccess_acl_posix1e+0x5d0 scp=0xc09d2d44 rlv=0xc097b0ec (0xc097b0ec = mi_startup+0xdc) rsp=0xc0d62ee4 rfp=0xc0d62ef4 r7=0x00900040 r6=0x00000002 r5=0x0090004c r4=0xc0b7e88c mi_startup() at 0xc097b020 = mi_startup+0x10 scp=0xc097b020 rlv=0xc09000e4 (0xc09000e4 = btext+0xe4) rsp=0xc0d62ef8 rfp=0x00000000 r4=0x00900124 db> ps pid ppid pgrp uid state wmesg wchan cmd 13 0 0 0 RL (threaded) [usb] 100021 RunQ [usbus0] 100020 RunQ [usbus0] 100019 RunQ [usbus0] 100018 RunQ [usbus0] 12 0 0 0 RL [yarrow] 4 0 0 0 RL [g_down] 3 0 0 0 RL [g_up] 2 0 0 0 RL [g_event] 11 0 0 0 WL (threaded) [intr] 100026 I [intr21: sata0] 100025 I [intr17: mge1] 100024 I [intr16: mge1] 100023 I [intr13: mge0] 100022 I [intr12: mge0] 100017 I [intr19: ehci0] 100016 I [swi0: uart uart] 100015 I [swi6: Giant taskq] 100013 I [swi5: +] 100011 I [swi2: cambio] 100010 I [swi6: task queue] 100005 I [swi1: netisr 0] 100004 I [swi4: clock] 100003 I [swi3: vm] 10 0 0 0 RL [idle] 1 0 0 0 ?L [kernel] 0 0 0 0 RLs (threaded) [kernel] 100014 RunQ [thread taskq] 100012 RunQ [kqueue taskq] 100000 L *fvH 0xc3556000 [swapper] db> alltrace Tracing command usb pid 13 tid 100021 td 0xc35ff480 Tracing command usb pid 13 tid 100020 td 0xc35ff6c0 Tracing command usb pid 13 tid 100019 td 0xc35ff900 Tracing command usb pid 13 tid 100018 td 0xc35ffb40 Tracing command yarrow pid 12 tid 100009 td 0xc35c2480 Tracing command g_down pid 4 tid 100008 td 0xc357b000 Tracing command g_up pid 3 tid 100007 td 0xc357b240 Tracing command g_event pid 2 tid 100006 td 0xc357b480 Tracing command intr pid 11 tid 100026 td 0xc35c2900 Tracing command intr pid 11 tid 100025 td 0xc35c2b40 Tracing command intr pid 11 tid 100024 td 0xc35c2d80 Tracing command intr pid 11 tid 100023 td 0xc35ff000 Tracing command intr pid 11 tid 100022 td 0xc35ff240 Tracing command intr pid 11 tid 100017 td 0xc357c240 Tracing command intr pid 11 tid 100016 td 0xc357c480 Tracing command intr pid 11 tid 100015 td 0xc357c6c0 Tracing command intr pid 11 tid 100013 td 0xc357cb40 Tracing command intr pid 11 tid 100011 td 0xc35c2000 Tracing command intr pid 11 tid 100010 td 0xc35c2240 Tracing command intr pid 11 tid 100005 td 0xc357b6c0 Tracing command intr pid 11 tid 100004 td 0xc357b900 Tracing command intr pid 11 tid 100003 td 0xc357bb40 Tracing command idle pid 10 tid 100002 td 0xc357bd80 Tracing command kernel pid 1 tid 100001 td 0xc357c000 Tracing command kernel pid 0 tid 100014 td 0xc357c900 Tracing command kernel pid 0 tid 100012 td 0xc357cd80 Tracing command kernel pid 0 tid 100000 td 0xc0be1fa0 kdb_enter() at 0xc09dcb18 = kdb_enter+0x10 scp=0xc09dcb18 rlv=0xc09b2cf0 (0xc09b2cf0 = panic+0xcc) rsp=0xc0d62c1c rfp=0xc0d62c30 r4=0x00000100 panic() at 0xc09b2c38 = panic+0x14 scp=0xc09b2c38 rlv=0xc09a6fb8 (0xc09a6fb8 = _thread_lock_flags+0x170) rsp=0xc0d62c44 rfp=0xc0d62c8c _thread_lock_flags() at 0xc09a6e58 = _thread_lock_flags+0x10 scp=0xc09a6e58 rlv=0xc09e9e98 (0xc09e9e98 = turnstile_claim+0x174) rsp=0xc0d62c90 rfp=0xc0d62cac r10=0xc3556000 r9=0x00000000 r8=0xc3556000 r7=0x00000044 r6=0xc3556000 r5=0xc3766680 r4=0xc0b644c0 turnstile_claim() at 0xc09e9e40 = turnstile_claim+0x11c scp=0xc09e9e40 rlv=0xc09ea17c (0xc09ea17c = turnstile_wait+0x208) rsp=0xc0d62cb0 rfp=0xc0d62cdc r7=0xc0be1fa0 r6=0xc0be8e40 r5=0xc0b644c0 r4=0x00000000 turnstile_wait() at 0xc09e9f84 = turnstile_wait+0x10 scp=0xc09e9f84 rlv=0xc09a6b30 (0xc09a6b30 = _mtx_lock_sleep+0x11c) rsp=0xc0d62ce0 rfp=0xc0d62d10 r10=0xc0b47100 r9=0x00000000 r8=0x00000000 r7=0x00000000 r6=0xc0be1fa0 r5=0xc3556000 r4=0xc35dd974 _mtx_lock_sleep() at 0xc09a6a24 = _mtx_lock_sleep+0x10 scp=0xc09a6a24 rlv=0xc09a6c0c (0xc09a6c0c = _mtx_lock_flags+0x7c) rsp=0xc0d62d14 rfp=0xc0d62d3c r10=0xc0d62d70 r9=0xc09039a8 r8=0x00000000 r7=0x00000851 r6=0xc0b47100 r5=0x00000000 r4=0xc35dd974 _mtx_lock_flags() at 0xc09a6ba0 = _mtx_lock_flags+0x10 scp=0xc09a6ba0 rlv=0xc0903fac (0xc0903fac = xpt_sim_opened+0x17c) rsp=0xc0d62d40 rfp=0xc0d62d68 r8=0xc0bde8f0 r7=0xc090d4a4 r6=0xc3765e00 r5=0xc0b47100 r4=0xc3766240 xpt_sim_opened() at 0xc0903f3c = xpt_sim_opened+0x10c scp=0xc0903f3c rlv=0xc0904068 (0xc0904068 = xpt_sim_opened+0x238) rsp=0xc0d62d6c rfp=0xc0d62d88 r10=0xc0bde904 r9=0xc0b47100 r8=0x00000000 r7=0xc090d4a4 r6=0x00000080 r5=0x00000000 r4=0x00000001 xpt_sim_opened() at 0xc0904048 = xpt_sim_opened+0x218 scp=0xc0904048 rlv=0xc0905940 (0xc0905940 = xpt_register_async+0xd0) rsp=0xc0d62d8c rfp=0xc0d62e34 xpt_register_async() at 0xc0905880 = xpt_register_async+0x10 scp=0xc0905880 rlv=0xc090d484 (0xc090d484 = ata_get_xport+0x2198) rsp=0xc0d62e38 rfp=0xc0d62e44 r10=0x00000000 r9=0x00000000 r8=0x005fffcc r7=0xc35593c0 r6=0xc0b62170 r5=0xc0be74d0 r4=0x0000001c ata_get_xport() at 0xc090d474 = ata_get_xport+0x2188 scp=0xc090d474 rlv=0xc0900868 (0xc0900868 = periphdriver_init+0x60) rsp=0xc0d62e48 rfp=0xc0d62e58 periphdriver_init() at 0xc0900818 = periphdriver_init+0x10 scp=0xc0900818 rlv=0xc0904584 (0xc0904584 = xpt_alloc_ccb+0x6c) rsp=0xc0d62e5c rfp=0xc0d62e74 r4=0x00000000 xpt_alloc_ccb() at 0xc0904554 = xpt_alloc_ccb+0x3c scp=0xc0904554 rlv=0xc09d2d9c (0xc09d2d9c = vaccess_acl_posix1e+0x628) rsp=0xc0d62e78 rfp=0xc0d62ee0 r4=0x00000000 vaccess_acl_posix1e() at 0xc09d2d44 = vaccess_acl_posix1e+0x5d0 scp=0xc09d2d44 rlv=0xc097b0ec (0xc097b0ec = mi_startup+0xdc) rsp=0xc0d62ee4 rfp=0xc0d62ef4 r7=0x00900040 r6=0x00000002 r5=0x0090004c r4=0xc0b7e88c mi_startup() at 0xc097b020 = mi_startup+0x10 scp=0xc097b020 rlv=0xc09000e4 (0xc09000e4 = btext+0xe4) rsp=0xc0d62ef8 rfp=0x00000000 r4=0x00900124 db> show lock 0xc0be3ad4 class: sleep mutex name: Giant flags: {DEF, RECURSE} state: {OWNED} owner: 0xc0be1fa0 (tid 100000, pid 0, "swapper") db > - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - What you want to know? Plase teach me, I'll dump what you want. From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 17:49:26 2010 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F5401065679; Wed, 17 Feb 2010 17:49:26 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id DB1218FC19; Wed, 17 Feb 2010 17:49:25 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1HHnKd2040422 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Feb 2010 18:49:21 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1HHnISk002021 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Feb 2010 18:49:18 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1HHnImk079285; Wed, 17 Feb 2010 18:49:18 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1HHnHtC079284; Wed, 17 Feb 2010 18:49:17 +0100 (CET) (envelope-from ticso) Date: Wed, 17 Feb 2010 18:49:17 +0100 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20100217174917.GY43625@cicely7.cicely.de> References: <20100217152557.GW43625@cicely7.cicely.de> <20100217.100113.506212773099063928.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100217.100113.506212773099063928.imp@bsdimp.com> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: arm@FreeBSD.org, ticso@cicely7.cicely.de, ticso@cicely.de, current@FreeBSD.org Subject: Re: lang/perl5.10 broken X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 17:49:26 -0000 On Wed, Feb 17, 2010 at 10:01:13AM -0700, M. Warner Losh wrote: > In message: <20100217152557.GW43625@cicely7.cicely.de> > Bernd Walter writes: > : Not sure if this is ARM related or not. > > ... > : *** Signal 11 > > Silly question: do you have enough swap space enabled? First try was with 128M on internal SD of which usually just about 10M is used during compiler runs and the second was with 1G on external USB SD reader, but just because of speed with internal. I also saw no kernel message that the system was out of space. I'm currently trying to compile perl5.8, but it takes some time. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 18:47:52 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E211010656D1 for ; Wed, 17 Feb 2010 18:47:52 +0000 (UTC) (envelope-from batcilla@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id 993258FC13 for ; Wed, 17 Feb 2010 18:47:52 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 8so1099924qwh.7 for ; Wed, 17 Feb 2010 10:47:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Qyrvmymf/he2n4fPzbrIhtFAiUz9EFekPeiWgXnFrFk=; b=OBVxX9sTubdWYB8j0Pkgx3Pjh4apTOl2pt9Oe9YZBf8E939tGUXMG0ffe9WG+zH4HU pfpikSTUCshtK5zIwg+ZWnLXMMH8fZ4DDzLi3DclIAFH5PYsDALLZmlYOkNMXwrE6oID PXMRbwJMgBCspIspv9dHWN4v740K0GkPqA0uk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=fWfAHBPqlkjuHA0KjyK3f6Hs8FTH66Z/Bj91c9KyCljogtHwLOZ4Y/s4bSW9CuRvWt dupGoTgZg0kpggv+EBWH+qiXIRp3nSbc63Ia0MV0pt7vrbLU9Sshyo62+W2a66VArMVO +tCN9I5T0L4HrW2U77+QKSOXi7bw/3w8VD3wY= MIME-Version: 1.0 Received: by 10.239.159.146 with SMTP id y18mr882410hbc.196.1266432470803; Wed, 17 Feb 2010 10:47:50 -0800 (PST) In-Reply-To: <20100217.094559.29593248078653355.imp@bsdimp.com> References: <4B7BFAA4.4040607@semihalf.com> <201002171542.35757.hselasky@c2i.net> <6c36ec371002170654n5e441c6eib9a8c9aad61c1e87@mail.gmail.com> <20100217.094559.29593248078653355.imp@bsdimp.com> Date: Wed, 17 Feb 2010 20:47:50 +0200 Message-ID: <6c36ec371002171047m13544419sf8ca5ad283cdc65@mail.gmail.com> From: batcilla itself To: "M. Warner Losh" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arm@freebsd.org Subject: Re: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 18:47:53 -0000 2010/2/17 M. Warner Losh : > In message: <6c36ec371002170654n5e441c6eib9a8c9aad61c1e87@mail.gmail.com> > =A0 =A0 =A0 =A0 =A0 =A0batcilla itself writes: > : 2010/2/17 Hans Petter Selasky > : > > : > On Wednesday 17 February 2010 15:18:12 Grzegorz Bernacki wrote: > : > > Hi, > : > > > : > > I've noticed that kdump on ARM doesn't work properly, it generates = bus > : > > =A0error. The problem is that structures dumped into ktrace.out are= not > : > > =A0aligned. Processing such a structure causes Aligment Fault. One = solution > : > > =A0is to copy structure into local variable and then process it, pl= ease see > : > > =A0patch below. But I am not sure if this is the best solution and = maybe > : > > =A0someone has a better idea. > : > > > : > > grzesiek > : > > > : > > > : > > diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c > : > > index 386221e..5a15886 100644 > : > > --- a/usr.bin/kdump/kdump.c > : > > +++ b/usr.bin/kdump/kdump.c > : > > @@ -1325,6 +1325,10 @@ ktrstat(struct stat *statp) > : > > =A0 void > : > > =A0 ktrstruct(char *buf, size_t buflen) > : > > =A0 { > : > > +#if defined(__arm__) > : > > + =A0 =A0 =A0 struct stat stat; > : > > + =A0 =A0 =A0 struct sockaddr sockaddr; > : > > +#endif > : > > =A0 =A0 =A0 =A0 =A0char *name, *data; > : > > =A0 =A0 =A0 =A0 =A0size_t namelen, datalen; > : > > =A0 =A0 =A0 =A0 =A0int i; > : > > @@ -1348,12 +1352,22 @@ ktrstruct(char *buf, size_t buflen) > : > > =A0 =A0 =A0 =A0 =A0if (strcmp(name, "stat") =3D=3D 0) { > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (datalen !=3D sizeof(struct s= tat)) > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto invalid; > : > > +#if defined(__arm__) > : > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 memcpy(&stat, data, sizeof(struct sta= t)); > : > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ktrstat(&stat); > : > > +#else > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ktrstat((struct stat *)data); > : > > +#endif > : > > =A0 =A0 =A0 =A0 =A0} else if (strcmp(name, "sockaddr") =3D=3D 0) { > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (datalen < sizeof(struct sock= addr) || > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0datalen !=3D ((struct so= ckaddr *)(data))->sa_len) > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto invalid; > : > > +#if defined(__arm__) > : > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 memcpy(&sockaddr, data, sizeof(struct= sockaddr)); > : > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ktrsockaddr(&sockaddr); > : > > +#else > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ktrsockaddr((struct sockaddr *)d= ata); > : > > +#endif > : > > =A0 =A0 =A0 =A0 =A0} else { > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0printf("unknown structure\n"); > : > > =A0 =A0 =A0 =A0 =A0} > : > > : > I think more than ARM is affected by this. > : > > : > --HPS > : ARM affected definitely, just today had that Align error with -current > : while tried to use ng_bridge with wlan0 > > Where exactly was the error? =A0Do you have a traceback? It was ARM/Xcale avila custom nanobsd build, error was caused adding wlan0 into ng_bridge, while wlan0 was in tdma master (slot 0) mode, with slot 1 there was no errors. Exact message here: Fatal kernel mode data abort: 'Alignment Fault 3' trapframe: 0xc5e38cac FSR=3D00000003, FAR=3Dc10fd1fe, spsr=3D00000013 r0 =3Dc0e15080, r1 =3Dc0508288, r2 =3Dc10fd1fe, r3 =3D00000001 r4 =3D0000003c, r5 =3Dc0e15080, r6 =3Dc0e15500, r7 =3Dc111a600 r8 =3Dc1182a00, r9 =3Dc116dc00, r10=3Dc0e15d80, r11=3D00000001 r12=3Dc0e15080, ssp=3Dc5e38cf8, slr=3Dc041cb58, pc =3Dc041ec98 panic: Fatal abort Uptime: 3h26m17s Cannot dump. Device not defined or unavailable. Automatic reboot in 15 seconds - press a key on the console to abort uname: avila ... FreeBSD 9.0-CURRENT #1: Wed Feb 17 12:08:37 UTC 2010 ... a= rm Not really sure, if this alignment error come from kdump, there is really no dump device in this unit and other debugging facilities was turned off to save space. //batcilla > > Warner > From owner-freebsd-arm@FreeBSD.ORG Wed Feb 17 19:34:58 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 908D710656A5 for ; Wed, 17 Feb 2010 19:34:58 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3F4EF8FC25 for ; Wed, 17 Feb 2010 19:34:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1HJFU9k050258; Wed, 17 Feb 2010 12:15:30 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 17 Feb 2010 12:15:45 -0700 (MST) Message-Id: <20100217.121545.260300876949842220.imp@bsdimp.com> To: batcilla@gmail.com From: "M. Warner Losh" In-Reply-To: <6c36ec371002171047m13544419sf8ca5ad283cdc65@mail.gmail.com> References: <6c36ec371002170654n5e441c6eib9a8c9aad61c1e87@mail.gmail.com> <20100217.094559.29593248078653355.imp@bsdimp.com> <6c36ec371002171047m13544419sf8ca5ad283cdc65@mail.gmail.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arm@freebsd.org Subject: Re: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 19:34:58 -0000 In message: <6c36ec371002171047m13544419sf8ca5ad283cdc65@mail.gmail.com= > batcilla itself writes: : 2010/2/17 M. Warner Losh : : > In message: <6c36ec371002170654n5e441c6eib9a8c9aad61c1e87@mail.gmai= l.com> : > =A0 =A0 =A0 =A0 =A0 =A0batcilla itself writes:= : > : 2010/2/17 Hans Petter Selasky : > : > : > : > On Wednesday 17 February 2010 15:18:12 Grzegorz Bernacki wrote:= : > : > > Hi, : > : > > : > : > > I've noticed that kdump on ARM doesn't work properly, it gene= rates bus : > : > > =A0error. The problem is that structures dumped into ktrace.o= ut are not : > : > > =A0aligned. Processing such a structure causes Aligment Fault= . One solution : > : > > =A0is to copy structure into local variable and then process = it, please see : > : > > =A0patch below. But I am not sure if this is the best solutio= n and maybe : > : > > =A0someone has a better idea. : > : > > : > : > > grzesiek : > : > > : > : > > : > : > > diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c : > : > > index 386221e..5a15886 100644 : > : > > --- a/usr.bin/kdump/kdump.c : > : > > +++ b/usr.bin/kdump/kdump.c : > : > > @@ -1325,6 +1325,10 @@ ktrstat(struct stat *statp) : > : > > =A0 void : > : > > =A0 ktrstruct(char *buf, size_t buflen) : > : > > =A0 { : > : > > +#if defined(__arm__) : > : > > + =A0 =A0 =A0 struct stat stat; : > : > > + =A0 =A0 =A0 struct sockaddr sockaddr; : > : > > +#endif : > : > > =A0 =A0 =A0 =A0 =A0char *name, *data; : > : > > =A0 =A0 =A0 =A0 =A0size_t namelen, datalen; : > : > > =A0 =A0 =A0 =A0 =A0int i; : > : > > @@ -1348,12 +1352,22 @@ ktrstruct(char *buf, size_t buflen) : > : > > =A0 =A0 =A0 =A0 =A0if (strcmp(name, "stat") =3D=3D 0) { : > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (datalen !=3D sizeof(st= ruct stat)) : > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto inval= id; : > : > > +#if defined(__arm__) : > : > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 memcpy(&stat, data, sizeof(stru= ct stat)); : > : > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ktrstat(&stat); : > : > > +#else : > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ktrstat((struct stat *)dat= a); : > : > > +#endif : > : > > =A0 =A0 =A0 =A0 =A0} else if (strcmp(name, "sockaddr") =3D=3D= 0) { : > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (datalen < sizeof(struc= t sockaddr) || : > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0datalen !=3D ((str= uct sockaddr *)(data))->sa_len) : > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto inval= id; : > : > > +#if defined(__arm__) : > : > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 memcpy(&sockaddr, data, sizeof(= struct sockaddr)); : > : > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ktrsockaddr(&sockaddr); : > : > > +#else : > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ktrsockaddr((struct sockad= dr *)data); : > : > > +#endif : > : > > =A0 =A0 =A0 =A0 =A0} else { : > : > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0printf("unknown structure\= n"); : > : > > =A0 =A0 =A0 =A0 =A0} : > : > : > : > I think more than ARM is affected by this. : > : > : > : > --HPS : > : ARM affected definitely, just today had that Align error with -cu= rrent : > : while tried to use ng_bridge with wlan0 : > : > Where exactly was the error? =A0Do you have a traceback? : It was ARM/Xcale avila custom nanobsd build, error was caused adding : wlan0 into ng_bridge, while wlan0 was in tdma master (slot 0) mode, : with slot 1 there was no errors. Exact message here: : = : Fatal kernel mode data abort: 'Alignment Fault 3' : trapframe: 0xc5e38cac : FSR=3D00000003, FAR=3Dc10fd1fe, spsr=3D00000013 : r0 =3Dc0e15080, r1 =3Dc0508288, r2 =3Dc10fd1fe, r3 =3D00000001 : r4 =3D0000003c, r5 =3Dc0e15080, r6 =3Dc0e15500, r7 =3Dc111a600 : r8 =3Dc1182a00, r9 =3Dc116dc00, r10=3Dc0e15d80, r11=3D00000001 : r12=3Dc0e15080, ssp=3Dc5e38cf8, slr=3Dc041cb58, pc =3Dc041ec98 : = : panic: Fatal abort : Uptime: 3h26m17s : Cannot dump. Device not defined or unavailable. : Automatic reboot in 15 seconds - press a key on the console to abort : = : uname: avila ... FreeBSD 9.0-CURRENT #1: Wed Feb 17 12:08:37 UTC 2010= ... arm : = : Not really sure, if this alignment error come from kdump, there is : really no dump device in this unit and other debugging facilities was= : turned off to save space. I'd wager that it wasn't caused by kdump, but something in the kernel. Warner From owner-freebsd-arm@FreeBSD.ORG Thu Feb 18 00:28:34 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 557B5106568D for ; Thu, 18 Feb 2010 00:28:34 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f225.google.com (mail-ew0-f225.google.com [209.85.219.225]) by mx1.freebsd.org (Postfix) with ESMTP id D76038FC17 for ; Thu, 18 Feb 2010 00:28:33 +0000 (UTC) Received: by ewy25 with SMTP id 25so216056ewy.3 for ; Wed, 17 Feb 2010 16:28:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=dVty+a8umjIOY9r+8aH+lCrIscsfHkT8iMzsB8Dh/nc=; b=jEn8cR/wCPr/jMcFfoylZNA8IFgCGmau4CeCxV8iRbQ+GWPcuTdFXL6e4Fh+66f9yY yfqGby3W09lK+uOR7dqMFxYakIhHi9f6+8inCM5Udc6WGvCDZfqjoO6s5ixjNlzIORdn 46SHkOFPhRfb2qc8CwUA6mklvrnLvYAYS9WV8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=CEotFCvqnL051tS42polKmcEuY7rQfkov76GWcylEo9tt34V6BEquSttGBAu8q96aR lEQz4JTmaUqCV1BqwY4Tcx+vWMgpfs8SlF9pQ2KxaOtQudsQ0JphrKSWSHff/VLzpF6O lnSmnjS+c5ZPXOrCXtXxAY0HNSKkZMcg43aWM= Received: by 10.213.96.227 with SMTP id i35mr3556875ebn.35.1266452912739; Wed, 17 Feb 2010 16:28:32 -0800 (PST) Received: from ?10.0.10.4? (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by mx.google.com with ESMTPS id 7sm22311570eyg.17.2010.02.17.16.28.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Feb 2010 16:28:31 -0800 (PST) Sender: Rui Paulo Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <20100217.121545.260300876949842220.imp@bsdimp.com> Date: Thu, 18 Feb 2010 00:28:30 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <987A4BCD-03A9-49ED-9E2E-AA4C2C6CA345@freebsd.org> References: <6c36ec371002170654n5e441c6eib9a8c9aad61c1e87@mail.gmail.com> <20100217.094559.29593248078653355.imp@bsdimp.com> <6c36ec371002171047m13544419sf8ca5ad283cdc65@mail.gmail.com> <20100217.121545.260300876949842220.imp@bsdimp.com> To: M. Warner Losh X-Mailer: Apple Mail (2.1077) Cc: freebsd-arm@freebsd.org Subject: Re: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 00:28:34 -0000 On 17 Feb 2010, at 19:15, M. Warner Losh wrote: > In message: = <6c36ec371002171047m13544419sf8ca5ad283cdc65@mail.gmail.com> > batcilla itself writes: > : 2010/2/17 M. Warner Losh : > : > In message: = <6c36ec371002170654n5e441c6eib9a8c9aad61c1e87@mail.gmail.com> > : > batcilla itself writes: > : > : 2010/2/17 Hans Petter Selasky > : > : > > : > : > On Wednesday 17 February 2010 15:18:12 Grzegorz Bernacki = wrote: > : > : > > Hi, > : > : > > > : > : > > I've noticed that kdump on ARM doesn't work properly, it = generates bus > : > : > > error. The problem is that structures dumped into = ktrace.out are not > : > : > > aligned. Processing such a structure causes Aligment Fault. = One solution > : > : > > is to copy structure into local variable and then process = it, please see > : > : > > patch below. But I am not sure if this is the best solution = and maybe > : > : > > someone has a better idea. > : > : > > > : > : > > grzesiek > : > : > > > : > : > > > : > : > > diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c > : > : > > index 386221e..5a15886 100644 > : > : > > --- a/usr.bin/kdump/kdump.c > : > : > > +++ b/usr.bin/kdump/kdump.c > : > : > > @@ -1325,6 +1325,10 @@ ktrstat(struct stat *statp) > : > : > > void > : > : > > ktrstruct(char *buf, size_t buflen) > : > : > > { > : > : > > +#if defined(__arm__) > : > : > > + struct stat stat; > : > : > > + struct sockaddr sockaddr; > : > : > > +#endif > : > : > > char *name, *data; > : > : > > size_t namelen, datalen; > : > : > > int i; > : > : > > @@ -1348,12 +1352,22 @@ ktrstruct(char *buf, size_t buflen) > : > : > > if (strcmp(name, "stat") =3D=3D 0) { > : > : > > if (datalen !=3D sizeof(struct stat)) > : > : > > goto invalid; > : > : > > +#if defined(__arm__) > : > : > > + memcpy(&stat, data, sizeof(struct stat)); > : > : > > + ktrstat(&stat); > : > : > > +#else > : > : > > ktrstat((struct stat *)data); > : > : > > +#endif > : > : > > } else if (strcmp(name, "sockaddr") =3D=3D 0) { > : > : > > if (datalen < sizeof(struct sockaddr) || > : > : > > datalen !=3D ((struct sockaddr = *)(data))->sa_len) > : > : > > goto invalid; > : > : > > +#if defined(__arm__) > : > : > > + memcpy(&sockaddr, data, sizeof(struct = sockaddr)); > : > : > > + ktrsockaddr(&sockaddr); > : > : > > +#else > : > : > > ktrsockaddr((struct sockaddr *)data); > : > : > > +#endif > : > : > > } else { > : > : > > printf("unknown structure\n"); > : > : > > } > : > : > > : > : > I think more than ARM is affected by this. > : > : > > : > : > --HPS > : > : ARM affected definitely, just today had that Align error with = -current > : > : while tried to use ng_bridge with wlan0 > : > > : > Where exactly was the error? Do you have a traceback? > : It was ARM/Xcale avila custom nanobsd build, error was caused adding > : wlan0 into ng_bridge, while wlan0 was in tdma master (slot 0) mode, > : with slot 1 there was no errors. Exact message here: > :=20 > : Fatal kernel mode data abort: 'Alignment Fault 3' > : trapframe: 0xc5e38cac > : FSR=3D00000003, FAR=3Dc10fd1fe, spsr=3D00000013 > : r0 =3Dc0e15080, r1 =3Dc0508288, r2 =3Dc10fd1fe, r3 =3D00000001 > : r4 =3D0000003c, r5 =3Dc0e15080, r6 =3Dc0e15500, r7 =3Dc111a600 > : r8 =3Dc1182a00, r9 =3Dc116dc00, r10=3Dc0e15d80, r11=3D00000001 > : r12=3Dc0e15080, ssp=3Dc5e38cf8, slr=3Dc041cb58, pc =3Dc041ec98 > :=20 > : panic: Fatal abort > : Uptime: 3h26m17s > : Cannot dump. Device not defined or unavailable. > : Automatic reboot in 15 seconds - press a key on the console to abort > :=20 > : uname: avila ... FreeBSD 9.0-CURRENT #1: Wed Feb 17 12:08:37 UTC = 2010 ... arm > :=20 > : Not really sure, if this alignment error come from kdump, there is > : really no dump device in this unit and other debugging facilities = was > : turned off to save space. >=20 > I'd wager that it wasn't caused by kdump, but something in the kernel. I definitely agree. -- Rui Paulo From owner-freebsd-arm@FreeBSD.ORG Thu Feb 18 09:15:23 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40EEF106566C for ; Thu, 18 Feb 2010 09:15:23 +0000 (UTC) (envelope-from mail25@bzerk.org) Received: from ei.bzerk.org (tunnel490.ipv6.xs4all.nl [IPv6:2001:888:10:1ea::2]) by mx1.freebsd.org (Postfix) with ESMTP id CD3B38FC19 for ; Thu, 18 Feb 2010 09:15:22 +0000 (UTC) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.14.3/8.14.3) with ESMTP id o1I9FJjg070731 for ; Thu, 18 Feb 2010 10:15:19 +0100 (CET) (envelope-from mail25@bzerk.org) Received: (from bulk@localhost) by ei.bzerk.org (8.14.3/8.14.3/Submit) id o1I9FJpx070730 for arm@freebsd.org; Thu, 18 Feb 2010 10:15:19 +0100 (CET) (envelope-from mail25@bzerk.org) Date: Thu, 18 Feb 2010 10:15:18 +0100 From: Ruben de Groot To: arm@freebsd.org Message-ID: <20100218091518.GA70665@ei.bzerk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on ei.bzerk.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (ei.bzerk.org [127.0.0.1]); Thu, 18 Feb 2010 10:15:21 +0100 (CET) Cc: Subject: TARGET_CPUTYPE for Maxel Sheevaplug X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 09:15:23 -0000 Quick question: I'm in posession of 2 SheevaPlugs and want to install FreeBSD on them using http://people.freebsd.org/~cognet/freebsd_arm.txt. My question: which TARGET_CPUTYPE to use for the buildworld target? thanks. Ruben From owner-freebsd-arm@FreeBSD.ORG Thu Feb 18 09:36:41 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D5DA106566B for ; Thu, 18 Feb 2010 09:36:41 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id D77378FC14 for ; Thu, 18 Feb 2010 09:36:40 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id DF49DC42D5; Thu, 18 Feb 2010 10:38:34 +0100 (CET) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id LXhHso8apJFm; Thu, 18 Feb 2010 10:38:34 +0100 (CET) Received: from [10.0.0.34] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPSA id 57F7FC42D4; Thu, 18 Feb 2010 10:38:34 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Rafal Jaworowski In-Reply-To: <20100218091518.GA70665@ei.bzerk.org> Date: Thu, 18 Feb 2010 10:36:38 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <0A8C8F98-BA14-49EF-8165-ED4F857EA815@semihalf.com> References: <20100218091518.GA70665@ei.bzerk.org> To: Ruben de Groot X-Mailer: Apple Mail (2.1077) Cc: arm@freebsd.org Subject: Re: TARGET_CPUTYPE for Maxel Sheevaplug X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 09:36:41 -0000 On 2010-02-18, at 10:15, Ruben de Groot wrote: > Quick question: >=20 > I'm in posession of 2 SheevaPlugs and want to install FreeBSD on them = using > http://people.freebsd.org/~cognet/freebsd_arm.txt. >=20 > My question: which TARGET_CPUTYPE to use for the buildworld target? No need for setting TARGET_CPUTYPE in this case. See the following = notes: http://wiki.freebsd.org/FreeBSDMarvell In particular to build kernel for the plug use: make buildkernel TARGET_ARCH=3Darm KERNCONF=3DSHEEVAPLUG Rafal From owner-freebsd-arm@FreeBSD.ORG Thu Feb 18 10:03:20 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD2BD1065700 for ; Thu, 18 Feb 2010 10:03:20 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id 5545F8FC15 for ; Thu, 18 Feb 2010 10:03:19 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id 4B43FC42D5; Thu, 18 Feb 2010 10:55:24 +0100 (CET) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id z9RpXCi12fr8; Thu, 18 Feb 2010 10:55:23 +0100 (CET) Received: from [10.0.0.75] (unknown [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPA id 66FE6C42D4; Thu, 18 Feb 2010 10:55:23 +0100 (CET) Message-ID: <4B7D0E02.6020708@semihalf.com> Date: Thu, 18 Feb 2010 10:53:06 +0100 From: Grzegorz Bernacki User-Agent: Thunderbird 2.0.0.16 (X11/20090618) MIME-Version: 1.0 To: Rafal Jaworowski References: <20100217151607.GU43625@cicely7.cicely.de> <20100217151941.GV43625@cicely7.cicely.de> <20100217152900.GX43625@cicely7.cicely.de> <20100217.100004.321689434032786752.imp@bsdimp.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: rpaulo@gmail.com, freebsd-arm@FreeBSD.org, ticso@cicely7.cicely.de, ticso@cicely.de Subject: Re: kdump on ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 10:03:20 -0000 Rafal Jaworowski wrote: > On 2010-02-17, at 18:00, M. Warner Losh wrote: > >> In message: <20100217152900.GX43625@cicely7.cicely.de> >> Bernd Walter writes: >> : On Wed, Feb 17, 2010 at 04:19:41PM +0100, Bernd Walter wrote: >> : > On Wed, Feb 17, 2010 at 04:16:07PM +0100, Bernd Walter wrote: >> : > > On Wed, Feb 17, 2010 at 02:54:05PM +0000, Rui Paulo wrote: >> : > > > On 17 Feb 2010, at 14:18, Grzegorz Bernacki wrote: >> : > > > I wonder if this can't be made non arm conditional? >> : > >> : > Ups - I'd just recovered from Mr. Sandman's work. >> : > So we all agree about. >> : > Nevertheless it should be verified if this is just a faulty struct >> : > definition. >> : > On the other hand I think it is not because someone else wrote it is >> : > a brokem on mips as well. >> : >> : I'm really still sleeping - noone mentioned mips at all. >> : > > Either this struct is properly aligned or not. >> : > > So why should this be made conditional? >> : > > Non strict alignment architecturs also have problems with this, but >> : > > it is usualy just speed penalties. >> : > > There is one ARM sepcific struct missalignment problem. >> : > > In this case we usually add __packed macro to structure definition. >> : > > For most structures this usually means no change on other >> : > > archtitectures and we only declare the struct to forcibly be what the >> : > > programmer already expected. >> : > > Only a few programmers are aware that they expect something from >> : > > structures, which is not garantied. >> >> This code is clearly nutso when it comes to alignment. I've come up >> with a slightly better patch. I'd though about doing the structure >> assignment that I suggested in a prior note, but the compiler is free >> to assume alignment when copying the structures, which may end badly. >> There's no way we can add __packed or __aligned easily to this code >> (although the ktrstat and ktrsockaddr routines should be able to have >> that annotation, a quick test suggests that the annotations I tried >> didn't take right). >> >> I don't have a good ARM setup at the moment to actually test these >> changes. Can others test them? They seem to work for me on x86, but >> that isn't saying much. > > Thanks, this looks better. We'll test this in our set-up and verify, but only tomorrow I guess... > > Rafal > Yes, this patch is much better. I've tested it on ARM and it works fine. grzesiek From owner-freebsd-arm@FreeBSD.ORG Thu Feb 18 10:11:17 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 933311065670; Thu, 18 Feb 2010 10:11:17 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 1836A8FC17; Thu, 18 Feb 2010 10:11:16 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1IABCqV090592 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 18 Feb 2010 11:11:12 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1IABAWA041340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Feb 2010 11:11:10 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1IABAq8084015; Thu, 18 Feb 2010 11:11:10 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1IABAu4084014; Thu, 18 Feb 2010 11:11:10 +0100 (CET) (envelope-from ticso) Date: Thu, 18 Feb 2010 11:11:10 +0100 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20100218101109.GA43625@cicely7.cicely.de> References: <20100217152557.GW43625@cicely7.cicely.de> <20100217.100113.506212773099063928.imp@bsdimp.com> <20100217174917.GY43625@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100217174917.GY43625@cicely7.cicely.de> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: arm@freebsd.org, ticso@cicely7.cicely.de, ticso@cicely.de, current@freebsd.org Subject: Re: lang/perl5.10 broken X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 10:11:17 -0000 On Wed, Feb 17, 2010 at 06:49:17PM +0100, Bernd Walter wrote: > On Wed, Feb 17, 2010 at 10:01:13AM -0700, M. Warner Losh wrote: > > In message: <20100217152557.GW43625@cicely7.cicely.de> > > Bernd Walter writes: > > : Not sure if this is ARM related or not. > > > > ... > > : *** Signal 11 > > > > Silly question: do you have enough swap space enabled? > > First try was with 128M on internal SD of which usually just about > 10M is used during compiler runs and the second was with 1G on external > USB SD reader, but just because of speed with internal. > I also saw no kernel message that the system was out of space. > > I'm currently trying to compile perl5.8, but it takes some time. perl5.8 seems to work fine. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Thu Feb 18 12:49:18 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 746E71065670; Thu, 18 Feb 2010 12:49:18 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id F32F08FC17; Thu, 18 Feb 2010 12:49:17 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1ICnGmH007315 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 18 Feb 2010 13:49:16 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1ICn7Qe046547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Feb 2010 13:49:07 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1ICn7fi084689; Thu, 18 Feb 2010 13:49:07 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1ICn7v8084688; Thu, 18 Feb 2010 13:49:07 +0100 (CET) (envelope-from ticso) Date: Thu, 18 Feb 2010 13:49:07 +0100 From: Bernd Walter To: current@freebsd.org, arm@freebsd.org Message-ID: <20100218124907.GG43625@cicely7.cicely.de> References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100216183951.GI43625@cicely7.cicely.de> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: Bernd Walter Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 12:49:18 -0000 On Tue, Feb 16, 2010 at 07:39:51PM +0100, Bernd Walter wrote: > On Mon, Feb 15, 2010 at 10:39:07PM +0100, Bernd Walter wrote: > [55]Please.tell.me.who.am.I# gdb /usr/sbin/named named.core > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "arm-marcel-freebsd"...(no debugging symbols found)... > Core was generated by `named'. > Program terminated with signal 5, Trace/breakpoint trap. > Reading symbols from /lib/libcrypto.so.6...(no debugging symbols found)...done. > Loaded symbols for /lib/libcrypto.so.6 > Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done. > Loaded symbols for /lib/libthr.so.3 > Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. > Loaded symbols for /lib/libc.so.7 > Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. > Loaded symbols for /libexec/ld-elf.so.1 > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > [New Thread 20804280 (LWP 100062)] > [New Thread 20804140 (LWP 100052)] > (gdb) bt > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > #1 0x203572b8 in _thread_bp_death () from /lib/libthr.so.3 > #2 0x20349da4 in pthread_create () from /lib/libthr.so.3 > #3 0x00164cb8 in ?? () > (gdb) > > Do we have a general threading problem on ARM? I see two different type a crashes. Both have in common that one or more threads are in _umtx_op. Unfortunately I don't know enough details about those things to isolate any more. the one from above: #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 [New Thread 20804280 (LWP 100062)] [New Thread 20804140 (LWP 100052)] (gdb) bt #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 #1 0x203572b8 in _thread_bp_death () from /lib/libthr.so.3 #2 0x20349da4 in pthread_create () from /lib/libthr.so.3 #3 0x00164cb8 in ?? () (gdb) thread 1 [Switching to thread 1 (Thread 20804280 (LWP 100062))]#0 0x203ab6f0 in _umtx_op () from /lib/libc.so.7 (gdb) bt #0 0x203ab6f0 in _umtx_op () from /lib/libc.so.7 #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 #2 0x20357cc0 in pthread_cleanup_push () from /lib/libthr.so.3 #3 0x20349540 in pthread_getprio () from /lib/libthr.so.3 #4 0x203499a0 in pthread_create () from /lib/libthr.so.3 #5 0x00164cb8 in ?? () And another, which is what I get most of the time: (gdb) thread 1 [Switching to thread 1 (Thread 20804500 (LWP 100100))]#0 0x20435f28 in kevent () from /lib/libc.so.7 (gdb) bt #0 0x20435f28 in kevent () from /lib/libc.so.7 #1 0x0014f2dc in ?? () (gdb) thread 2 [Switching to thread 2 (Thread 208043c0 (LWP 100099))]#0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 (gdb) bt #0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 #2 0x20357a78 in pthread_cleanup_push () from /lib/libthr.so.3 #3 0x20355580 in pthread_cond_signal () from /lib/libthr.so.3 #4 0x00000000 in ?? () (gdb) thread 3 [Switching to thread 3 (Thread 20804280 (LWP 100098))]#0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 (gdb) bt #0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 #2 0x20357a78 in pthread_cleanup_push () from /lib/libthr.so.3 #3 0x20355580 in pthread_cond_signal () from /lib/libthr.so.3 #4 0x2092d008 in ?? () (gdb) thread 4 [Switching to thread 4 (Thread 20804140 (LWP 100043))]#0 0x0015755c in ?? () (gdb) bt #0 0x0015755c in ?? () -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Thu Feb 18 13:23:31 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50E09106566B for ; Thu, 18 Feb 2010 13:23:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id A91948FC13 for ; Thu, 18 Feb 2010 13:23:30 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o1IDAB0a094510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Feb 2010 15:10:11 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o1IDAAUF040769; Thu, 18 Feb 2010 15:10:10 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o1IDAAJO040768; Thu, 18 Feb 2010 15:10:10 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 18 Feb 2010 15:10:10 +0200 From: Kostik Belousov To: ticso@cicely.de Message-ID: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> <20100218124907.GG43625@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yEbVe0JFHWhrOjGA" Content-Disposition: inline In-Reply-To: <20100218124907.GG43625@cicely7.cicely.de> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: arm@freebsd.org, Bernd Walter , current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 13:23:31 -0000 --yEbVe0JFHWhrOjGA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 18, 2010 at 01:49:07PM +0100, Bernd Walter wrote: > On Tue, Feb 16, 2010 at 07:39:51PM +0100, Bernd Walter wrote: > > On Mon, Feb 15, 2010 at 10:39:07PM +0100, Bernd Walter wrote: > > [55]Please.tell.me.who.am.I# gdb /usr/sbin/named named.core=20 > > GNU gdb 6.1.1 [FreeBSD] > > Copyright 2004 Free Software Foundation, Inc. > > GDB is free software, covered by the GNU General Public License, and yo= u are > > welcome to change it and/or distribute copies of it under certain condi= tions. > > Type "show copying" to see the conditions. > > There is absolutely no warranty for GDB. Type "show warranty" for deta= ils. > > This GDB was configured as "arm-marcel-freebsd"...(no debugging symbols= found)... > > Core was generated by `named'. > > Program terminated with signal 5, Trace/breakpoint trap. > > Reading symbols from /lib/libcrypto.so.6...(no debugging symbols found)= ...done. > > Loaded symbols for /lib/libcrypto.so.6 > > Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...= done. > > Loaded symbols for /lib/libthr.so.3 > > Reading symbols from /lib/libc.so.7...(no debugging symbols found)...do= ne. > > Loaded symbols for /lib/libc.so.7 > > Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found= )...done. > > Loaded symbols for /libexec/ld-elf.so.1 > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > > [New Thread 20804280 (LWP 100062)] > > [New Thread 20804140 (LWP 100052)] > > (gdb) bt > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > > #1 0x203572b8 in _thread_bp_death () from /lib/libthr.so.3 > > #2 0x20349da4 in pthread_create () from /lib/libthr.so.3 > > #3 0x00164cb8 in ?? () > > (gdb)=20 > >=20 > > Do we have a general threading problem on ARM? >=20 > I see two different type a crashes. > Both have in common that one or more threads are in _umtx_op. > Unfortunately I don't know enough details about those things to isolate > any more. >=20 > the one from above: > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > [New Thread 20804280 (LWP 100062)] > [New Thread 20804140 (LWP 100052)] > (gdb) bt > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > #1 0x203572b8 in _thread_bp_death () from /lib/libthr.so.3 > #2 0x20349da4 in pthread_create () from /lib/libthr.so.3 > #3 0x00164cb8 in ?? () > (gdb) thread 1 > [Switching to thread 1 (Thread 20804280 (LWP 100062))]#0 0x203ab6f0 in _= umtx_op () from /lib/libc.so.7 > (gdb) bt > #0 0x203ab6f0 in _umtx_op () from /lib/libc.so.7 > #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 > #2 0x20357cc0 in pthread_cleanup_push () from /lib/libthr.so.3 > #3 0x20349540 in pthread_getprio () from /lib/libthr.so.3 > #4 0x203499a0 in pthread_create () from /lib/libthr.so.3 > #5 0x00164cb8 in ?? () >=20 > And another, which is what I get most of the time: > (gdb) thread 1 > [Switching to thread 1 (Thread 20804500 (LWP 100100))]#0 0x20435f28 in k= event () from /lib/libc.so.7 > (gdb) bt > #0 0x20435f28 in kevent () from /lib/libc.so.7 > #1 0x0014f2dc in ?? () > (gdb) thread 2 > [Switching to thread 2 (Thread 208043c0 (LWP 100099))]#0 0x203ab6f4 in _= umtx_op () from /lib/libc.so.7 > (gdb) bt > #0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 > #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 > #2 0x20357a78 in pthread_cleanup_push () from /lib/libthr.so.3 > #3 0x20355580 in pthread_cond_signal () from /lib/libthr.so.3 > #4 0x00000000 in ?? () > (gdb) thread 3 > [Switching to thread 3 (Thread 20804280 (LWP 100098))]#0 0x203ab6f4 in _= umtx_op () from /lib/libc.so.7 > (gdb) bt > #0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 > #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 > #2 0x20357a78 in pthread_cleanup_push () from /lib/libthr.so.3 > #3 0x20355580 in pthread_cond_signal () from /lib/libthr.so.3 > #4 0x2092d008 in ?? () > (gdb) thread 4 > [Switching to thread 4 (Thread 20804140 (LWP 100043))]#0 0x0015755c in ?= ? () > (gdb) bt > #0 0x0015755c in ?? () Compile and install ld-elf.so, libc and libthr with debugging symbols: (cd libexec/rtld-elf && make all install DEBUG_FLAGS=3D-g) (cd lib/libc && make all install DEBUG_FLAGS=3D-g) (cd lib/libthr && make all install DEBUG_FLAGS=3D-g) Then repeat the crash and try to see where in code does it happen. --yEbVe0JFHWhrOjGA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkt9PDIACgkQC3+MBN1Mb4gqBQCgxZlcaE8lrHJaQnYMBE7qiK2C 9jAAmwSzIoYVhMYraXn85Y59UKemeLYl =W9Kn -----END PGP SIGNATURE----- --yEbVe0JFHWhrOjGA-- From owner-freebsd-arm@FreeBSD.ORG Thu Feb 18 23:45:49 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C6F91065670; Thu, 18 Feb 2010 23:45:49 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id C11278FC08; Thu, 18 Feb 2010 23:45:48 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1INjkMf048767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Feb 2010 00:45:47 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1INjbRD076833 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 00:45:37 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1INjbe8087531; Fri, 19 Feb 2010 00:45:37 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1INjbKY087530; Fri, 19 Feb 2010 00:45:37 +0100 (CET) (envelope-from ticso) Date: Fri, 19 Feb 2010 00:45:37 +0100 From: Bernd Walter To: Kostik Belousov Message-ID: <20100218234537.GT43625@cicely7.cicely.de> References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> <20100218124907.GG43625@cicely7.cicely.de> <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED=-1.8, AWL=0.062, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: arm@freebsd.org, Bernd Walter , ticso@cicely.de, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 23:45:49 -0000 On Thu, Feb 18, 2010 at 03:10:10PM +0200, Kostik Belousov wrote: > On Thu, Feb 18, 2010 at 01:49:07PM +0100, Bernd Walter wrote: > > On Tue, Feb 16, 2010 at 07:39:51PM +0100, Bernd Walter wrote: > > > On Mon, Feb 15, 2010 at 10:39:07PM +0100, Bernd Walter wrote: > > > [55]Please.tell.me.who.am.I# gdb /usr/sbin/named named.core > > > GNU gdb 6.1.1 [FreeBSD] > > > Copyright 2004 Free Software Foundation, Inc. > > > GDB is free software, covered by the GNU General Public License, and you are > > > welcome to change it and/or distribute copies of it under certain conditions. > > > Type "show copying" to see the conditions. > > > There is absolutely no warranty for GDB. Type "show warranty" for details. > > > This GDB was configured as "arm-marcel-freebsd"...(no debugging symbols found)... > > > Core was generated by `named'. > > > Program terminated with signal 5, Trace/breakpoint trap. > > > Reading symbols from /lib/libcrypto.so.6...(no debugging symbols found)...done. > > > Loaded symbols for /lib/libcrypto.so.6 > > > Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done. > > > Loaded symbols for /lib/libthr.so.3 > > > Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. > > > Loaded symbols for /lib/libc.so.7 > > > Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. > > > Loaded symbols for /libexec/ld-elf.so.1 > > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > > > [New Thread 20804280 (LWP 100062)] > > > [New Thread 20804140 (LWP 100052)] > > > (gdb) bt > > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > > > #1 0x203572b8 in _thread_bp_death () from /lib/libthr.so.3 > > > #2 0x20349da4 in pthread_create () from /lib/libthr.so.3 > > > #3 0x00164cb8 in ?? () > > > (gdb) > > > > > > Do we have a general threading problem on ARM? > > > > I see two different type a crashes. > > Both have in common that one or more threads are in _umtx_op. > > Unfortunately I don't know enough details about those things to isolate > > any more. > > > > the one from above: > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > > [New Thread 20804280 (LWP 100062)] > > [New Thread 20804140 (LWP 100052)] > > (gdb) bt > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > > #1 0x203572b8 in _thread_bp_death () from /lib/libthr.so.3 > > #2 0x20349da4 in pthread_create () from /lib/libthr.so.3 > > #3 0x00164cb8 in ?? () > > (gdb) thread 1 > > [Switching to thread 1 (Thread 20804280 (LWP 100062))]#0 0x203ab6f0 in _umtx_op () from /lib/libc.so.7 > > (gdb) bt > > #0 0x203ab6f0 in _umtx_op () from /lib/libc.so.7 > > #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 > > #2 0x20357cc0 in pthread_cleanup_push () from /lib/libthr.so.3 > > #3 0x20349540 in pthread_getprio () from /lib/libthr.so.3 > > #4 0x203499a0 in pthread_create () from /lib/libthr.so.3 > > #5 0x00164cb8 in ?? () > > > > And another, which is what I get most of the time: > > (gdb) thread 1 > > [Switching to thread 1 (Thread 20804500 (LWP 100100))]#0 0x20435f28 in kevent () from /lib/libc.so.7 > > (gdb) bt > > #0 0x20435f28 in kevent () from /lib/libc.so.7 > > #1 0x0014f2dc in ?? () > > (gdb) thread 2 > > [Switching to thread 2 (Thread 208043c0 (LWP 100099))]#0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 > > (gdb) bt > > #0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 > > #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 > > #2 0x20357a78 in pthread_cleanup_push () from /lib/libthr.so.3 > > #3 0x20355580 in pthread_cond_signal () from /lib/libthr.so.3 > > #4 0x00000000 in ?? () > > (gdb) thread 3 > > [Switching to thread 3 (Thread 20804280 (LWP 100098))]#0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 > > (gdb) bt > > #0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 > > #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 > > #2 0x20357a78 in pthread_cleanup_push () from /lib/libthr.so.3 > > #3 0x20355580 in pthread_cond_signal () from /lib/libthr.so.3 > > #4 0x2092d008 in ?? () > > (gdb) thread 4 > > [Switching to thread 4 (Thread 20804140 (LWP 100043))]#0 0x0015755c in ?? () > > (gdb) bt > > #0 0x0015755c in ?? () > > Compile and install ld-elf.so, libc and libthr with debugging symbols: > (cd libexec/rtld-elf && make all install DEBUG_FLAGS=-g) > (cd lib/libc && make all install DEBUG_FLAGS=-g) > (cd lib/libthr && make all install DEBUG_FLAGS=-g) > > Then repeat the crash and try to see where in code does it happen. It is still compiling, but since kdump was fixed recently (thanks guys!) I already have some other data. But to be honest I don't see anything usefull in it. The last entry before the segfault was a successfull syslog submission. Hope the compiler finishes soon to get more detailed backtraces. [...] 59537 named CALL kevent(0x8,0xbfffe91c,0x1,0,0,0) 59537 named GIO fd 8 wrote 20 bytes 0x0000 0500 0000 ffff 0100 0000 0000 0000 0000 0000 0000 |....................| 59537 named GIO fd 8 read 0 bytes "" 59537 named RET kevent 0 59537 named CALL mmap(0xbfafc000,0x101000,PROT_READ|PROT_WRITE,MAP_STACK,0xffffffff,0,0) 59537 named RET mmap -1079001088/0xbfafc000 59537 named CALL mprotect(0xbfafc000,0x1000,PROT_NONE) 59537 named RET mprotect 0 59537 named CALL thr_new(0xbfffe8b4,0x34) 59537 named RET thr_new 0 59537 named RET fork 0 59537 named CALL kevent(0x8,0,0,0x209c6100,0x40,0) 59537 named CALL clock_gettime(0xd,0xbfffce58) 59537 named RET clock_gettime 0 59537 named CALL getpid 59537 named RET getpid 59537/0xe891 59537 named CALL sendto(0x3,0xbfffd304,0x3a,0,0,0) 59537 named GIO fd 3 wrote 58 bytes "<30>Feb 18 23:38:10 named[59537]: using up to 4096 sockets" 59537 named RET sendto 58/0x3a 59537 named PSIG SIGSEGV SIG_DFL 59537 named RET _umtx_op -1 errno 4 Interrupted system call 59537 named GIO fd 8 wrote 0 bytes "" 59537 named RET kevent -1 errno 4 Interrupted system call 59537 named RET _umtx_op -1 errno 4 Interrupted system call 59537 named NAMI "named.core" 59536 initial thread GIO fd 5 read 0 bytes "" 59536 initial thread RET read 0 59536 initial thread CALL exit(0x1) -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 03:12:05 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ABFD106566B; Fri, 19 Feb 2010 03:12:05 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 1192F8FC18; Fri, 19 Feb 2010 03:12:04 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1J3C3gc063832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Feb 2010 04:12:03 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1J3C0Y8085938 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 04:12:00 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1J3C0Ys089211; Fri, 19 Feb 2010 04:12:00 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1J3C03a089210; Fri, 19 Feb 2010 04:12:00 +0100 (CET) (envelope-from ticso) Date: Fri, 19 Feb 2010 04:12:00 +0100 From: Bernd Walter To: Kostik Belousov Message-ID: <20100219031200.GY43625@cicely7.cicely.de> References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> <20100218124907.GG43625@cicely7.cicely.de> <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: arm@freebsd.org, Bernd Walter , ticso@cicely.de, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 03:12:05 -0000 On Thu, Feb 18, 2010 at 03:10:10PM +0200, Kostik Belousov wrote: > On Thu, Feb 18, 2010 at 01:49:07PM +0100, Bernd Walter wrote: > > On Tue, Feb 16, 2010 at 07:39:51PM +0100, Bernd Walter wrote: > > > On Mon, Feb 15, 2010 at 10:39:07PM +0100, Bernd Walter wrote: > > > [55]Please.tell.me.who.am.I# gdb /usr/sbin/named named.core > > > GNU gdb 6.1.1 [FreeBSD] > > > Copyright 2004 Free Software Foundation, Inc. > > > GDB is free software, covered by the GNU General Public License, and you are > > > welcome to change it and/or distribute copies of it under certain conditions. > > > Type "show copying" to see the conditions. > > > There is absolutely no warranty for GDB. Type "show warranty" for details. > > > This GDB was configured as "arm-marcel-freebsd"...(no debugging symbols found)... > > > Core was generated by `named'. > > > Program terminated with signal 5, Trace/breakpoint trap. > > > Reading symbols from /lib/libcrypto.so.6...(no debugging symbols found)...done. > > > Loaded symbols for /lib/libcrypto.so.6 > > > Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done. > > > Loaded symbols for /lib/libthr.so.3 > > > Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. > > > Loaded symbols for /lib/libc.so.7 > > > Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. > > > Loaded symbols for /libexec/ld-elf.so.1 > > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > > > [New Thread 20804280 (LWP 100062)] > > > [New Thread 20804140 (LWP 100052)] > > > (gdb) bt > > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > > > #1 0x203572b8 in _thread_bp_death () from /lib/libthr.so.3 > > > #2 0x20349da4 in pthread_create () from /lib/libthr.so.3 > > > #3 0x00164cb8 in ?? () > > > (gdb) > > > > > > Do we have a general threading problem on ARM? > > > > I see two different type a crashes. > > Both have in common that one or more threads are in _umtx_op. > > Unfortunately I don't know enough details about those things to isolate > > any more. > > > > the one from above: > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > > [New Thread 20804280 (LWP 100062)] > > [New Thread 20804140 (LWP 100052)] > > (gdb) bt > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 > > #1 0x203572b8 in _thread_bp_death () from /lib/libthr.so.3 > > #2 0x20349da4 in pthread_create () from /lib/libthr.so.3 > > #3 0x00164cb8 in ?? () > > (gdb) thread 1 > > [Switching to thread 1 (Thread 20804280 (LWP 100062))]#0 0x203ab6f0 in _umtx_op () from /lib/libc.so.7 > > (gdb) bt > > #0 0x203ab6f0 in _umtx_op () from /lib/libc.so.7 > > #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 > > #2 0x20357cc0 in pthread_cleanup_push () from /lib/libthr.so.3 > > #3 0x20349540 in pthread_getprio () from /lib/libthr.so.3 > > #4 0x203499a0 in pthread_create () from /lib/libthr.so.3 > > #5 0x00164cb8 in ?? () > > > > And another, which is what I get most of the time: > > (gdb) thread 1 > > [Switching to thread 1 (Thread 20804500 (LWP 100100))]#0 0x20435f28 in kevent () from /lib/libc.so.7 > > (gdb) bt > > #0 0x20435f28 in kevent () from /lib/libc.so.7 > > #1 0x0014f2dc in ?? () > > (gdb) thread 2 > > [Switching to thread 2 (Thread 208043c0 (LWP 100099))]#0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 > > (gdb) bt > > #0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 > > #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 > > #2 0x20357a78 in pthread_cleanup_push () from /lib/libthr.so.3 > > #3 0x20355580 in pthread_cond_signal () from /lib/libthr.so.3 > > #4 0x00000000 in ?? () > > (gdb) thread 3 > > [Switching to thread 3 (Thread 20804280 (LWP 100098))]#0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 > > (gdb) bt > > #0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 > > #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 > > #2 0x20357a78 in pthread_cleanup_push () from /lib/libthr.so.3 > > #3 0x20355580 in pthread_cond_signal () from /lib/libthr.so.3 > > #4 0x2092d008 in ?? () > > (gdb) thread 4 > > [Switching to thread 4 (Thread 20804140 (LWP 100043))]#0 0x0015755c in ?? () > > (gdb) bt > > #0 0x0015755c in ?? () > > Compile and install ld-elf.so, libc and libthr with debugging symbols: > (cd libexec/rtld-elf && make all install DEBUG_FLAGS=-g) > (cd lib/libc && make all install DEBUG_FLAGS=-g) > (cd lib/libthr && make all install DEBUG_FLAGS=-g) > > Then repeat the crash and try to see where in code does it happen. Currently I can only get this type. I've started the unstripped named to get all the function names. (gdb) thread 1 [Switching to thread 1 (Thread 20804500 (LWP 100100))]#0 0x20435308 in kevent () at kevent.S:3 3 RSYSCALL(kevent) Current language: auto; currently asm (gdb) bt #0 0x20435308 in kevent () at kevent.S:3 #1 0x0014f2dc in watcher () #2 0x203495b0 in thread_start (curthread=0x20804500) at /data/builder/arm-current/head/lib/libthr/thread/thr_create.c:288 #3 0x20349a20 in _pthread_create (thread=0x2046caa8, attr=0xbfffe7f8, start_routine=0x14f2ac , arg=Variable "arg" is not available. ) at /data/builder/arm-current/head/lib/libthr/thread/thr_create.c:174 #4 0x00000000 in ?? () Cannot access memory at address 0x40 (gdb) thread 2 [Switching to thread 2 (Thread 208043c0 (LWP 100099))]#0 0x203ab558 in _umtx_op () at _umtx_op.S:3 3 RSYSCALL(_umtx_op) (gdb) bt #0 0x203ab558 in _umtx_op () at _umtx_op.S:3 #1 0x2035753c in _umtx_op_err (obj=Variable "obj" is not available. ) at /data/builder/arm-current/head/lib/libthr/thread/thr_umtx.c:36 #2 0x20357910 in _thr_ucond_wait (cv=Variable "cv" is not available. ) at /data/builder/arm-current/head/lib/libthr/thread/thr_umtx.c:182 #3 0x20355464 in cond_wait_common (cond=Variable "cond" is not available. ) at /data/builder/arm-current/head/lib/libthr/thread/thr_cond.c:204 #4 0x20355600 in __pthread_cond_wait (cond=Variable "cond" is not available. ) at /data/builder/arm-current/head/lib/libthr/thread/thr_cond.c:228 #5 0x00153080 in run () #6 0x203495b0 in thread_start (curthread=0x208043c0) at /data/builder/arm-current/head/lib/libthr/thread/thr_create.c:288 #7 0x20349a20 in _pthread_create (thread=0x0, attr=0xbfffe8f8, start_routine=0x152d70 , arg=Variable "arg" is not available. ) at /data/builder/arm-current/head/lib/libthr/thread/thr_create.c:174 #8 0x2092b088 in ?? () (gdb) thread 3 [Switching to thread 3 (Thread 20804280 (LWP 100098))]#0 0x203ab558 in _umtx_op () at _umtx_op.S:3 3 RSYSCALL(_umtx_op) (gdb) bt #0 0x203ab558 in _umtx_op () at _umtx_op.S:3 #1 0x2035753c in _umtx_op_err (obj=Variable "obj" is not available. ) at /data/builder/arm-current/head/lib/libthr/thread/thr_umtx.c:36 #2 0x20357910 in _thr_ucond_wait (cv=Variable "cv" is not available. ) at /data/builder/arm-current/head/lib/libthr/thread/thr_umtx.c:182 #3 0x20355464 in cond_wait_common (cond=Variable "cond" is not available. ) at /data/builder/arm-current/head/lib/libthr/thread/thr_cond.c:204 #4 0x20355600 in __pthread_cond_wait (cond=Variable "cond" is not available. ) at /data/builder/arm-current/head/lib/libthr/thread/thr_cond.c:228 #5 0x0016379c in run () #6 0x203495b0 in thread_start (curthread=0x20804280) at /data/builder/arm-current/head/lib/libthr/thread/thr_create.c:288 #7 0x20349a20 in _pthread_create (thread=0x0, attr=0xbfffe8f8, start_routine=0x163724 , arg=Variable "arg" is not available. ) at /data/builder/arm-current/head/lib/libthr/thread/thr_create.c:174 #8 0x2092b088 in ?? () (gdb) thread 4 [Switching to thread 4 (Thread 20804140 (LWP 100053))]#0 0x0015755c in isc_atomic_cmpxchg () (gdb) bt #0 0x0015755c in isc_atomic_cmpxchg () #1 0x00157dac in isc_rwlock_lock () #2 0x000f9790 in dns_db_register () #3 0x0004d590 in dns_sdb_register () #4 0x0000c974 in ns_builtin_init () #5 0x0001aa90 in $a () #6 0x0001aa90 in $a () isc_atomic_cmpxchg really sounds quite interesting though. It is not only the crashing function it is also a type of function which sounds error prune. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 03:26:23 2010 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E24FB106568B; Fri, 19 Feb 2010 03:26:23 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 59C618FC12; Fri, 19 Feb 2010 03:26:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1J3M2Sg077389; Thu, 18 Feb 2010 20:22:02 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 18 Feb 2010 20:22:08 -0700 (MST) Message-Id: <20100218.202208.787670930824846481.imp@bsdimp.com> To: ticso@cicely.de, ticso@cicely7.cicely.de From: "M. Warner Losh" In-Reply-To: <20100219031200.GY43625@cicely7.cicely.de> References: <20100218124907.GG43625@cicely7.cicely.de> <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kostikbel@gmail.com, arm@FreeBSD.org, current@FreeBSD.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 03:26:24 -0000 In message: <20100219031200.GY43625@cicely7.cicely.de> Bernd Walter writes: : On Thu, Feb 18, 2010 at 03:10:10PM +0200, Kostik Belousov wrote: : > On Thu, Feb 18, 2010 at 01:49:07PM +0100, Bernd Walter wrote: : > > On Tue, Feb 16, 2010 at 07:39:51PM +0100, Bernd Walter wrote: : > > > On Mon, Feb 15, 2010 at 10:39:07PM +0100, Bernd Walter wrote: : > > > [55]Please.tell.me.who.am.I# gdb /usr/sbin/named named.core : > > > GNU gdb 6.1.1 [FreeBSD] : > > > Copyright 2004 Free Software Foundation, Inc. : > > > GDB is free software, covered by the GNU General Public License, and you are : > > > welcome to change it and/or distribute copies of it under certain conditions. : > > > Type "show copying" to see the conditions. : > > > There is absolutely no warranty for GDB. Type "show warranty" for details. : > > > This GDB was configured as "arm-marcel-freebsd"...(no debugging symbols found)... : > > > Core was generated by `named'. : > > > Program terminated with signal 5, Trace/breakpoint trap. : > > > Reading symbols from /lib/libcrypto.so.6...(no debugging symbols found)...done. : > > > Loaded symbols for /lib/libcrypto.so.6 : > > > Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done. : > > > Loaded symbols for /lib/libthr.so.3 : > > > Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. : > > > Loaded symbols for /lib/libc.so.7 : > > > Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. : > > > Loaded symbols for /libexec/ld-elf.so.1 : > > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 : > > > [New Thread 20804280 (LWP 100062)] : > > > [New Thread 20804140 (LWP 100052)] : > > > (gdb) bt : > > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 : > > > #1 0x203572b8 in _thread_bp_death () from /lib/libthr.so.3 : > > > #2 0x20349da4 in pthread_create () from /lib/libthr.so.3 : > > > #3 0x00164cb8 in ?? () : > > > (gdb) : > > > : > > > Do we have a general threading problem on ARM? : > > : > > I see two different type a crashes. : > > Both have in common that one or more threads are in _umtx_op. : > > Unfortunately I don't know enough details about those things to isolate : > > any more. : > > : > > the one from above: : > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 : > > [New Thread 20804280 (LWP 100062)] : > > [New Thread 20804140 (LWP 100052)] : > > (gdb) bt : > > #0 0x203571b0 in _thread_bp_create () from /lib/libthr.so.3 : > > #1 0x203572b8 in _thread_bp_death () from /lib/libthr.so.3 : > > #2 0x20349da4 in pthread_create () from /lib/libthr.so.3 : > > #3 0x00164cb8 in ?? () : > > (gdb) thread 1 : > > [Switching to thread 1 (Thread 20804280 (LWP 100062))]#0 0x203ab6f0 in _umtx_op () from /lib/libc.so.7 : > > (gdb) bt : > > #0 0x203ab6f0 in _umtx_op () from /lib/libc.so.7 : > > #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 : > > #2 0x20357cc0 in pthread_cleanup_push () from /lib/libthr.so.3 : > > #3 0x20349540 in pthread_getprio () from /lib/libthr.so.3 : > > #4 0x203499a0 in pthread_create () from /lib/libthr.so.3 : > > #5 0x00164cb8 in ?? () : > > : > > And another, which is what I get most of the time: : > > (gdb) thread 1 : > > [Switching to thread 1 (Thread 20804500 (LWP 100100))]#0 0x20435f28 in kevent () from /lib/libc.so.7 : > > (gdb) bt : > > #0 0x20435f28 in kevent () from /lib/libc.so.7 : > > #1 0x0014f2dc in ?? () : > > (gdb) thread 2 : > > [Switching to thread 2 (Thread 208043c0 (LWP 100099))]#0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 : > > (gdb) bt : > > #0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 : > > #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 : > > #2 0x20357a78 in pthread_cleanup_push () from /lib/libthr.so.3 : > > #3 0x20355580 in pthread_cond_signal () from /lib/libthr.so.3 : > > #4 0x00000000 in ?? () : > > (gdb) thread 3 : > > [Switching to thread 3 (Thread 20804280 (LWP 100098))]#0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 : > > (gdb) bt : > > #0 0x203ab6f4 in _umtx_op () from /lib/libc.so.7 : > > #1 0x2035769c in pthread_cleanup_push () from /lib/libthr.so.3 : > > #2 0x20357a78 in pthread_cleanup_push () from /lib/libthr.so.3 : > > #3 0x20355580 in pthread_cond_signal () from /lib/libthr.so.3 : > > #4 0x2092d008 in ?? () : > > (gdb) thread 4 : > > [Switching to thread 4 (Thread 20804140 (LWP 100043))]#0 0x0015755c in ?? () : > > (gdb) bt : > > #0 0x0015755c in ?? () : > : > Compile and install ld-elf.so, libc and libthr with debugging symbols: : > (cd libexec/rtld-elf && make all install DEBUG_FLAGS=-g) : > (cd lib/libc && make all install DEBUG_FLAGS=-g) : > (cd lib/libthr && make all install DEBUG_FLAGS=-g) : > : > Then repeat the crash and try to see where in code does it happen. : : Currently I can only get this type. : I've started the unstripped named to get all the function names. : : (gdb) thread 1 : [Switching to thread 1 (Thread 20804500 (LWP 100100))]#0 0x20435308 in kevent () at kevent.S:3 : 3 RSYSCALL(kevent) : Current language: auto; currently asm : (gdb) bt : #0 0x20435308 in kevent () at kevent.S:3 : #1 0x0014f2dc in watcher () : #2 0x203495b0 in thread_start (curthread=0x20804500) at /data/builder/arm-current/head/lib/libthr/thread/thr_create.c:288 : #3 0x20349a20 in _pthread_create (thread=0x2046caa8, attr=0xbfffe7f8, start_routine=0x14f2ac , arg=Variable "arg" is not available. : ) : at /data/builder/arm-current/head/lib/libthr/thread/thr_create.c:174 : #4 0x00000000 in ?? () : Cannot access memory at address 0x40 : (gdb) thread 2 : [Switching to thread 2 (Thread 208043c0 (LWP 100099))]#0 0x203ab558 in _umtx_op () at _umtx_op.S:3 : 3 RSYSCALL(_umtx_op) : (gdb) bt : #0 0x203ab558 in _umtx_op () at _umtx_op.S:3 : #1 0x2035753c in _umtx_op_err (obj=Variable "obj" is not available. : ) at /data/builder/arm-current/head/lib/libthr/thread/thr_umtx.c:36 : #2 0x20357910 in _thr_ucond_wait (cv=Variable "cv" is not available. : ) at /data/builder/arm-current/head/lib/libthr/thread/thr_umtx.c:182 : #3 0x20355464 in cond_wait_common (cond=Variable "cond" is not available. : ) at /data/builder/arm-current/head/lib/libthr/thread/thr_cond.c:204 : #4 0x20355600 in __pthread_cond_wait (cond=Variable "cond" is not available. : ) at /data/builder/arm-current/head/lib/libthr/thread/thr_cond.c:228 : #5 0x00153080 in run () : #6 0x203495b0 in thread_start (curthread=0x208043c0) at /data/builder/arm-current/head/lib/libthr/thread/thr_create.c:288 : #7 0x20349a20 in _pthread_create (thread=0x0, attr=0xbfffe8f8, start_routine=0x152d70 , arg=Variable "arg" is not available. : ) : at /data/builder/arm-current/head/lib/libthr/thread/thr_create.c:174 : #8 0x2092b088 in ?? () : (gdb) thread 3 : [Switching to thread 3 (Thread 20804280 (LWP 100098))]#0 0x203ab558 in _umtx_op () at _umtx_op.S:3 : 3 RSYSCALL(_umtx_op) : (gdb) bt : #0 0x203ab558 in _umtx_op () at _umtx_op.S:3 : #1 0x2035753c in _umtx_op_err (obj=Variable "obj" is not available. : ) at /data/builder/arm-current/head/lib/libthr/thread/thr_umtx.c:36 : #2 0x20357910 in _thr_ucond_wait (cv=Variable "cv" is not available. : ) at /data/builder/arm-current/head/lib/libthr/thread/thr_umtx.c:182 : #3 0x20355464 in cond_wait_common (cond=Variable "cond" is not available. : ) at /data/builder/arm-current/head/lib/libthr/thread/thr_cond.c:204 : #4 0x20355600 in __pthread_cond_wait (cond=Variable "cond" is not available. : ) at /data/builder/arm-current/head/lib/libthr/thread/thr_cond.c:228 : #5 0x0016379c in run () : #6 0x203495b0 in thread_start (curthread=0x20804280) at /data/builder/arm-current/head/lib/libthr/thread/thr_create.c:288 : #7 0x20349a20 in _pthread_create (thread=0x0, attr=0xbfffe8f8, start_routine=0x163724 , arg=Variable "arg" is not available. : ) : at /data/builder/arm-current/head/lib/libthr/thread/thr_create.c:174 : #8 0x2092b088 in ?? () : (gdb) thread 4 : [Switching to thread 4 (Thread 20804140 (LWP 100053))]#0 0x0015755c in isc_atomic_cmpxchg () : (gdb) bt : #0 0x0015755c in isc_atomic_cmpxchg () : #1 0x00157dac in isc_rwlock_lock () : #2 0x000f9790 in dns_db_register () : #3 0x0004d590 in dns_sdb_register () : #4 0x0000c974 in ns_builtin_init () : #5 0x0001aa90 in $a () : #6 0x0001aa90 in $a () : : isc_atomic_cmpxchg really sounds quite interesting though. : It is not only the crashing function it is also a type of function which : sounds error prune. ARM atomics require the help of the kernel to get right... Warner From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 03:30:05 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DA76106566C; Fri, 19 Feb 2010 03:30:05 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id BCDCE8FC12; Fri, 19 Feb 2010 03:30:04 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1J3U3Ps071553 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Feb 2010 04:30:03 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1J3U06m086392 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 04:30:00 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1J3U02O089265; Fri, 19 Feb 2010 04:30:00 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1J3U0xb089264; Fri, 19 Feb 2010 04:30:00 +0100 (CET) (envelope-from ticso) Date: Fri, 19 Feb 2010 04:30:00 +0100 From: Bernd Walter To: Kostik Belousov , imp@freebsd.org Message-ID: <20100219033000.GZ43625@cicely7.cicely.de> References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> <20100218124907.GG43625@cicely7.cicely.de> <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100219031200.GY43625@cicely7.cicely.de> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: arm@freebsd.org, Bernd Walter , ticso@cicely.de, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 03:30:05 -0000 On Fri, Feb 19, 2010 at 04:12:00AM +0100, Bernd Walter wrote: > On Thu, Feb 18, 2010 at 03:10:10PM +0200, Kostik Belousov wrote: > > On Thu, Feb 18, 2010 at 01:49:07PM +0100, Bernd Walter wrote: > > > On Tue, Feb 16, 2010 at 07:39:51PM +0100, Bernd Walter wrote: > > > > On Mon, Feb 15, 2010 at 10:39:07PM +0100, Bernd Walter wrote: > [Switching to thread 4 (Thread 20804140 (LWP 100053))]#0 0x0015755c in isc_atomic_cmpxchg () > (gdb) bt > #0 0x0015755c in isc_atomic_cmpxchg () > #1 0x00157dac in isc_rwlock_lock () > #2 0x000f9790 in dns_db_register () > #3 0x0004d590 in dns_sdb_register () > #4 0x0000c974 in ns_builtin_init () > #5 0x0001aa90 in $a () > #6 0x0001aa90 in $a () > > isc_atomic_cmpxchg really sounds quite interesting though. > It is not only the crashing function it is also a type of function which > sounds error prune. For me it looks like a bug in bind itself. It is in contrib/bind9/lib/isc/arm/include/isc/atomic.h. My assumption is that either the assembly is broken or it gets an invalid pointer. I'm not very expirienced with ARM assembly. Warner - it names you in the copyright, so very likely you know this code. I will build a debug version of bind, but as usual it will take some time... -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 03:44:50 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EDD41065693; Fri, 19 Feb 2010 03:44:50 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 4D9248FC26; Fri, 19 Feb 2010 03:44:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1J3e6x9077557; Thu, 18 Feb 2010 20:40:06 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 18 Feb 2010 20:40:12 -0700 (MST) Message-Id: <20100218.204012.468378203358324036.imp@bsdimp.com> To: ticso@cicely.de, ticso@cicely7.cicely.de From: "M. Warner Losh" In-Reply-To: <20100219033000.GZ43625@cicely7.cicely.de> References: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> <20100219033000.GZ43625@cicely7.cicely.de> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kostikbel@gmail.com, arm@freebsd.org, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 03:44:50 -0000 In message: <20100219033000.GZ43625@cicely7.cicely.de> Bernd Walter writes: : On Fri, Feb 19, 2010 at 04:12:00AM +0100, Bernd Walter wrote: : > On Thu, Feb 18, 2010 at 03:10:10PM +0200, Kostik Belousov wrote: : > > On Thu, Feb 18, 2010 at 01:49:07PM +0100, Bernd Walter wrote: : > > > On Tue, Feb 16, 2010 at 07:39:51PM +0100, Bernd Walter wrote: : > > > > On Mon, Feb 15, 2010 at 10:39:07PM +0100, Bernd Walter wrote: : > [Switching to thread 4 (Thread 20804140 (LWP 100053))]#0 0x0015755c in isc_atomic_cmpxchg () : > (gdb) bt : > #0 0x0015755c in isc_atomic_cmpxchg () : > #1 0x00157dac in isc_rwlock_lock () : > #2 0x000f9790 in dns_db_register () : > #3 0x0004d590 in dns_sdb_register () : > #4 0x0000c974 in ns_builtin_init () : > #5 0x0001aa90 in $a () : > #6 0x0001aa90 in $a () : > : > isc_atomic_cmpxchg really sounds quite interesting though. : > It is not only the crashing function it is also a type of function which : > sounds error prune. : : For me it looks like a bug in bind itself. : It is in contrib/bind9/lib/isc/arm/include/isc/atomic.h. : My assumption is that either the assembly is broken or it gets an : invalid pointer. : I'm not very expirienced with ARM assembly. : Warner - it names you in the copyright, so very likely you know this code. : I will build a debug version of bind, but as usual it will take some : time... Damn. It wasn't me. Oh, wait, maybe it was... I'll try to look at it tomorrow... Warner From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 03:47:37 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E836D106568D; Fri, 19 Feb 2010 03:47:36 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 8B7228FC19; Fri, 19 Feb 2010 03:47:36 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1J3lZXs073366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Feb 2010 04:47:35 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1J3lQxR086996 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 04:47:26 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1J3lPOJ089357; Fri, 19 Feb 2010 04:47:25 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1J3lPDV089356; Fri, 19 Feb 2010 04:47:25 +0100 (CET) (envelope-from ticso) Date: Fri, 19 Feb 2010 04:47:25 +0100 From: Bernd Walter To: Kostik Belousov , imp@freebsd.org Message-ID: <20100219034725.GA43625@cicely7.cicely.de> References: <20100215213907.GA43625@cicely7.cicely.de> <20100216183951.GI43625@cicely7.cicely.de> <20100218124907.GG43625@cicely7.cicely.de> <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> <20100219033000.GZ43625@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100219033000.GZ43625@cicely7.cicely.de> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: arm@freebsd.org, Bernd Walter , ticso@cicely.de, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 03:47:37 -0000 On Fri, Feb 19, 2010 at 04:30:00AM +0100, Bernd Walter wrote: > On Fri, Feb 19, 2010 at 04:12:00AM +0100, Bernd Walter wrote: > > On Thu, Feb 18, 2010 at 03:10:10PM +0200, Kostik Belousov wrote: > > > On Thu, Feb 18, 2010 at 01:49:07PM +0100, Bernd Walter wrote: > > > > On Tue, Feb 16, 2010 at 07:39:51PM +0100, Bernd Walter wrote: > > > > > On Mon, Feb 15, 2010 at 10:39:07PM +0100, Bernd Walter wrote: > > [Switching to thread 4 (Thread 20804140 (LWP 100053))]#0 0x0015755c in isc_atomic_cmpxchg () > > (gdb) bt > > #0 0x0015755c in isc_atomic_cmpxchg () > > #1 0x00157dac in isc_rwlock_lock () > > #2 0x000f9790 in dns_db_register () > > #3 0x0004d590 in dns_sdb_register () > > #4 0x0000c974 in ns_builtin_init () > > #5 0x0001aa90 in $a () > > #6 0x0001aa90 in $a () > > > > isc_atomic_cmpxchg really sounds quite interesting though. > > It is not only the crashing function it is also a type of function which > > sounds error prune. > > For me it looks like a bug in bind itself. > It is in contrib/bind9/lib/isc/arm/include/isc/atomic.h. > My assumption is that either the assembly is broken or it gets an > invalid pointer. > I'm not very expirienced with ARM assembly. > Warner - it names you in the copyright, so very likely you know this code. > I will build a debug version of bind, but as usual it will take some > time... Maybe it helps in the meanwhile: (gdb) disassemble 0x0015755c Dump of assembler code for function isc_atomic_cmpxchg: 0x00157550 : mov r3, r0 0x00157554 : sub r0, pc, #8 ; 0x8 0x00157558 : mov r12, #-536870908 ; 0xe0000004 0x0015755c : str r0, [r12] 0x00157560 : mov r12, #-536870904 ; 0xe0000008 0x00157564 : add r0, pc, #12 ; 0xc 0x00157568 : str r0, [r12] 0x0015756c : ldr r0, [r3] 0x00157570 : cmp r0, r1 0x00157574 : streq r2, [r3] 0x00157578 : mov r1, #0 ; 0x0 0x0015757c : mov r12, #-536870908 ; 0xe0000004 0x00157580 : str r1, [r12] 0x00157584 : mvn r1, #0 ; 0x0 0x00157588 : mov r12, #-536870904 ; 0xe0000008 0x0015758c : str r1, [r12] 0x00157590 : mov pc, lr End of assembler dump. Seems to be the str in line 57, which is crashing. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 03:50:47 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 423FC1065670; Fri, 19 Feb 2010 03:50:47 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id A18DE8FC19; Fri, 19 Feb 2010 03:50:46 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1J3ogfG073824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Feb 2010 04:50:42 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1J3odxr087047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 04:50:39 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1J3od4u089369; Fri, 19 Feb 2010 04:50:39 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1J3oc2r089368; Fri, 19 Feb 2010 04:50:38 +0100 (CET) (envelope-from ticso) Date: Fri, 19 Feb 2010 04:50:38 +0100 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20100219035038.GB43625@cicely7.cicely.de> References: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> <20100219033000.GZ43625@cicely7.cicely.de> <20100218.204012.468378203358324036.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100218.204012.468378203358324036.imp@bsdimp.com> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: kostikbel@gmail.com, arm@freebsd.org, ticso@cicely7.cicely.de, ticso@cicely.de, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 03:50:47 -0000 On Thu, Feb 18, 2010 at 08:40:12PM -0700, M. Warner Losh wrote: > In message: <20100219033000.GZ43625@cicely7.cicely.de> > Bernd Walter writes: > : On Fri, Feb 19, 2010 at 04:12:00AM +0100, Bernd Walter wrote: > : > On Thu, Feb 18, 2010 at 03:10:10PM +0200, Kostik Belousov wrote: > : > > On Thu, Feb 18, 2010 at 01:49:07PM +0100, Bernd Walter wrote: > : > > > On Tue, Feb 16, 2010 at 07:39:51PM +0100, Bernd Walter wrote: > : > > > > On Mon, Feb 15, 2010 at 10:39:07PM +0100, Bernd Walter wrote: > : > [Switching to thread 4 (Thread 20804140 (LWP 100053))]#0 0x0015755c in isc_atomic_cmpxchg () > : > (gdb) bt > : > #0 0x0015755c in isc_atomic_cmpxchg () > : > #1 0x00157dac in isc_rwlock_lock () > : > #2 0x000f9790 in dns_db_register () > : > #3 0x0004d590 in dns_sdb_register () > : > #4 0x0000c974 in ns_builtin_init () > : > #5 0x0001aa90 in $a () > : > #6 0x0001aa90 in $a () > : > > : > isc_atomic_cmpxchg really sounds quite interesting though. > : > It is not only the crashing function it is also a type of function which > : > sounds error prune. > : > : For me it looks like a bug in bind itself. > : It is in contrib/bind9/lib/isc/arm/include/isc/atomic.h. > : My assumption is that either the assembly is broken or it gets an > : invalid pointer. > : I'm not very expirienced with ARM assembly. > : Warner - it names you in the copyright, so very likely you know this code. > : I will build a debug version of bind, but as usual it will take some > : time... > > Damn. It wasn't me. > > Oh, wait, maybe it was... :-) > I'll try to look at it tomorrow... Thank you. Recompiling libbind and named with debug support also takes some time. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 03:54:50 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 073DB106566C; Fri, 19 Feb 2010 03:54:50 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 6B5D58FC16; Fri, 19 Feb 2010 03:54:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1J3lX5a077608; Thu, 18 Feb 2010 20:47:33 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 18 Feb 2010 20:47:39 -0700 (MST) Message-Id: <20100218.204739.680961627231021262.imp@bsdimp.com> To: ticso@cicely.de, ticso@cicely7.cicely.de From: "M. Warner Losh" In-Reply-To: <20100219033000.GZ43625@cicely7.cicely.de> References: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> <20100219033000.GZ43625@cicely7.cicely.de> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kostikbel@gmail.com, arm@freebsd.org, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 03:54:50 -0000 In message: <20100219033000.GZ43625@cicely7.cicely.de> Bernd Walter writes: : Warner - it names you in the copyright, so very likely you know this code. : I will build a debug version of bind, but as usual it will take some : time... Make sure that the code matches our current atomics code... Warner From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 04:12:16 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FAA1106566B; Fri, 19 Feb 2010 04:12:16 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 889618FC0A; Fri, 19 Feb 2010 04:12:15 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1J4CAMX075771 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Feb 2010 05:12:11 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1J4C6Gh087983 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 05:12:06 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1J4C6Qr089496; Fri, 19 Feb 2010 05:12:06 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1J4C6c0089495; Fri, 19 Feb 2010 05:12:06 +0100 (CET) (envelope-from ticso) Date: Fri, 19 Feb 2010 05:12:06 +0100 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20100219041200.GC43625@cicely7.cicely.de> References: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> <20100219033000.GZ43625@cicely7.cicely.de> <20100218.204739.680961627231021262.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100218.204739.680961627231021262.imp@bsdimp.com> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: kostikbel@gmail.com, arm@freebsd.org, ticso@cicely7.cicely.de, ticso@cicely.de, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 04:12:16 -0000 On Thu, Feb 18, 2010 at 08:47:39PM -0700, M. Warner Losh wrote: > In message: <20100219033000.GZ43625@cicely7.cicely.de> > Bernd Walter writes: > : Warner - it names you in the copyright, so very likely you know this code. > : I will build a debug version of bind, but as usual it will take some > : time... > > Make sure that the code matches our current atomics code... There are just 3 functions. isc_atomic_xadd and isc_atomic_store just wrap to atomic_fetchadd_int and atomic_store_rel_int isc_atomic_cmpxchg is inline assembly, but I don't think we have such a function in our ARM atomic.h - at least I can't find it. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 12:08:03 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5DC51065693; Fri, 19 Feb 2010 12:08:03 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 77E418FC0C; Fri, 19 Feb 2010 12:08:02 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1JC7wWf000856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Feb 2010 13:07:58 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1JC7uYP003806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 13:07:56 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1JC7tpZ091433; Fri, 19 Feb 2010 13:07:55 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1JC7ttD091432; Fri, 19 Feb 2010 13:07:55 +0100 (CET) (envelope-from ticso) Date: Fri, 19 Feb 2010 13:07:55 +0100 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20100219120754.GE43625@cicely7.cicely.de> References: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> <20100219033000.GZ43625@cicely7.cicely.de> <20100218.204739.680961627231021262.imp@bsdimp.com> <20100219041200.GC43625@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100219041200.GC43625@cicely7.cicely.de> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: kostikbel@gmail.com, arm@freebsd.org, ticso@cicely7.cicely.de, ticso@cicely.de, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 12:08:04 -0000 On Fri, Feb 19, 2010 at 05:12:06AM +0100, Bernd Walter wrote: > On Thu, Feb 18, 2010 at 08:47:39PM -0700, M. Warner Losh wrote: > > In message: <20100219033000.GZ43625@cicely7.cicely.de> > > Bernd Walter writes: > > : Warner - it names you in the copyright, so very likely you know this code. > > : I will build a debug version of bind, but as usual it will take some > > : time... > > > > Make sure that the code matches our current atomics code... > > There are just 3 functions. > isc_atomic_xadd and isc_atomic_store just wrap to atomic_fetchadd_int and > atomic_store_rel_int > isc_atomic_cmpxchg is inline assembly, but I don't think we have such a > function in our ARM atomic.h - at least I can't find it. #0 0x0015521c in isc_atomic_cmpxchg (p=0x155214, cmpval=0, val=1) at atomic.h:75 75 } [New Thread 20804500 (LWP 100100)] [New Thread 208043c0 (LWP 100099)] [New Thread 20804280 (LWP 100098)] [New Thread 20804140 (LWP 100043)] (gdb) bt #0 0x0015521c in isc_atomic_cmpxchg (p=0x155214, cmpval=0, val=1) at atomic.h:75 #1 0x00155a20 in isc_rwlock_lock (rwl=0x1c0fd4, type=isc_rwlocktype_write) at /data/builder/arm-current/head/lib/bind/isc/../../../contrib/bind9/lib/isc/rwlock.c:325 #2 0x000f8144 in dns_db_register (name=0x173fe8 "_builtin", create=0x4d46c , driverarg=0x2092b078, mctx=0x2080e0c0, dbimp=0x2092b08c) at /data/builder/arm-current/head/lib/bind/dns/../../../contrib/bind9/lib/dns/db.c:821 #3 0x0004d0b4 in dns_sdb_register (drivername=0x173fe8 "_builtin", methods=Variable "methods" is not available. ) at /data/builder/arm-current/head/lib/bind/dns/../../../contrib/bind9/lib/dns/sdb.c:239 #4 0x0000c96c in ns_builtin_init () at /data/builder/arm-current/head/usr.sbin/named/../../contrib/bind9/bin/named/builtin.c:296 #5 0x0001a97c in $a () at /data/builder/arm-current/head/usr.sbin/named/../../contrib/bind9/bin/named/main.c:741 #6 0x0001a97c in $a () at /data/builder/arm-current/head/usr.sbin/named/../../contrib/bind9/bin/named/main.c:741 (gdb) print p $1 = (isc_int32_t *) 0x155214 (gdb) print *p $2 = -498139128 (gdb) Initially it looks like a valid pointer. But it also looks like a pointer in codespace, which of course would be non-writeable and can't be updated. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 12:29:55 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 224991065670; Fri, 19 Feb 2010 12:29:55 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id 834E08FC13; Fri, 19 Feb 2010 12:29:54 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id 55111C42D5; Fri, 19 Feb 2010 13:31:50 +0100 (CET) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id klw-P2BF3bim; Fri, 19 Feb 2010 13:31:49 +0100 (CET) Received: from [192.168.1.12] (actn191.neoplus.adsl.tpnet.pl [83.11.67.191]) by smtp.semihalf.com (Postfix) with ESMTPA id B9E53C42D4; Fri, 19 Feb 2010 13:31:47 +0100 (CET) Message-ID: <4B7E840F.2040709@semihalf.com> Date: Fri, 19 Feb 2010 13:29:03 +0100 From: Grzegorz Bernacki User-Agent: Thunderbird 2.0.0.16 (X11/20090618) MIME-Version: 1.0 To: ticso@cicely.de References: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> <20100219033000.GZ43625@cicely7.cicely.de> <20100218.204739.680961627231021262.imp@bsdimp.com> <20100219041200.GC43625@cicely7.cicely.de> <20100219120754.GE43625@cicely7.cicely.de> In-Reply-To: <20100219120754.GE43625@cicely7.cicely.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kostikbel@gmail.com, arm@freebsd.org, ticso@cicely7.cicely.de, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 12:29:55 -0000 Bernd Walter wrote: > On Fri, Feb 19, 2010 at 05:12:06AM +0100, Bernd Walter wrote: >> On Thu, Feb 18, 2010 at 08:47:39PM -0700, M. Warner Losh wrote: >>> In message: <20100219033000.GZ43625@cicely7.cicely.de> >>> Bernd Walter writes: >>> : Warner - it names you in the copyright, so very likely you know this code. >>> : I will build a debug version of bind, but as usual it will take some >>> : time... >>> >>> Make sure that the code matches our current atomics code... >> There are just 3 functions. >> isc_atomic_xadd and isc_atomic_store just wrap to atomic_fetchadd_int and >> atomic_store_rel_int >> isc_atomic_cmpxchg is inline assembly, but I don't think we have such a >> function in our ARM atomic.h - at least I can't find it. > > #0 0x0015521c in isc_atomic_cmpxchg (p=0x155214, cmpval=0, val=1) at atomic.h:75 > 75 } > [New Thread 20804500 (LWP 100100)] > [New Thread 208043c0 (LWP 100099)] > [New Thread 20804280 (LWP 100098)] > [New Thread 20804140 (LWP 100043)] > (gdb) bt > #0 0x0015521c in isc_atomic_cmpxchg (p=0x155214, cmpval=0, val=1) at atomic.h:75 > #1 0x00155a20 in isc_rwlock_lock (rwl=0x1c0fd4, type=isc_rwlocktype_write) > at /data/builder/arm-current/head/lib/bind/isc/../../../contrib/bind9/lib/isc/rwlock.c:325 > #2 0x000f8144 in dns_db_register (name=0x173fe8 "_builtin", create=0x4d46c , driverarg=0x2092b078, > mctx=0x2080e0c0, dbimp=0x2092b08c) at /data/builder/arm-current/head/lib/bind/dns/../../../contrib/bind9/lib/dns/db.c:821 > #3 0x0004d0b4 in dns_sdb_register (drivername=0x173fe8 "_builtin", methods=Variable "methods" is not available. > ) > at /data/builder/arm-current/head/lib/bind/dns/../../../contrib/bind9/lib/dns/sdb.c:239 > #4 0x0000c96c in ns_builtin_init () at /data/builder/arm-current/head/usr.sbin/named/../../contrib/bind9/bin/named/builtin.c:296 > #5 0x0001a97c in $a () at /data/builder/arm-current/head/usr.sbin/named/../../contrib/bind9/bin/named/main.c:741 > #6 0x0001a97c in $a () at /data/builder/arm-current/head/usr.sbin/named/../../contrib/bind9/bin/named/main.c:741 > (gdb) print p > $1 = (isc_int32_t *) 0x155214 > (gdb) print *p > $2 = -498139128 > (gdb) > > Initially it looks like a valid pointer. > But it also looks like a pointer in codespace, which of course would be > non-writeable and can't be updated. > Hi, Some time ago we changed an address of RAS. Probably that's the problem. Please try with patch below. grzesiek diff --git a/contrib/bind9/lib/isc/arm/include/isc/atomic.h b/contrib/bind9/lib/ index 6a6e984..2f12921 100644 --- a/contrib/bind9/lib/isc/arm/include/isc/atomic.h +++ b/contrib/bind9/lib/isc/arm/include/isc/atomic.h @@ -53,9 +53,9 @@ isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int __asm __volatile("1:\n" "adr %1, 1b\n" - "mov %0, #0xe0000004\n" + "mov %0, #0xffff1004\n" "str %1, [%0]\n" - "mov %0, #0xe0000008\n" + "mov %0, #0xffff1008\n" "adr %1, 2f\n" "str %1, [%0]\n" "ldr %1, [%2]\n" @@ -63,10 +63,10 @@ isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_i "streq %4, [%2]\n" "2:\n" "mov %3, #0\n" - "mov %0, #0xe0000004\n" + "mov %0, #0xffff1004\n" "str %3, [%0]\n" "mov %3, #0xffffffff\n" - "mov %0, #0xe0000008\n" + "mov %0, #0xffff1008\n" "str %3, [%0]\n" : "=r" (ras_start), "=r" (done) ,"+r" (p), "+r" (cmpval), "+r" (val) : : "memory"); From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 12:52:21 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACC13106566B; Fri, 19 Feb 2010 12:52:21 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 390BB8FC1D; Fri, 19 Feb 2010 12:52:20 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1JCqHLs002599 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Feb 2010 13:52:18 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1JCq6oR005249 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 13:52:07 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1JCq6TS091614; Fri, 19 Feb 2010 13:52:06 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1JCq6JB091613; Fri, 19 Feb 2010 13:52:06 +0100 (CET) (envelope-from ticso) Date: Fri, 19 Feb 2010 13:52:06 +0100 From: Bernd Walter To: Grzegorz Bernacki Message-ID: <20100219125206.GG43625@cicely7.cicely.de> References: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> <20100219033000.GZ43625@cicely7.cicely.de> <20100218.204739.680961627231021262.imp@bsdimp.com> <20100219041200.GC43625@cicely7.cicely.de> <20100219120754.GE43625@cicely7.cicely.de> <4B7E840F.2040709@semihalf.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B7E840F.2040709@semihalf.com> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: current@freebsd.org, ticso@cicely7.cicely.de, arm@freebsd.org, kostikbel@gmail.com, ticso@cicely.de Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 12:52:21 -0000 On Fri, Feb 19, 2010 at 01:29:03PM +0100, Grzegorz Bernacki wrote: > Bernd Walter wrote: > >On Fri, Feb 19, 2010 at 05:12:06AM +0100, Bernd Walter wrote: > >>On Thu, Feb 18, 2010 at 08:47:39PM -0700, M. Warner Losh wrote: > >>>In message: <20100219033000.GZ43625@cicely7.cicely.de> > >>> Bernd Walter writes: > >>>: Warner - it names you in the copyright, so very likely you know this > >>>code. > >>>: I will build a debug version of bind, but as usual it will take some > >>>: time... > >>> > >>>Make sure that the code matches our current atomics code... > >>There are just 3 functions. > >>isc_atomic_xadd and isc_atomic_store just wrap to atomic_fetchadd_int and > >>atomic_store_rel_int > >>isc_atomic_cmpxchg is inline assembly, but I don't think we have such a > >>function in our ARM atomic.h - at least I can't find it. > > > >#0 0x0015521c in isc_atomic_cmpxchg (p=0x155214, cmpval=0, val=1) at > >atomic.h:75 > >75 } > >[New Thread 20804500 (LWP 100100)] > >[New Thread 208043c0 (LWP 100099)] > >[New Thread 20804280 (LWP 100098)] > >[New Thread 20804140 (LWP 100043)] > >(gdb) bt > >#0 0x0015521c in isc_atomic_cmpxchg (p=0x155214, cmpval=0, val=1) at > >atomic.h:75 > >#1 0x00155a20 in isc_rwlock_lock (rwl=0x1c0fd4, type=isc_rwlocktype_write) > > at > > /data/builder/arm-current/head/lib/bind/isc/../../../contrib/bind9/lib/isc/rwlock.c:325 > >#2 0x000f8144 in dns_db_register (name=0x173fe8 "_builtin", > >create=0x4d46c , driverarg=0x2092b078, > > mctx=0x2080e0c0, dbimp=0x2092b08c) at > > /data/builder/arm-current/head/lib/bind/dns/../../../contrib/bind9/lib/dns/db.c:821 > >#3 0x0004d0b4 in dns_sdb_register (drivername=0x173fe8 "_builtin", > >methods=Variable "methods" is not available. > >) > > at > > /data/builder/arm-current/head/lib/bind/dns/../../../contrib/bind9/lib/dns/sdb.c:239 > >#4 0x0000c96c in ns_builtin_init () at > >/data/builder/arm-current/head/usr.sbin/named/../../contrib/bind9/bin/named/builtin.c:296 > >#5 0x0001a97c in $a () at > >/data/builder/arm-current/head/usr.sbin/named/../../contrib/bind9/bin/named/main.c:741 > >#6 0x0001a97c in $a () at > >/data/builder/arm-current/head/usr.sbin/named/../../contrib/bind9/bin/named/main.c:741 > >(gdb) print p > >$1 = (isc_int32_t *) 0x155214 > >(gdb) print *p > >$2 = -498139128 > >(gdb) > > > >Initially it looks like a valid pointer. > >But it also looks like a pointer in codespace, which of course would be > >non-writeable and can't be updated. > > > > Hi, > > Some time ago we changed an address of RAS. Probably that's the problem. > Please try > with patch below. I will try, but if p really points to codespace it should be a problem in a any of the calling functions. > grzesiek > > diff --git a/contrib/bind9/lib/isc/arm/include/isc/atomic.h > b/contrib/bind9/lib/ > index 6a6e984..2f12921 100644 > --- a/contrib/bind9/lib/isc/arm/include/isc/atomic.h > +++ b/contrib/bind9/lib/isc/arm/include/isc/atomic.h > @@ -53,9 +53,9 @@ isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, > isc_int > > __asm __volatile("1:\n" > "adr %1, 1b\n" > - "mov %0, #0xe0000004\n" > + "mov %0, #0xffff1004\n" > "str %1, [%0]\n" > - "mov %0, #0xe0000008\n" > + "mov %0, #0xffff1008\n" > "adr %1, 2f\n" > "str %1, [%0]\n" > "ldr %1, [%2]\n" > @@ -63,10 +63,10 @@ isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, > isc_i > "streq %4, [%2]\n" > "2:\n" > "mov %3, #0\n" > - "mov %0, #0xe0000004\n" > + "mov %0, #0xffff1004\n" > "str %3, [%0]\n" > "mov %3, #0xffffffff\n" > - "mov %0, #0xe0000008\n" > + "mov %0, #0xffff1008\n" > "str %3, [%0]\n" > : "=r" (ras_start), "=r" (done) > ,"+r" (p), "+r" (cmpval), "+r" (val) : : "memory"); > > -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 14:29:31 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78BDD1065676; Fri, 19 Feb 2010 14:29:31 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id DA1628FC18; Fri, 19 Feb 2010 14:29:30 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id BEB18C42D3; Fri, 19 Feb 2010 15:31:26 +0100 (CET) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id 0hoyyV0Xz2oR; Fri, 19 Feb 2010 15:31:26 +0100 (CET) Received: from [192.168.1.12] (actn191.neoplus.adsl.tpnet.pl [83.11.67.191]) by smtp.semihalf.com (Postfix) with ESMTPA id 11F32C42DB; Fri, 19 Feb 2010 15:31:21 +0100 (CET) Message-ID: <4B7EA013.90805@semihalf.com> Date: Fri, 19 Feb 2010 15:28:35 +0100 From: Grzegorz Bernacki User-Agent: Thunderbird 2.0.0.16 (X11/20090618) MIME-Version: 1.0 To: ticso@cicely.de References: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> <20100219033000.GZ43625@cicely7.cicely.de> <20100218.204739.680961627231021262.imp@bsdimp.com> <20100219041200.GC43625@cicely7.cicely.de> <20100219120754.GE43625@cicely7.cicely.de> <4B7E840F.2040709@semihalf.com> <20100219125206.GG43625@cicely7.cicely.de> In-Reply-To: <20100219125206.GG43625@cicely7.cicely.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kostikbel@gmail.com, arm@freebsd.org, ticso@cicely7.cicely.de, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 14:29:31 -0000 Bernd Walter wrote: > On Fri, Feb 19, 2010 at 01:29:03PM +0100, Grzegorz Bernacki wrote: >> Bernd Walter wrote: >>> On Fri, Feb 19, 2010 at 05:12:06AM +0100, Bernd Walter wrote: >>>> On Thu, Feb 18, 2010 at 08:47:39PM -0700, M. Warner Losh wrote: >>>>> In message: <20100219033000.GZ43625@cicely7.cicely.de> >>>>> Bernd Walter writes: >>>>> : Warner - it names you in the copyright, so very likely you know this >>>>> code. >>>>> : I will build a debug version of bind, but as usual it will take some >>>>> : time... >>>>> >>>>> Make sure that the code matches our current atomics code... >>>> There are just 3 functions. >>>> isc_atomic_xadd and isc_atomic_store just wrap to atomic_fetchadd_int and >>>> atomic_store_rel_int >>>> isc_atomic_cmpxchg is inline assembly, but I don't think we have such a >>>> function in our ARM atomic.h - at least I can't find it. >>> #0 0x0015521c in isc_atomic_cmpxchg (p=0x155214, cmpval=0, val=1) at >>> atomic.h:75 >>> 75 } >>> [New Thread 20804500 (LWP 100100)] >>> [New Thread 208043c0 (LWP 100099)] >>> [New Thread 20804280 (LWP 100098)] >>> [New Thread 20804140 (LWP 100043)] >>> (gdb) bt >>> #0 0x0015521c in isc_atomic_cmpxchg (p=0x155214, cmpval=0, val=1) at >>> atomic.h:75 >>> #1 0x00155a20 in isc_rwlock_lock (rwl=0x1c0fd4, type=isc_rwlocktype_write) >>> at >>> /data/builder/arm-current/head/lib/bind/isc/../../../contrib/bind9/lib/isc/rwlock.c:325 >>> #2 0x000f8144 in dns_db_register (name=0x173fe8 "_builtin", >>> create=0x4d46c , driverarg=0x2092b078, >>> mctx=0x2080e0c0, dbimp=0x2092b08c) at >>> /data/builder/arm-current/head/lib/bind/dns/../../../contrib/bind9/lib/dns/db.c:821 >>> #3 0x0004d0b4 in dns_sdb_register (drivername=0x173fe8 "_builtin", >>> methods=Variable "methods" is not available. >>> ) >>> at >>> /data/builder/arm-current/head/lib/bind/dns/../../../contrib/bind9/lib/dns/sdb.c:239 >>> #4 0x0000c96c in ns_builtin_init () at >>> /data/builder/arm-current/head/usr.sbin/named/../../contrib/bind9/bin/named/builtin.c:296 >>> #5 0x0001a97c in $a () at >>> /data/builder/arm-current/head/usr.sbin/named/../../contrib/bind9/bin/named/main.c:741 >>> #6 0x0001a97c in $a () at >>> /data/builder/arm-current/head/usr.sbin/named/../../contrib/bind9/bin/named/main.c:741 >>> (gdb) print p >>> $1 = (isc_int32_t *) 0x155214 >>> (gdb) print *p >>> $2 = -498139128 >>> (gdb) >>> >>> Initially it looks like a valid pointer. >>> But it also looks like a pointer in codespace, which of course would be >>> non-writeable and can't be updated. >>> >> Hi, >> >> Some time ago we changed an address of RAS. Probably that's the problem. >> Please try >> with patch below. > > I will try, but if p really points to codespace it should be a problem > in a any of the calling functions. > I think that gdb is lying. Function isc_rwlock_lock() calls isc_atomic_cmpxchg() like that: isc_atomic_cmpxchg(&rwl->cnt_and_flag, 0, WRITER_ACTIVE); rwl=0x1c0fd4 as you can see in backtrace above and cnt_and_flag is at offset 0x10 in rwl, so address of rwl->cnt_and_flag should be 0x1c0fd4+0x10 not 0x155214. Address of rwl should be in .bss section and 0x1c0fd4 looks good for me, so in this case a believe that gdb says true. At the begining of isc_atomic_cmpxchg() there is some like this: : sub r0, pc, #8 ; 0x8 it changes contents of r0 (which contained value of first parameter) to address of code, maybe gdb takes value of r0 and think that it contains value of first parameter. grzesiek From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 14:32:08 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69698106568F; Fri, 19 Feb 2010 14:32:08 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id 1FAE38FC1A; Fri, 19 Feb 2010 14:32:07 +0000 (UTC) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.3/8.14.3) with ESMTP id o1JEDGe3018273; Fri, 19 Feb 2010 08:13:16 -0600 (CST) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1266588796; bh=n/8xNTgYJpuMxY17+uBIyx/iV62v8yf6gJKGPlYTSC8=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=rL9A6V7Iuc+pkBWFZeZ7LDDkjuAfytskE37cSr7E4DW+fRik00K1tn0/k47dR9a0E 1Q9ZrGA+VDiXQk6FFj9OZnG1o6b/mYXG5t0Z2JM8C1IC66fKtaHESEQVDrXJRQZjmV V6foOvNhAAJmzWMDycpnDmdn8ImZepFP/xa27dKE= Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id o1JEDFpF018272; Fri, 19 Feb 2010 08:13:15 -0600 (CST) (envelope-from tinguely) Date: Fri, 19 Feb 2010 08:13:15 -0600 (CST) From: Mark Tinguely Message-Id: <201002191413.o1JEDFpF018272@casselton.net> To: gjb@semihalf.com, ticso@cicely.de In-Reply-To: <4B7E840F.2040709@semihalf.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.2 (casselton.net [127.0.0.1]); Fri, 19 Feb 2010 08:13:16 -0600 (CST) Cc: arm@freebsd.org, kostikbel@gmail.com, ticso@cicely7.cicely.de, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 14:32:08 -0000 > > Some time ago we changed an address of RAS. Probably that's the problem. Please try > with patch below. > > grzesiek Good job. IMO, ARM atomic.h should have cmpxchg and the other standard atomic routines so applications don't roll their own and they become stale. This will help application writers if we move the atomic commands from the ARMv4/ARMv5 ARM_RAS_START/ARM_RAS_END atomic method to ARMv6/ARMv7 ldrex/strex/clrex commands. --Mark Tinguely From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 14:38:32 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7FBD106566C; Fri, 19 Feb 2010 14:38:32 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 541BE8FC0A; Fri, 19 Feb 2010 14:38:31 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1JEcS18008264 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Feb 2010 15:38:28 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1JEcQFf008968 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 15:38:26 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1JEcQKe092072; Fri, 19 Feb 2010 15:38:26 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1JEcPnG092071; Fri, 19 Feb 2010 15:38:25 +0100 (CET) (envelope-from ticso) Date: Fri, 19 Feb 2010 15:38:25 +0100 From: Bernd Walter To: Mark Tinguely Message-ID: <20100219143824.GI43625@cicely7.cicely.de> References: <4B7E840F.2040709@semihalf.com> <201002191413.o1JEDFpF018272@casselton.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201002191413.o1JEDFpF018272@casselton.net> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: current@freebsd.org, ticso@cicely7.cicely.de, kostikbel@gmail.com, arm@freebsd.org, ticso@cicely.de Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 14:38:33 -0000 On Fri, Feb 19, 2010 at 08:13:15AM -0600, Mark Tinguely wrote: > > > > Some time ago we changed an address of RAS. Probably that's the problem. Please try > > with patch below. > > > > grzesiek > > Good job. > > IMO, ARM atomic.h should have cmpxchg and the other standard atomic routines > so applications don't roll their own and they become stale. You can see an explanation in svn log: r174206 | dougb | 2007-12-03 09:26:34 +0100 (Mon, 03 Dec 2007) | 10 lines Update this file so that BIND on ARM can actually work. I quote: The problem was, isc_atomic_cmpxchg() is almost like our atomic_cmpset_32(), except it expects the old value to be returned, whereas our atomic_cmpset_32 returns 1 on success, or 0 on failure. So I re-implemented something suitable. Submitted by: cognet Reviewed by: bsdimp ------------------------------------------------------------------------ r170349 | dougb | 2007-06-06 00:15:38 +0200 (Wed, 06 Jun 2007) | 5 lines Add a custom atomic.h file which implements the C versions of the code we already have assembly versions of. Written by: imp > This will help application writers if we move the atomic commands from the > ARMv4/ARMv5 ARM_RAS_START/ARM_RAS_END atomic method to ARMv6/ARMv7 > ldrex/strex/clrex commands. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 14:46:34 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 482C1106566B; Fri, 19 Feb 2010 14:46:34 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id ED2798FC17; Fri, 19 Feb 2010 14:46:33 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id 15AFDC42D4; Fri, 19 Feb 2010 15:48:30 +0100 (CET) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id hhYP3PwoprhR; Fri, 19 Feb 2010 15:48:29 +0100 (CET) Received: from [192.168.1.12] (acyv59.neoplus.adsl.tpnet.pl [83.11.205.59]) by smtp.semihalf.com (Postfix) with ESMTPA id 6CA9AC42D3; Fri, 19 Feb 2010 15:48:27 +0100 (CET) Message-ID: <4B7EA424.6090203@semihalf.com> Date: Fri, 19 Feb 2010 15:45:56 +0100 From: Grzegorz Bernacki User-Agent: Thunderbird 2.0.0.16 (X11/20090618) MIME-Version: 1.0 To: Mark Tinguely References: <201002191413.o1JEDFpF018272@casselton.net> In-Reply-To: <201002191413.o1JEDFpF018272@casselton.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: arm@freebsd.org, kostikbel@gmail.com, ticso@cicely7.cicely.de, ticso@cicely.de, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 14:46:34 -0000 Mark Tinguely wrote: >> Some time ago we changed an address of RAS. Probably that's the problem. Please try >> with patch below. >> >> grzesiek > > Good job. > > IMO, ARM atomic.h should have cmpxchg and the other standard atomic routines > so applications don't roll their own and they become stale. > Yes, I agree. grzesiek From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 16:28:48 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3875106566C; Fri, 19 Feb 2010 16:28:48 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 305C18FC08; Fri, 19 Feb 2010 16:28:47 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1JGSj78013832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Feb 2010 17:28:45 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1JGSgDh012898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 17:28:42 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1JGSgv4092524; Fri, 19 Feb 2010 17:28:42 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1JGSfIF092523; Fri, 19 Feb 2010 17:28:41 +0100 (CET) (envelope-from ticso) Date: Fri, 19 Feb 2010 17:28:40 +0100 From: Bernd Walter To: Grzegorz Bernacki Message-ID: <20100219162840.GJ43625@cicely7.cicely.de> References: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> <20100219033000.GZ43625@cicely7.cicely.de> <20100218.204739.680961627231021262.imp@bsdimp.com> <20100219041200.GC43625@cicely7.cicely.de> <20100219120754.GE43625@cicely7.cicely.de> <4B7E840F.2040709@semihalf.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <4B7E840F.2040709@semihalf.com> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: kostikbel@gmail.com, arm@freebsd.org, ticso@cicely7.cicely.de, ticso@cicely.de, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 16:28:48 -0000 On Fri, Feb 19, 2010 at 01:29:03PM +0100, Grzegorz Bernacki wrote: > Hi, >=20 > Some time ago we changed an address of RAS. Probably that's the problem.= =20 > Please try > with patch below. >=20 > grzesiek >=20 > diff --git a/contrib/bind9/lib/isc/arm/include/isc/atomic.h=20 > b/contrib/bind9/lib/ > index 6a6e984..2f12921 100644 > --- a/contrib/bind9/lib/isc/arm/include/isc/atomic.h > +++ b/contrib/bind9/lib/isc/arm/include/isc/atomic.h > @@ -53,9 +53,9 @@ isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval,= =20 > isc_int >=20 > __asm __volatile("1:\n" > "adr %1, 1b\n" > - "mov %0, #0xe0000004\n" > + "mov %0, #0xffff1004\n" > "str %1, [%0]\n" > - "mov %0, #0xe0000008\n" > + "mov %0, #0xffff1008\n" > "adr %1, 2f\n" > "str %1, [%0]\n" > "ldr %1, [%2]\n" > @@ -63,10 +63,10 @@ isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval= ,=20 > isc_i > "streq %4, [%2]\n" > "2:\n" > "mov %3, #0\n" > - "mov %0, #0xe0000004\n" > + "mov %0, #0xffff1004\n" > "str %3, [%0]\n" > "mov %3, #0xffffffff\n" > - "mov %0, #0xe0000008\n" > + "mov %0, #0xffff1008\n" > "str %3, [%0]\n" > : "=3Dr" (ras_start), "=3Dr" (done) > ,"+r" (p), "+r" (cmpval), "+r" (val) : : "memory"); Strange: cc -O -pipe -mcpu=3Darm9 -DVERSION=3D'"9.6.1-P3"' -DHAVE_CONFIG_H -D_REENTR= ANT -D_THREAD_SAFE -DLIBINTERFACE=3D51 -DLIBREVISION=3D1 -DLIBAGE=3D1 -DWAN= T_IPV6 -DOPENSSL -DUSE_MD5 -DNS_LOCALSTATEDIR=3D'"/var"' -DNS_SYSCONFDIR=3D= '"/etc/namedb"' -DNAMED_CONFFILE=3D'"/etc/namedb/named.conf"' -DRNDC_CONFFI= LE=3D'"/etc/namedb/rndc.conf"' -DRNDC_KEYFILE=3D'"/etc/namedb/rndc.key"' -I= /data/builder/arm-current/head/lib/bind/isc/.. -I/data/builder/arm-current/= head/lib/bind/isc/../../../contrib/bind9/lib/bind9/include -I/data/builder/= arm-current/head/lib/bind/isc/../../../contrib/bind9/lib/dns/include/dst -= I/data/builder/arm-current/head/lib/bind/isc/../../../contrib/bind9/lib/dns= /include -I/data/builder/arm-current/head/lib/bind/isc/../dns -I/data/buil= der/arm-current/head/lib/bind/isc/../../../contrib/bind9/lib/isccc/include = -I/data/builder/arm-current/head/lib/bind/isc/../../../contrib/bind9/lib/is= ccfg/include -I/data/builder/arm-current/head/lib/bind/isc/../../../contrib= /bind9/lib/isc/unix/include -I/data/builder/arm-current/head/lib/bind/isc/= =2E./../../contrib/bind9/lib/isc/pthreads/include -I/data/builder/arm-curr= ent/head/lib/bind/isc/../../../contrib/bind9/lib/isc/include -I/data/build= er/arm-current/head/lib/bind/isc/../isc -I/data/builder/arm-current/head/li= b/bind/isc/../../../contrib/bind9/lib/lwres/unix/include -I/data/builder/a= rm-current/head/lib/bind/isc/../../../contrib/bind9/lib/lwres/include -I/d= ata/builder/arm-current/head/lib/bind/isc/../lwres -I/data/builder/arm-curr= ent/head/lib/bind/isc/../../../contrib/bind9/lib/isc/unix/include -I/data/b= uilder/arm-current/head/lib/bind/isc/../../../contrib/bind9/lib/isc/pthread= s/include -I/data/builder/arm-current/head/lib/bind/isc/../../../contrib/bi= nd9/lib/isc/include -I/data/builder/arm-current/head/lib/bind/isc -I/data/b= uilder/arm-current/head/lib/bind/isc/../../../contrib/bind9/lib/isc/arm/inc= lude -g -std=3Dgnu99 -c /data/builder/arm-current/head/lib/bind/isc/../../= =2E./contrib/bind9/lib/isc/rwlock.c {standard input}: Assembler messages: {standard input}:69: Error: invalid constant -- `mov ip,#0xffff1004' {standard input}:71: Error: invalid constant -- `mov ip,#0xffff1008' {standard input}:79: Error: invalid constant -- `mov ip,#0xffff1004' {standard input}:82: Error: invalid constant -- `mov ip,#0xffff1008' *** Error code 1 Stop in /data/builder/arm-current/head/lib/bind/isc. *** Error code 1 Stop in /data/builder/arm-current/head/lib/bind. 8297.000u 387.000s 2:52:06.37 84.1% -1482+1914k 134+1455io 306pf+0w Exit 1 I fail to seee why the assembler sees it to be wrong. It is a valid hex value - what else should the assembler take care about? --=20 B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 16:49:03 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA330106566C; Fri, 19 Feb 2010 16:49:03 +0000 (UTC) (envelope-from mlfbsd@kanar.ci0.org) Received: from kanar.ci0.org (unknown [IPv6:2a01:e0b:1:50:40:63ff:feea:93a]) by mx1.freebsd.org (Postfix) with ESMTP id 4F7978FC1F; Fri, 19 Feb 2010 16:49:02 +0000 (UTC) Received: from kanar.ci0.org (pluxor@localhost [127.0.0.1]) by kanar.ci0.org (8.14.2/8.14.3) with ESMTP id o1JGnxCp008257; Fri, 19 Feb 2010 17:49:59 +0100 (CET) (envelope-from mlfbsd@kanar.ci0.org) Received: (from mlfbsd@localhost) by kanar.ci0.org (8.14.2/8.14.3/Submit) id o1JGnxNC008256; Fri, 19 Feb 2010 17:49:59 +0100 (CET) (envelope-from mlfbsd) Date: Fri, 19 Feb 2010 17:49:59 +0100 From: Olivier Houchard To: ticso@cicely.de Message-ID: <20100219164959.GA8131@ci0.org> References: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> <20100219033000.GZ43625@cicely7.cicely.de> <20100218.204739.680961627231021262.imp@bsdimp.com> <20100219041200.GC43625@cicely7.cicely.de> <20100219120754.GE43625@cicely7.cicely.de> <4B7E840F.2040709@semihalf.com> <20100219162840.GJ43625@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline In-Reply-To: <20100219162840.GJ43625@cicely7.cicely.de> User-Agent: Mutt/1.4.2.1i Cc: kostikbel@gmail.com, ticso@cicely7.cicely.de, arm@freebsd.org, current@freebsd.org Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 16:49:03 -0000 --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > > Strange: Not so much, the first values for ras_start/end were chosen to be immediate values, so you could just mov them, but the new one aren't. Try something like the patch attached instead (untested, I have no arm setup here, but you'll get the idea). Regards, Olivier --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="bind_atomic.h.diff" Index: contrib/bind9/lib/isc/arm/include/isc/atomic.h =================================================================== --- contrib/bind9/lib/isc/arm/include/isc/atomic.h (revision 203777) +++ contrib/bind9/lib/isc/arm/include/isc/atomic.h (working copy) @@ -49,26 +49,22 @@ static inline isc_int32_t isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) { - register int done, ras_start; + register int done, ras_start = #0xffff1004; __asm __volatile("1:\n" "adr %1, 1b\n" - "mov %0, #0xe0000004\n" "str %1, [%0]\n" - "mov %0, #0xe0000008\n" "adr %1, 2f\n" - "str %1, [%0]\n" + "str %1, [%0, #4]\n" "ldr %1, [%2]\n" "cmp %1, %3\n" "streq %4, [%2]\n" "2:\n" "mov %3, #0\n" - "mov %0, #0xe0000004\n" "str %3, [%0]\n" "mov %3, #0xffffffff\n" - "mov %0, #0xe0000008\n" - "str %3, [%0]\n" - : "=r" (ras_start), "=r" (done) + "str %3, [%0, #4]\n" + : "+r" (ras_start), "=r" (done) ,"+r" (p), "+r" (cmpval), "+r" (val) : : "memory"); return (done); --NzB8fVQJ5HfG6fxh-- From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 21:04:12 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A288106566C for ; Fri, 19 Feb 2010 21:04:12 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f223.google.com (mail-fx0-f223.google.com [209.85.220.223]) by mx1.freebsd.org (Postfix) with ESMTP id 03CCE8FC25 for ; Fri, 19 Feb 2010 21:04:11 +0000 (UTC) Received: by fxm23 with SMTP id 23so552278fxm.3 for ; Fri, 19 Feb 2010 13:04:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=LIRlUPBxDr9MtuccpntFIvHflg1CMlY4tJuICJeUbNw=; b=dHIx93wytDj5PKYlcCjwGFIFaSgoXmUE8FUio65lEv6kENU0OvaTSCwSlz+YcD5j9X TypH4mPzCf0PE3CMw8Wc/VwnaB0SwA6bQArJ+hOUrE4+pBxjKFmVcNoXIw+hF8acJMqZ BYvD1vOMjcqAqGBvwfz5NGMpvxP5EmPnF1koI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=t+C6gsPnRIHJ8XL0KRflW6KGdC4GDrCAnqVcoA8Y2+ulMns+Y4x0XwZvloDjb4DsMI DuO8CIZWJiMOKojoNqnfbbJqjBovj/F6r6B/nmhdyo/PCdoUGqZXrEjTPYDbAvdqBKyy yDVIQcfqF6q1fKRHEq77y3jQvaJcx0QuWtvb4= Received: by 10.103.50.36 with SMTP id c36mr1110076muk.26.1266611775140; Fri, 19 Feb 2010 12:36:15 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id s10sm2617544mue.24.2010.02.19.12.36.13 (version=SSLv3 cipher=RC4-MD5); Fri, 19 Feb 2010 12:36:14 -0800 (PST) Sender: Alexander Motin Message-ID: <4B7EF63C.7030008@FreeBSD.org> Date: Fri, 19 Feb 2010 22:36:12 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Norikatsu Shigemura References: <20100218023945.848cd01a.nork@FreeBSD.org> In-Reply-To: <20100218023945.848cd01a.nork@FreeBSD.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org, freebsd-current@FreeBSD.org Subject: Re: ATA_CAM-ed mvsata(4) on OpenRD-client X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 21:04:12 -0000 Hi. Norikatsu Shigemura wrote: > I got a OpenRD-client (Marvell 88F6281 SoC), and I'm tring to > make mvsata(4) ATA_CAM, like following: > > But I got following panic, my I help you? > In this time, I attached no devices to SATA/eSATA port. > - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > sata0: at mem 0xf1080000-0xf1085fff irq 21 on mbus0 > sata0: [MPSAFE] > sata0: [ITHREAD] > ata0: on sata0 > ata0: [MPSAFE] > ata0: [ITHREAD] > ata1: on sata0 > ata1: [MPSAFE] > ata1: [ITHREAD] > spin lock 0xc3766680 (fvH) held by 0xc3613b48 (tid -1061308344) too long > panic: spin lock held too long > KDB: enter: panic > [ thread pid 0 tid 100000 ] > Stopped at 0xc09dcb50 = kdb_enter+0x48: ldrb r15, [r15, r15, ror r15]! > db> A bit unexpected. > - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > So I tried to get following information: > - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > _mtx_lock_sleep() at 0xc09a6a24 = _mtx_lock_sleep+0x10 > scp=0xc09a6a24 rlv=0xc09a6c0c (0xc09a6c0c = _mtx_lock_flags+0x7c) > rsp=0xc0d62d14 rfp=0xc0d62d3c > r10=0xc0d62d70 r9=0xc09039a8 > r8=0x00000000 r7=0x00000851 r6=0xc0b47100 r5=0x00000000 > r4=0xc35dd974 > _mtx_lock_flags() at 0xc09a6ba0 = _mtx_lock_flags+0x10 > scp=0xc09a6ba0 rlv=0xc0903fac (0xc0903fac = xpt_sim_opened+0x17c) > rsp=0xc0d62d40 rfp=0xc0d62d68 > r8=0xc0bde8f0 r7=0xc090d4a4 > r6=0xc3765e00 r5=0xc0b47100 r4=0xc3766240 > xpt_sim_opened() at 0xc0903f3c = xpt_sim_opened+0x10c > scp=0xc0903f3c rlv=0xc0904068 (0xc0904068 = xpt_sim_opened+0x238) > rsp=0xc0d62d6c rfp=0xc0d62d88 > r10=0xc0bde904 r9=0xc0b47100 > r8=0x00000000 r7=0xc090d4a4 r6=0x00000080 r5=0x00000000 > r4=0x00000001 > xpt_sim_opened() at 0xc0904048 = xpt_sim_opened+0x218 > scp=0xc0904048 rlv=0xc0905940 (0xc0905940 = xpt_register_async+0xd0) > rsp=0xc0d62d8c rfp=0xc0d62e34 > xpt_register_async() at 0xc0905880 = xpt_register_async+0x10 > scp=0xc0905880 rlv=0xc090d484 (0xc090d484 = ata_get_xport+0x2198) > rsp=0xc0d62e38 rfp=0xc0d62e44 > r10=0x00000000 r9=0x00000000 > r8=0x005fffcc r7=0xc35593c0 r6=0xc0b62170 r5=0xc0be74d0 > r4=0x0000001c Even more unexpected. I've searched all sources for xpt_sim_opened() call and found only one place - in atapi-cam.c, which shouldn't be used in your case. You are using different sources, or there is a garbage in stack? -- Alexander Motin From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 21:38:22 2010 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A746D10656C9; Fri, 19 Feb 2010 21:38:22 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 4946C8FC13; Fri, 19 Feb 2010 21:38:21 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1JLcJ0c025726 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Feb 2010 22:38:20 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1JLcCRB023688 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 22:38:12 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1JLcBdP093819; Fri, 19 Feb 2010 22:38:11 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1JLcB37093818; Fri, 19 Feb 2010 22:38:11 +0100 (CET) (envelope-from ticso) Date: Fri, 19 Feb 2010 22:38:11 +0100 From: Bernd Walter To: Olivier Houchard Message-ID: <20100219213811.GN43625@cicely7.cicely.de> References: <20100218131010.GQ50403@deviant.kiev.zoral.com.ua> <20100219031200.GY43625@cicely7.cicely.de> <20100219033000.GZ43625@cicely7.cicely.de> <20100218.204739.680961627231021262.imp@bsdimp.com> <20100219041200.GC43625@cicely7.cicely.de> <20100219120754.GE43625@cicely7.cicely.de> <4B7E840F.2040709@semihalf.com> <20100219162840.GJ43625@cicely7.cicely.de> <20100219164959.GA8131@ci0.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100219164959.GA8131@ci0.org> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: current@freebsd.org, ticso@cicely7.cicely.de, arm@freebsd.org, kostikbel@gmail.com, ticso@cicely.de Subject: Re: bind fails with sig11 on start / pthread failure on ARM? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 21:38:22 -0000 On Fri, Feb 19, 2010 at 05:49:59PM +0100, Olivier Houchard wrote: > > > > Strange: > > > Not so much, the first values for ras_start/end were chosen to be immediate > values, so you could just mov them, but the new one aren't. > Try something like the patch attached instead (untested, I have no arm setup > here, but you'll get the idea). I just got an idea in wqhich direction to look, just to see a lot of fog there, but that's my problem. I'm not very good with ARM assembly and inline assembly, although I did know a goo amount of alpha, 6502, 68k, ... assembly. Anyway - your patch works (with minor fix): [213]Please.tell.me.who.am.I# host -a www.freebsd.org 127.0.0.1 Trying "www.freebsd.org" Using domain server: Name: 10.1.1.9 Address: 10.1.1.9#53 Aliases: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26655 ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 3, ADDITIONAL: 5 ;; QUESTION SECTION: ;www.freebsd.org. IN ANY ;; ANSWER SECTION: www.freebsd.org. 3600 IN MX 0 . www.freebsd.org. 3600 IN AAAA 2001:4f8:fff6::21 www.freebsd.org. 3600 IN A 69.147.83.33 ;; AUTHORITY SECTION: freebsd.org. 2019 IN NS ns3.isc-sns.info. freebsd.org. 2019 IN NS ns2.isc-sns.com. freebsd.org. 2019 IN NS ns1.isc-sns.net. ;; ADDITIONAL SECTION: ns3.isc-sns.info. 2019 IN A 63.243.194.1 ns3.isc-sns.info. 2019 IN AAAA 2001:5a0:10::1 ns2.isc-sns.com. 19745 IN A 38.103.2.1 ns1.isc-sns.net. 19745 IN A 72.52.71.1 ns1.isc-sns.net. 19745 IN AAAA 2001:470:1a::1 Received 284 bytes from 10.1.1.9#53 in 355 ms [214]Please.tell.me.who.am.I# > > Regards, > > Olivier > Index: contrib/bind9/lib/isc/arm/include/isc/atomic.h > =================================================================== > --- contrib/bind9/lib/isc/arm/include/isc/atomic.h (revision 203777) > +++ contrib/bind9/lib/isc/arm/include/isc/atomic.h (working copy) > @@ -49,26 +49,22 @@ > static inline isc_int32_t > isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) > { > - register int done, ras_start; > + register int done, ras_start = #0xffff1004; I had to remove the '#' in this line: register int done, ras_start = 0xffff1004; > > __asm __volatile("1:\n" > "adr %1, 1b\n" > - "mov %0, #0xe0000004\n" > "str %1, [%0]\n" > - "mov %0, #0xe0000008\n" > "adr %1, 2f\n" > - "str %1, [%0]\n" > + "str %1, [%0, #4]\n" > "ldr %1, [%2]\n" > "cmp %1, %3\n" > "streq %4, [%2]\n" > "2:\n" > "mov %3, #0\n" > - "mov %0, #0xe0000004\n" > "str %3, [%0]\n" > "mov %3, #0xffffffff\n" > - "mov %0, #0xe0000008\n" > - "str %3, [%0]\n" > - : "=r" (ras_start), "=r" (done) > + "str %3, [%0, #4]\n" > + : "+r" (ras_start), "=r" (done) > ,"+r" (p), "+r" (cmpval), "+r" (val) : : "memory"); > return (done); > -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Fri Feb 19 21:53:46 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9528F1065697; Fri, 19 Feb 2010 21:53:46 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 383EE8FC21; Fri, 19 Feb 2010 21:53:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1JLhCm3090429; Fri, 19 Feb 2010 14:43:12 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 19 Feb 2010 14:43:19 -0700 (MST) Message-Id: <20100219.144319.445644096935635490.imp@bsdimp.com> To: mav@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <4B7EF63C.7030008@FreeBSD.org> References: <20100218023945.848cd01a.nork@FreeBSD.org> <4B7EF63C.7030008@FreeBSD.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org, freebsd-current@FreeBSD.org, nork@FreeBSD.org Subject: Re: ATA_CAM-ed mvsata(4) on OpenRD-client X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 21:53:46 -0000 In message: <4B7EF63C.7030008@FreeBSD.org> Alexander Motin writes: : Hi. : : Norikatsu Shigemura wrote: : > I got a OpenRD-client (Marvell 88F6281 SoC), and I'm tring to : > make mvsata(4) ATA_CAM, like following: : > : > But I got following panic, my I help you? : > In this time, I attached no devices to SATA/eSATA port. : > - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - : > sata0: at mem 0xf1080000-0xf1085fff irq 21 on mbus0 : > sata0: [MPSAFE] : > sata0: [ITHREAD] : > ata0: on sata0 : > ata0: [MPSAFE] : > ata0: [ITHREAD] : > ata1: on sata0 : > ata1: [MPSAFE] : > ata1: [ITHREAD] : > spin lock 0xc3766680 (fvH) held by 0xc3613b48 (tid -1061308344) too long : > panic: spin lock held too long : > KDB: enter: panic : > [ thread pid 0 tid 100000 ] : > Stopped at 0xc09dcb50 = kdb_enter+0x48: ldrb r15, [r15, r15, ror r15]! : > db> : : A bit unexpected. : : > - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - : > : > So I tried to get following information: : > - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - : > _mtx_lock_sleep() at 0xc09a6a24 = _mtx_lock_sleep+0x10 : > scp=0xc09a6a24 rlv=0xc09a6c0c (0xc09a6c0c = _mtx_lock_flags+0x7c) : > rsp=0xc0d62d14 rfp=0xc0d62d3c : > r10=0xc0d62d70 r9=0xc09039a8 : > r8=0x00000000 r7=0x00000851 r6=0xc0b47100 r5=0x00000000 : > r4=0xc35dd974 : > _mtx_lock_flags() at 0xc09a6ba0 = _mtx_lock_flags+0x10 : > scp=0xc09a6ba0 rlv=0xc0903fac (0xc0903fac = xpt_sim_opened+0x17c) : > rsp=0xc0d62d40 rfp=0xc0d62d68 : > r8=0xc0bde8f0 r7=0xc090d4a4 : > r6=0xc3765e00 r5=0xc0b47100 r4=0xc3766240 : > xpt_sim_opened() at 0xc0903f3c = xpt_sim_opened+0x10c : > scp=0xc0903f3c rlv=0xc0904068 (0xc0904068 = xpt_sim_opened+0x238) : > rsp=0xc0d62d6c rfp=0xc0d62d88 : > r10=0xc0bde904 r9=0xc0b47100 : > r8=0x00000000 r7=0xc090d4a4 r6=0x00000080 r5=0x00000000 : > r4=0x00000001 : > xpt_sim_opened() at 0xc0904048 = xpt_sim_opened+0x218 : > scp=0xc0904048 rlv=0xc0905940 (0xc0905940 = xpt_register_async+0xd0) : > rsp=0xc0d62d8c rfp=0xc0d62e34 : > xpt_register_async() at 0xc0905880 = xpt_register_async+0x10 : > scp=0xc0905880 rlv=0xc090d484 (0xc090d484 = ata_get_xport+0x2198) : > rsp=0xc0d62e38 rfp=0xc0d62e44 : > r10=0x00000000 r9=0x00000000 : > r8=0x005fffcc r7=0xc35593c0 r6=0xc0b62170 r5=0xc0be74d0 : > r4=0x0000001c : : Even more unexpected. I've searched all sources for xpt_sim_opened() : call and found only one place - in atapi-cam.c, which shouldn't be used : in your case. You are using different sources, or there is a garbage in : stack? IIRC, I got better stack traces when I used the kernel.tramp kernel... Warner From owner-freebsd-arm@FreeBSD.ORG Sat Feb 20 17:23:42 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 7BC1A106566C; Sat, 20 Feb 2010 17:23:41 +0000 (UTC) (envelope-from nork@FreeBSD.org) Date: Sun, 21 Feb 2010 02:23:40 +0900 From: Norikatsu Shigemura To: "M. Warner Losh" Message-Id: <20100221022340.13868db3.nork@FreeBSD.org> In-Reply-To: <20100219.144319.445644096935635490.imp@bsdimp.com> References: <20100218023945.848cd01a.nork@FreeBSD.org> <4B7EF63C.7030008@FreeBSD.org> <20100219.144319.445644096935635490.imp@bsdimp.com> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.5; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org, mav@FreeBSD.org, freebsd-current@FreeBSD.org, nork@FreeBSD.org Subject: Re: ATA_CAM-ed mvsata(4) on OpenRD-client X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 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, 20 Feb 2010 17:23:42 -0000 Hi Warner-san. On Fri, 19 Feb 2010 14:43:19 -0700 (MST) "M. Warner Losh" wrote: > : Even more unexpected. I've searched all sources for xpt_sim_opened() > : call and found only one place - in atapi-cam.c, which shouldn't be used > : in your case. You are using different sources, or there is a garbage in > : stack? > IIRC, I got better stack traces when I used the kernel.tramp kernel... How do I use kernel.tramp? I did 'tftpboot 0x900000 kernel.tramp.bin' on uboot, but it's freeze after 'go 0x900000'.