Re: CURRENT: kernel panic in IPFW while stopping jails

Alastair Hogge <[email protected]>
Newsgroups gmane.os.freebsd.current
Message-ID <[email protected]>
On 2025-12-26 17:32, A FreeBSD User wrote:
> Am Tage des Herren Thu, 25 Dec 2025 19:08:36 +0100
> FreeBSD User <[email protected]> schrieb:
> 
>> On Thu, 25 Dec 2025 18:30:45 +0100 (CET)
>> Ronald Klop <[email protected]> wrote:
>> 
>> > Do you use bpf or tap in your ipfw rules?
>> > A panic with that was mentioned on the 20th. And fixed in the mean time of I
>> > remember correctly. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291854
>> > Regards,Ronald  
>> 
>> Indeed, all boxes in question do have a tap0 at least defined -but in only one
>> case used.
>> 
>> Kind regards,
>> 
>> oh
>> 
>> 
>> > 
>> > Van: FreeBSD User <[email protected]>
>> > Datum: 25 december 2025 17:09
>> > Aan: FreeBSD CURRENT <[email protected]>
>> > Onderwerp: CURRENT: kernel panic in IPFW while stopping jails
>> >   
>> > > 
>> > > 
>> > > Hello,
>> > > 
>> > > on recent CURRENT ipfw (in my case compiled into kernel) either restarting
>> > > "ipfw" via "service ipfw restart" or restarting jails using also ipfw on a
>> > > host also using ipfw (jail-hoster also ipfw compiled into kernel) causes a
>> > > fatal kernel crash.
>> > > 
>> > > This issue is present since last week an wreak havok to several boxes with
>> > > OS installed on UFS/FFS SSDs. In one case I have only pictures/screenshots
>> > > made via smartphone - while crashing, kernel debugger input pops up on
>> > > console, but I'm able to typein something within the first seconds and this
>> > > is mostly "reboot" but gets stuck with "re" in most cases. "bt" freezes
>> > > system immediately.
>> > > 
>> > > At least I can reproduce this misbehaviour on all recent CURRENT were IPFW
>> > > is compiled into kernel. Anybody else havong this trouble?
>> > > 
>> > > Kind regards,
>> > > 
>> > > Oliver
>> > > 
>> > > Merry Christmas to everyone.
>> > > 
>> > > -- 
>> > > 
>> > > A FreeBSD user
>> > > 
>> > > 
>> > > 
>> > > 
>> > >     
>> 
>> 
> 
> tap0 disabled/deleted. Same issue on every box.

$ git bisect log
git bisect start
# status: waiting for both good and bad commits
# bad: [086bedb11a853801e82234b8a1a64f0df52d9e52] tools.build: also add
sys/_visible.h to SYSINCS
git bisect bad 086bedb11a853801e82234b8a1a64f0df52d9e52
# status: waiting for good commit(s), bad commit known
# good: [44cb1e857f048d2326bdc1a032ccd2c04d2bcdc9] tcp: improve
credential handling in syncache
git bisect good 44cb1e857f048d2326bdc1a032ccd2c04d2bcdc9
# good: [b0c7eaf83d21bbc333e247ab9e136965b3ca54ed] bhyve/slirp: Drop
privileges before entering capability mode
git bisect good b0c7eaf83d21bbc333e247ab9e136965b3ca54ed
# good: [6a75e3951506c12b42428a47710d07cadcdd723e] ofed/libibverbs:
remove strdupa() hack from config.h
git bisect good 6a75e3951506c12b42428a47710d07cadcdd723e
# bad: [1fad49baf390cb52f238e6c352d0bc0893c008c3] sdhci: Try to complete
the last transaction if dumping
git bisect bad 1fad49baf390cb52f238e6c352d0bc0893c008c3
# good: [9d9974457ce8c6cf9023884ab457d4712dcc237f] bhyvectl: fix build
without BHYVE_SNAPSHOT
git bisect good 9d9974457ce8c6cf9023884ab457d4712dcc237f
# bad: [52395203f9ac40d321ed55d93e9887300261d3bf] MFV: Import blocklist
2025-12-15 (8a4b011)
git bisect bad 52395203f9ac40d321ed55d93e9887300261d3bf
# good: [c112ad75605ccdfcb8bbce2f57b0e7a077f057f8] options: describe
WITH_IPFILTER_IPFS
git bisect good c112ad75605ccdfcb8bbce2f57b0e7a077f057f8
# good: [8774a990ee4094f16d596d4b78e0f3239e5d0c88] bpf: modularize
ifnet(9) part of bpf
git bisect good 8774a990ee4094f16d596d4b78e0f3239e5d0c88
# bad: [1615eff94cda8619561b73186ec8098cc8b14c5c] usb: don't create
ifnet(9) for usbus devices
git bisect bad 1615eff94cda8619561b73186ec8098cc8b14c5c
# good: [ddf4f9eda9c295082f17e7f26963666b72c97bb9] ipfw: create "ipfw0"
and "ipfwlog0" bpf tapping points without ifnet(9)
git bisect good ddf4f9eda9c295082f17e7f26963666b72c97bb9
# bad: [3daae1ac1d82ecdcd855101bab5206e914b12350] ipfw: create a bpf tap
point for every log rule
git bisect bad 3daae1ac1d82ecdcd855101bab5206e914b12350
# good: [1c5021f5251b231b614ad9cd175bcb4250495c12] ifconfig: print
warning and return success on ipfw0, ipfwlog0 cloning
git bisect good 1c5021f5251b231b614ad9cd175bcb4250495c12
# first bad commit: [3daae1ac1d82ecdcd855101bab5206e914b12350] ipfw:
create a bpf tap point for every log rule

https://codeberg.org/FreeBSD/freebsd-src/commit/3daae1ac1d82ecdcd855101bab5206e914b12350
ipfw: create a bpf tap point for every log rule

Dynamically allocate bpf tap points for every rule that has "log".
The name is "ipfw%u", where %u is substituted to the rule number.
The default catch all "ipfw0" tap still exists for compatibility
and it will catch packets in case if there are no bpf listeners
on a per-rule tap.

Reviewed by:		ae
Differential Revision:	https://reviews.freebsd.org/D53877
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.