failure due to swapper and inet_sock_destruct
Hello,
I am using the 2.4.20 kernel in a fairly high stress bursty network environment. Every so often, I see the following error message from the kernel:
Attempt to release TCP socket in state 10 cfbfd540
I put some tracking in the kernel, and determined that this cfbfd540 was specifically the sk1 used in inet_tcp_listen and looking at the sport of 0x17, it is the telnet daemon. So it was created by xinetd for the telnet listening socket.
The failure often happens during a period of inactivity. The call to inet_sock_destruct happened in the swapper context. My first question is whether anyone has observed this behavior before. Secondly, in order to debug the problem, I'd like to understand what could trigger the swapper to call inet_sock_destruct. I did further determine that the call did not come from either tcp_close or tcp_destroy_sock. Looking at the code, it looks like the only call to inet_sock_destruct only happens from sk_free. sk_free looks to be used by sock_put which happens from sock_wfree, sklist_remove_socket, etc. Anyway, I'll keep investigating but I could use any help/advice on what would trigger the destruction of an sk without a call to close the parent listening socket. Any reason why it happened in the swapper context?
Thanks,
Melkor
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com
Quoted 8 lines · Melkor Ainur
Hello,
I am using the 2.4.20 kernel in a fairly high stress bursty network environment. Every so often, I see the following error message from the kernel:
Attempt to release TCP socket in state 10
cfbfd540
Could you please try the patch from Dave Miller below (which is already in 2.4.21-pre).
- James
Signature · 32 lines
James Morris <[email protected]> # This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.930.3.3 -> 1.930.3.4 # net/ipv4/tcp_minisocks.c 1.12 -> 1.13 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/01/30 [email protected] 1.930.3.4 # [TCP]: In tcp_check_req, handle ACKless packets properly. # -------------------------------------------- # diff -Nru a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c --- a/net/ipv4/tcp_minisocks.c Sun Apr 6 21:41:32 2003 +++ b/net/ipv4/tcp_minisocks.c Sun Apr 6 21:41:32 2003 @@ -938,6 +938,12 @@ if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN)) goto embryonic_reset; + /* ACK sequence verified above, just make sure ACK is + * set. If ACK not set, just silently drop the packet. + */ + if (!(flg & TCP_FLAG_ACK)) + return NULL; + /* If TCP_DEFER_ACCEPT is set, drop bare ACK. */ if (tp->defer_accept && TCP_SKB_CB(skb)->end_seq == req->rcv_isn+1) { req->acked = 1;
Hello,
Thanks for the suggestion. I will try it. However, examining the change, I could only see how it could lead to a sock_put(child) but not how it could lead to a sk_free(parent). Could you help me understand?
Melkor
Quoted 59 lines · --- James Morris
Quoted 3 lines · Melkor Ainur
Hello,
I am using the 2.4.20 kernel in a fairly high
stress
Quoted 1 line
bursty network environment. Every so often, I see
the
Quoted 4 lines
following error message from the kernel:
Attempt to release TCP socket in state 10
cfbfd540Could you please try the patch from Dave Miller
below (which is already in
2.4.21-pre).- James
Signature · 25 lines
James Morris <[email protected]> # This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.930.3.3 -> 1.930.3.4 # net/ipv4/tcp_minisocks.c 1.12 -> 1.13 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/01/30 [email protected] 1.930.3.4 # [TCP]: In tcp_check_req, handle ACKless packets properly. # -------------------------------------------- # diff -Nru a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c --- a/net/ipv4/tcp_minisocks.c Sun Apr 6 21:41:32 2003 +++ b/net/ipv4/tcp_minisocks.c Sun Apr 6 21:41:32 2003(quoted diff) +1
-0@@ -938,6 +938,12 @@ if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN)) goto embryonic_reset; + /* ACK sequence verified above, just make sure ACKis
(quoted diff) +1
-0+ * set. If ACK not set, just silently drop thepacket.
(quoted diff) +4
-0+ */ + if (!(flg & TCP_FLAG_ACK)) + return NULL; + /* If TCP_DEFER_ACCEPT is set, drop bare ACK. */ if (tp->defer_accept && TCP_SKB_CB(skb)->end_seq
Quoted 3 lines
== req->rcv_isn+1) {
req->acked= 1;
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com