Skip to contentSkip to conversation

New: timeout of TCP-sockets is *infinite* by default .. even if TCP-connection is already *broken*

Bug 89831 Stephen Hemminger 1 participant 1 message Jan 4, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Begin forwarded message:

Date: Tue, 16 Dec 2014 22:33:50 -0800
From: "[email protected]" <[email protected]>
To: "[email protected]" <[email protected]>
Subject: [Bug 89831] New: timeout of TCP-sockets is *infinite* by default .. even if TCP-connection is already *broken*

https://bugzilla.kernel.org/show_bug.cgi?id=89831

Bug ID: 89831
Summary: timeout of TCP-sockets is *infinite* by default ..
even if TCP-connection is already *broken*
Product: Networking
Version: 2.5
Kernel Version: all
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: IPV4
Assignee: [email protected]
Reporter: [email protected]
Regression: No

Created attachment 160881
--> https://bugzilla.kernel.org/attachment.cgi?id=160881&action=edit
test for catch infinite freezing (on TCP-sockets by default) on GNU/Linux

good day!

please, very sorry me for your time. :-) [and sorry for my bad english].

big problem in that fact: *most* application-programmers think that if TCP-connection is already *broken* -- that timeout of TCP-socket will *NOT* be *infinite*. (default system timeout).

I prepared example code:
https://gist.github.com/polymorphm/0e057402c9fa82547d72 (and this file "to-test.c" -- in attachment).

this example code ("to-test.c") -- shows that if TCP-connection *broken* -- that timeout will *never* be reached (for broken TCP-connection. EVEN AFTER SOME DAYS).

program "to-test.c" -- becomes to infinite freezing -- after "[step 8]":

        $ gcc -Wall -Werror -o to-test to-test.c && sudo ./to-test
        ***** begin of test *****
        [step 1] creating socket...
        ***** INFO: is used SO_KEEPALIVE by default for TCP-sockets? answer: 0
*****
        [step 2] connecting socket...
        [step 3] time waiting (1s)...
        [step 4] breaking down network...    [wlp1s0]
        # ip link set down dev wlp1s0
        [step 5] time waiting (15s)...
        [step 6] reestablishing up network...    [wlp1s0]
        # ip link set up dev wlp1s0
        [step 7] time waiting (1s)...
        [step 8] waiting of socket timeout (or we are freezed *infinity*?)...

(infinite freeze -- at this point)

probably, this issue-ticket will be marked as WONTFIX (and again: very sorry me for your time!). but this issue-ticket -- need at least for official canonical URL-link for answer to problem of default timeout of *broken* TCP-connection on GNU/Linux.

when I speek with some application-programmers -- they say me: if GNU/Linux freeze at broken-TCP-connections (with default settings of socket) than is *bug* of GNU/Linux. and I maked this issue-ticket. sorry.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.