Page MenuHomeFreeBSD

tcp: Need to take network epoch when calling tfb_tcp_fb_fini
ClosedPublic

Authored by gallatin on May 23 2021, 7:50 PM.

Details

Summary

I hit an assertion running the latest version of rack with WITNESS and INVARIANTS (below). It seems clear we need to enter the epoch before calling into tcp_fb_fini.

The assertion was:

panic: Assertion in_epoch(net_epoch_preempt) failed at /data/freebsd-20210522-merge/FreeBSD/sys/modules/tcp/latest/rack/../../../../netinet/tcp_stacks/rack_bbr_common.c:403
cpuid = 31
time = 1621735725
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe077a10f7d0
vpanic() at vpanic+0x181/frame 0xfffffe077a10f820
kassert_panic() at kassert_panic+0x16d/frame 0xfffffe077a10f8a0
ctf_process_inbound_raw() at ctf_process_inbound_raw+0x69/frame 0xfffffe077a10f930
ctf_do_queued_segments() at ctf_do_queued_segments+0x36/frame 0xfffffe077a10f940
rack_fini() at rack_fini+0x4d/frame 0xfffffe077a10f980
tcp_ctloutput() at tcp_ctloutput+0x222/frame 0xfffffe077a10f9f0
sosetopt() at sosetopt+0xb7/frame 0xfffffe077a10fa40
kern_setsockopt() at kern_setsockopt+0xa9/frame 0xfffffe077a10faa0
sys_setsockopt() at sys_setsockopt+0x24/frame 0xfffffe077a10fac0
amd64_syscall() at amd64_syscall+0x80d/frame 0xfffffe077a10fbf0
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe077a10fbf0

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.