Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Aug 2009 20:40:22 GMT
From:      "H. Steuer" <steuer@patronas.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   i386/138046: tcp sockets stay in SYN_SENT even after receiving RST. never time out as well.
Message-ID:  <200908212040.n7LKeM7B052296@www.freebsd.org>
Resent-Message-ID: <200908212050.n7LKo5Sj072226@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         138046
>Category:       i386
>Synopsis:       tcp sockets stay in SYN_SENT even after receiving RST. never time out as well.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-i386
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 21 20:50:04 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     H. Steuer
>Release:        7.1, 7.2, 8.0-BETA2 of august 2
>Organization:
>Environment:
FreeBSD xxxx 7.2-RELEASE-p3 FreeBSD 7.2-RELEASE-p3 #3: Tue Aug 18 22:50:46 CEST 2009     root@xxxxx:/usr/obj/usr/src/sys/DL380G5  i386

FreeBSD xxxxxx 7.1-RELEASE-p4 FreeBSD 7.1-RELEASE-p4 #1: Sat Apr 11 22:55:52 CEST 2009     root@xxxxx:/usr/obj/usr/src/sys/DL380G5  i386

FreeBSD edinburgh 8.0-BETA2 FreeBSD 8.0-BETA2 #1: Sun Aug  2 21:16:35 CEST 2009    pieter@edinburgh:/usr/obj/usr/src/sys/GENERIC-nodbg  i386


>Description:
when a tcp connection is made to a existing host but a non-listening port, the tcp connection will stay in state SYN_SENT and will never be closed unless the process gets killed.

tcpdump shows a SYN packet answered by a RST. so the RST should close the socket.
the second problem is that at least the socket should time out in some way which isnt the case either.

i have written a small tcp client that you can download at http://skywalker.patronas.de/tcpclient.c

it connects 50 times, so after running that app, you will see 50 sockets in SYN_ACK state.

>How-To-Repeat:
download http://skywalker.patronas.de/tcpclient.c
compile
run against exisiting host and non-listening port
while the process is alive, netstat -an | grep [port]
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908212040.n7LKeM7B052296>