Page MenuHomeFreeBSD

tcp: stop timers and clean scoreboard in tcp_close()
ClosedPublic

Authored by rscheff on Feb 8 2024, 1:18 PM.
Tags
None
Referenced Files
F102652239: D43792.diff
Fri, Nov 15, 9:12 AM
Unknown Object (File)
Wed, Oct 23, 2:44 AM
Unknown Object (File)
Mon, Oct 21, 11:48 PM
Unknown Object (File)
Mon, Oct 21, 11:48 PM
Unknown Object (File)
Mon, Oct 21, 11:47 PM
Unknown Object (File)
Mon, Oct 21, 11:46 PM
Unknown Object (File)
Sat, Oct 19, 6:54 PM
Unknown Object (File)
Sat, Oct 19, 6:54 PM

Details

Summary

tcp: stop timers when in tcp_close() instead of doing that in
tcp_discardcb(). A connection in CLOSED state shall not need
any timers. Assert that no timer is rescheduled after that in tcp_timer_activate()
and verfiy that this is also the expected state in tcp_discardcb().

Diff Detail

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

Event Timeline

Note to reviewers who did not participate in the TCP call todya. I have patch in my queue that does the same but in a different manner. Glad that Richard agrees that timers should be stopped when connection goes into TCP_CLOSED and not later. We are delaying checking in this patch or my patch due to the patch hiding a bug that we hunt. PR 276761

  • tcp: stop timers and clean scoreboard when in tcp_close()
rscheff retitled this revision from tcp: stop timers in base stack in tcp_close() to tcp: stop timers and clean scoreboard in tcp_close().Feb 9 2024, 8:57 AM
rscheff edited the summary of this revision. (Show Details)
  • clear scoreboard in other instances as well
glebius requested changes to this revision.Feb 9 2024, 4:11 PM

Agreed with all changes, but can you please split into separate commits? Cause the SACK and the timer are two different things and two different problems, although attributing to the same panic.

This revision now requires changes to proceed.Feb 9 2024, 4:11 PM
sys/netinet/tcp_timer.c
910

I think that this assertion is correct, but it will trigger. I already don't remember clearly how to reproduce, over two weeks passed, lol :) That's why I also made this patch:

https://github.com/freebsd/freebsd-src/commit/a8031493aed6adda6cee49e1c6beceaaa5c6b07a

It definitely will fix triggering this assert. However, I need your review of how I treat the rest of tcpcb state. Is it ok just don't updated it when we are already CLOSED.

  • leave scoreboard for another commit

Please don't forget to update commit description, don't mention scoreboard.

This revision is now accepted and ready to land.Feb 10 2024, 8:32 AM