From: Oracle <oraclelinux@foxmail.com>
To: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: TCP high concurrency, RST connection cannot be released normally
Date: Sat, 31 May 2025 16:32:08 +0800 [thread overview]
Message-ID: <tencent_C7B4C00B49C38311734EB1550DC565591D0A@qq.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2203 bytes --]
Problem description: Abnormal message appears in high-concurrency short connection, the server sends rst to the client, the client connection is closed, but the server connection that sends rst is still in ESTABLISHED state? What is the reason?
I captured some information through bpf and confirmed that the server sent rst and the client status changed to close. I tracked the failure return of tcp_v4_send_reset and tcp_rcv_state_process and found that TCP RST: ACK flag = 1, but the tcp state printed here is the listen state, which is not consistent with the current connection status viewed by netstat. (Not sure if some events are discarded), but the tcpdump packet capture analysis shows that the server is indeed rst and the connection is not released.
[root@systest104 zx]# netstat -atpn|grep 45129 |grep ES
tcp 0 0 10.13.8.104:45129 10.13.8.104:45052 ESTABLISHED 3942077/postgres: #The connection still exists
tcpdump:
02:58:06.494295 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
10.13.8.104.45129 > 10.13.8.104.45052: Flags [S.], cksum 0x2518 (incorrect -> 0x7ac8), seq 214961739, ack 2894898555, win 65535, options [mss 65495,sackOK,TS val 1670384838 ecr 1670384838,nop,wscale 11], length 0
02:58:06.496318 IP (tos 0x0, ttl 64, id 15240, offset 0, flags [DF], proto TCP (6), length 52)
10.13.8.104.45052 > 10.13.8.104.45129: Flags [.], cksum 0x2510 (incorrect -> 0xa39b), seq 65579, ack 39408264, win 32, options [nop,nop,TS val 1670384839 ecr 1670384838], length 0
02:58:06.496321 IP (tos 0x0, ttl 64, id 15241, offset 0, flags [DF], proto TCP (6), length 84)
10.13.8.104.45052 > 10.13.8.104.45129: Flags [P.], cksum 0x2530 (incorrect -> 0x2b50), seq 65579:65611, ack 39408264, win 32, options [nop,nop,TS val 1670384839 ecr 1670384838], length 32
02:58:06.497830 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 40)
10.13.8.104.45129 > 10.13.8.104.45052: Flags [R], cksum 0x0f95 (correct), seq 214961740, win 0, length 0
[-- Attachment #1.2: Type: text/html, Size: 2551 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next reply other threads:[~2025-05-31 8:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-31 8:32 Oracle [this message]
2025-05-31 11:19 ` TCP high concurrency, RST connection cannot be released normally Siddh Raman Pant
[not found] ` <tencent_2D10E34E195789C5C95AA9B52C09E9C1370A@qq.com>
2025-06-01 5:11 ` Siddh Raman Pant
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=tencent_C7B4C00B49C38311734EB1550DC565591D0A@qq.com \
--to=oraclelinux@foxmail.com \
--cc=kernelnewbies@kernelnewbies.org \
/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).