No TCP FIN when task killed, leaving local link in FIN_WAIT1/ESTABLISHED state

Latest response

We are seeing some TCP behavior that we have not seen before. Normally when we kill a task that has a link over the local interface to another local task, in tcpdump we see that TCP sends a [FIN, ACK] from the side that died to the running task. The running task sends an [ACK] back. Then the side that died sends an [RST] back to the running task, and the running task is notified via normal socket ops that the link has disappeared.

Occasionally when the link has been up for a number of days, when we kill a task we are not seeing any traffic in tcpdump between the two sides. The task that is killed disappears. The link in netstat going to the running task has no client process listed and is in the FIN_WAIT1 state. The link in the other direction from the running task to the killed task is still in ESTABLISHED. The socket layer in the running task is never notified that the link has disappeared.

In both cases, when we receive the notification and when we don't, the link has been up for at least three or four days with no traffic. If we kill the task in the first couple of days, we always get the [FIN]. Kernel version is 2.6.32-573.12.1.el6.x86_64 (RHEL 6.7). Any ideas?

Responses