From: mengkanglai <mengkanglai2@huawei.com>
To: "David S. Miller" <davem@davemloft.net>,
David Ahern <dsahern@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "Fengtao (fengtao, Euler)" <fengtao40@huawei.com>,
"Yanan (Euler)" <yanan@huawei.com>
Subject: kernel tcp sockets stuck in FIN_WAIT1 after call tcp_close
Date: Wed, 13 Nov 2024 12:40:34 +0000 [thread overview]
Message-ID: <c08bd5378da647a2a4c16698125d180a@huawei.com> (raw)
Hello, Eric:
Commit 151c9c724d05 (tcp: properly terminate timers for kernel sockets) introduce inet_csk_clear_xmit_timers_sync in tcp_close.
For kernel sockets it does not hold sk->sk_net_refcnt, if this is kernel tcp socket it will call tcp_send_fin in __tcp_close to send FIN packet to remotes server,
if this fin packet lost due to network faults, tcp should retransmit this fin packet, but tcp_timer stopped by inet_csk_clear_xmit_timers_sync.
tcp sockets state will stuck in FIN_WAIT1 and never go away. I think it's not right.
Best wishes!
next reply other threads:[~2024-11-13 12:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 12:40 mengkanglai [this message]
2024-11-13 18:56 ` kernel tcp sockets stuck in FIN_WAIT1 after call tcp_close Kuniyuki Iwashima
-- strict thread matches above, loose matches on Subject: below --
2024-11-19 8:38 mengkanglai
2024-11-20 2:38 ` Kuniyuki Iwashima
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c08bd5378da647a2a4c16698125d180a@huawei.com \
--to=mengkanglai2@huawei.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=fengtao40@huawei.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yanan@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).