Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jun 2015 21:10:39 +0300
From:      Guy Yur <guyyur@gmail.com>
To:        Arjan van der Velde <vandervelde.ag@gmail.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: STABLE "pfctl -s states" core dumps on Beaglebone Black (was -s rules)
Message-ID:  <CAC67Hz8vchTUgoMcsubSp7bdvWhu%2BKfZvQqsTz1Y65f1J6eA1Q@mail.gmail.com>
In-Reply-To: <55762A9C.7080504@gmail.com>
References:  <CD502960-38E8-4336-867A-9E292ECBC438@gmail.com> <55762A9C.7080504@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Tue, Jun 9, 2015 at 2:51 AM, Arjan van der Velde
<vandervelde.ag@gmail.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAC67Hz8vchTUgoMcsubSp7bdvWhu%2BKfZvQqsTz1Y65f1J6eA1Q>