i386/138046: tcp sockets stay in SYN_SENT even after receiving RST. never time out as well.

H. Steuer steuer at patronas.de
Fri Aug 21 20:50:05 UTC 2009


>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 at 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 at 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 at 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:


More information about the freebsd-i386 mailing list