From owner-freebsd-arm@freebsd.org Tue Jun 30 18:10:40 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 97FEB9909AF for ; Tue, 30 Jun 2015 18:10:40 +0000 (UTC) (envelope-from guyyur@gmail.com) Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) (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 621FB2000 for ; Tue, 30 Jun 2015 18:10:40 +0000 (UTC) (envelope-from guyyur@gmail.com) Received: by obdbs4 with SMTP id bs4so12107674obd.3 for ; Tue, 30 Jun 2015 11:10:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KNpRTa0aUtbCcpKkPs6rpBXdBlVFSZDDsXjmR7mc2ew=; b=xBMjebxT7Df/k4bGfxK15Y7BJf8ZoMT2ZlNFyCq9gwH6/9z4aZESgiVYeHRux7akmY 1ivGDOUTkdRaH4LqUWUjUuSC/rQrCdB/c4FvDaPBih/LLrQaymL+mWxnujKgPTMCanFz e3SSCztqCw0STQuBo94HeaYSPRxmJe0Df+pNKCks/0euFCyHeZkVKcDlIKmaazVWmM9o e4taCFiugX4P6vZfX2QERXLPRv2lllsQR8wH6Rv0Y/swn6kVuHqvRamotKRh+goS51er Zu4nQqJ/iXEIFVroQwCw3PKC66ukbZ/9/yd8gMou5WLB2TG+UFHezJGlo31VHHvMp8V5 HKpA== MIME-Version: 1.0 X-Received: by 10.202.0.212 with SMTP id 203mr14936817oia.58.1435687839340; Tue, 30 Jun 2015 11:10:39 -0700 (PDT) Received: by 10.76.56.242 with HTTP; Tue, 30 Jun 2015 11:10:39 -0700 (PDT) In-Reply-To: <55762A9C.7080504@gmail.com> References: <55762A9C.7080504@gmail.com> Date: Tue, 30 Jun 2015 21:10:39 +0300 Message-ID: Subject: Re: STABLE "pfctl -s states" core dumps on Beaglebone Black (was -s rules) From: Guy Yur To: Arjan van der Velde Cc: freebsd-arm Content-Type: text/plain; charset=UTF-8 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: Tue, 30 Jun 2015 18:10:40 -0000 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