From owner-freebsd-arm@freebsd.org Wed Jul 8 16:58:25 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80A8A996151 for ; Wed, 8 Jul 2015 16:58:25 +0000 (UTC) (envelope-from vandervelde.ag@gmail.com) Received: from mail-qg0-x233.google.com (mail-qg0-x233.google.com [IPv6:2607:f8b0:400d:c04::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3AF65190C for ; Wed, 8 Jul 2015 16:58:25 +0000 (UTC) (envelope-from vandervelde.ag@gmail.com) Received: by qgef3 with SMTP id f3so52985795qge.0 for ; Wed, 08 Jul 2015 09:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=jy6apkqb0mu+H5hjcHdIe9NMhquvFwCpOpuELhNXtmA=; b=Ljae5jWG/0knXPECoiBqxBA8DthBfRcUzggiqlOCEcHNXw1EobduziuPw8zYTKMvUn l+7to1qqJIhRJK2ifbwnIAFNT8ACLJb0BdDJDBARCVZe1ZDpyRHgLpRWLrZd2JJkLbFv vj9gYIcRtXPPPN/Whb2fCNsL544C/GTcPcrQWdFnK2usBYSWb00P5x/wa2P95yWh2Kxn 4lGvR1YjEwV2qt7WKhVE4VQQDjhS99ekRPNjFR0XyNDWFDT7ygzgjVDdyF6E6lraYu15 H28J8ppGrrYVLn3vBKRAemAfby9O3N892USXceAq39ByLw5v3FI0yBv0P5MF6+pzGxID QWGw== X-Received: by 10.140.134.69 with SMTP id 66mr18920288qhg.51.1436374704214; Wed, 08 Jul 2015 09:58:24 -0700 (PDT) Received: from noresult.ad.umassmed.edu ([146.189.163.113]) by smtp.gmail.com with ESMTPSA id 3sm1647637qhc.19.2015.07.08.09.58.23 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 08 Jul 2015 09:58:23 -0700 (PDT) Subject: Re: STABLE "pfctl -s states" core dumps on Beaglebone Black (was -s rules) Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Arjan van der Velde In-Reply-To: Date: Wed, 8 Jul 2015 12:58:21 -0400 Cc: freebsd-arm Content-Transfer-Encoding: 7bit Message-Id: <4493DFFB-BAF9-46E8-9DB4-0EDA8E2475C0@gmail.com> References: <55762A9C.7080504@gmail.com> To: Guy Yur X-Mailer: Apple Mail (2.1085) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 16:58:25 -0000 Great! Thanks. On Jun 30, 2015, at 2:10 PM, Guy Yur wrote: > Hi, > > On Tue, Jun 9, 2015 at 2:51 AM, Arjan van der Velde > wrote: >> Ok, I meant to say "pfctl -s states" here. Sorry for the confusion. >> >> -- Arjan >> >> >> On 06/08/2015 16:54, Arjan van der Velde wrote: >>> >>> Hello, >>> >>> I'm running stable on my BBB and I noticed that pfctl core dumps when >>> doing "pfctl -s rules". I am on: >>> >>> FreeBSD beaglebone 10.1-STABLE FreeBSD 10.1-STABLE #1 r283308 >>> >>> gdb doesn't seem to give me any useful information. >>> >>> dmesg shows: pid 4192 (pfctl), uid 0: exited on signal 10 (core dumped) >>> >>> and gdb: >>> > (snip) >>> >>> >>> Is this a known issue? How would I go about analyzing the cause of this? > > > The cause for the core dump is unaligned access when trying to > copy struct pf_addr in print_host(). > The compiler expects the struct to be aligned on 4 bytes > (it contains a union of a u_int32_t array) but it is not > since it is passed from inside pfsync_state struct which > size is not divisible by 4. > > On the BeagleBone Black strict alignment fault checking is enabled. > > Discussion on the issue: > https://lists.freebsd.org/pipermail/freebsd-arm/2014-January/007237.html > > I filed bug report 185617 with changes that will break KBI: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=185617 > > >>> >>> Thanks. >>> >>> -- Arjan > > Regards, > -- Guy