Page MenuHomeFreeBSD

tcp: add asserts and safety in case no CC module is attached
AbandonedPublic

Authored by rscheff on Feb 11 2024, 5:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 7 2024, 3:51 PM
Unknown Object (File)
Jul 28 2024, 10:49 AM
Unknown Object (File)
Jul 20 2024, 6:27 AM
Unknown Object (File)
Jul 14 2024, 7:21 AM
Unknown Object (File)
Jun 5 2024, 7:50 PM
Unknown Object (File)
Jun 3 2024, 4:14 AM
Unknown Object (File)
May 19 2024, 10:04 AM
Unknown Object (File)
May 17 2024, 7:50 PM

Details

Reviewers
glebius
rrs
tuexen
cc
Group Reviewers
transport
Summary

While further troubleshooting PR276761, i encountered one instance
where the CC algo was gone already, when a retransmission timeout
timer fired. While that shouldn't happen, i think it's prudent
to not blindly follow potential NULL pointers when calling CC
functions.

The impact of checking the pointer should be minimal in all these instances.

[2475.559032] calltrap() at calltrap+0x8/frame 0xfffffe00ce8aac80
[2475.581285] --- trap 0xc, rip = 0xffffffff80d474c0, rsp = 0xfffffe00ce8aad50, rbp = 0xfffffe00ce8aad70 ---
[2475.603529] cc_cong_signal() at cc_cong_signal+0x1e0/frame 0xfffffe00ce8aad70
[2475.628033] tcp_timer_rexmt() at tcp_timer_rexmt+0x66b/frame 0xfffffe00ce8aadd0
[2475.651720] tcp_timer_enter() at tcp_timer_enter+0x15e/frame 0xfffffe00ce8aae10

(tp->t_cc was NULL)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 55941
Build 52830: arc lint + arc unit

Event Timeline

I think we should find the cause, where the CC module gone...

I agree we should rootcase the case. However - why do we need to perform these conditional checks everywhere?
Why can’t t_cc refer to the dummy cc structure? Why can’t the non-implemented/non-needed function point to no-op functions?

glebius requested changes to this revision.Feb 12 2024, 4:27 PM

Yes, we need to find the root cause instead. The patch can be used as a temporary solution for the bug report user affected.

This revision now requires changes to proceed.Feb 12 2024, 4:27 PM

Root cause was found, no need to keep this around