From owner-freebsd-net@FreeBSD.ORG Tue May 20 04:00:04 2008 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E9141065671 for ; Tue, 20 May 2008 04:00:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E40748FC13 for ; Tue, 20 May 2008 04:00:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m4K403XG001164 for ; Tue, 20 May 2008 04:00:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m4K403Nn001163; Tue, 20 May 2008 04:00:03 GMT (envelope-from gnats) Date: Tue, 20 May 2008 04:00:03 GMT Message-Id: <200805200400.m4K403Nn001163@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: "yes298 yes298" Cc: Subject: Re: amd64/123603: tcp_do_segment and Received duplicate SYN X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: yes298 yes298 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2008 04:00:04 -0000 The following reply was made to PR kern/123603; it has been noted by GNATS. From: "yes298 yes298" To: "John Baldwin" Cc: freebsd-gnats-submit@freebsd.org, andre@freebsd.org Subject: Re: amd64/123603: tcp_do_segment and Received duplicate SYN Date: Tue, 20 May 2008 11:24:32 +0800 ------=_Part_19869_29339230.1211253872117 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Dear Sir, Thank you so much for your reply. My FreeBSD 7.0(x64) Lighttpd web server connects to a 100M broadband line, after testing many times, I found that, when first time to view my website, it needed to take almost 5~8 seconds to completely open the homepage which is only a static HTML file with content "coming soon", and there are some error log about TCP connection found on our web server, it seems that my FreeBSD 7.0 web server has problem to establish TCP connection. Before the web server idle time (30s), there are no any delay to re-view the homepage (Press F5), but after 30 seconds, it needed to take another 5~8 seconds to re-view, and the log messages will be repeated. May 15 15:18:21 mail kernel: TCP: [203.186.95.8]:12728 to [58.177.222.113]:80 tcpflags 0x2; syncache_add: Received duplicate SYN, resetting timer and retransmitting SYN|ACK May 15 15:19:03 mail kernel: TCP: [221.127.88.188]:5128 to [58.177.222.113]:80 tcpflags 0x2; syncache_add: Received duplicate SYN, resetting timer and retransmitting SYN|ACK I know how to disable these log messages, but I would like to know that the delay is because of receiving duplicate SYN? is it normal message? Please help me to solve the problem, thanks !!!! Thank you so much! Best regards, Victor 2008/5/19 John Baldwin : > On Monday 12 May 2008 03:45:16 am John wrote: > > >Number: 123603 > > >Category: amd64 > > >Synopsis: tcp_do_segment and Received duplicate SYN > > >Confidential: no > > >Severity: critical > > >Priority: high > > >Responsible: freebsd-amd64 > > >State: open > > >Quarter: > > >Keywords: > > >Date-Required: > > >Class: sw-bug > > >Submitter-Id: current-users > > >Arrival-Date: Mon May 12 07:50:01 UTC 2008 > > >Closed-Date: > > >Last-Modified: > > >Originator: John > > >Release: FB7.0 (x64) > > >Organization: > > > > NULL > > > > >Environment: > > > > FreeBSD mail.mydomain.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Thu Mar 6 > > 12:04:57 HKT 2008 root@mydomain.com: > /usr/src/sys/amd64/compile/FB7NEW > > amd64 > > > > >Description: > > > > A FreeBSD 7.0 (x64) Lighttpd Web Server with most-updated ports and > patchs. > > when a client connect and view a static HTML file, At the first time > > (before web server idle time), it needs to wait a long time to establish > a > > connection, OR when this server try to download file from Internet, there > > are lots of logs messages just like below: > > > > May 12 11:57:54 mail kernel: TCP: [55.66.77.88]:41792 to [11.22.33.44 > ]:80 > > tcpflags 0x2; syncache_add: Received duplicate SYN, resetting timer > > and retransmitting SYN|ACK > > May 12 15:17:53 mail kernel: TCP: [193.166.3.2]:45979 to > > [11.22.33.44]:63372 tcpflags 0x10; tcp_do_segment: FIN_WAIT_1: > > Received 1448 bytes of data after socket was closed, sending RST and > > removing tcpcb May 12 15:17:53 mail kernel: TCP: [193.166.3.2]:21 to > > [11.22.33.44]:55007 tcpflags 0x18; tcp_do_segment: FIN_WAIT_2: > > Received 13 bytes of data after socket was closed, sending RST and > removing > > tcpcb > > > > >How-To-Repeat: > > > > any type of connection will generate above log messages. > > You can either comment out all the log(LOG_DEBUG, ...) calls > in /sys/netinet/tcp*.c or change your /etc/syslog.conf to not send > kern.debug > messages to the console. > > I think these messages should probably be conditional on a kernel option > FWIW. > > -- > John Baldwin > ------=_Part_19869_29339230.1211253872117 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Dear Sir,
 
Thank you so much for your reply.
 
My FreeBSD 7.0(x64) Lighttpd web server connects to a 100M broadband line, after testing many times, I found that, when first time to view my website, it needed to take almost 5~8 seconds to completely open the homepage which is only a static HTML file with content "coming soon", and there are some  error log about TCP connection found on our web server, it seems that my FreeBSD 7.0 web server has problem to establish TCP connection. Before the we b server idle time (30s), there are no any delay to re-view the homepage (Press F5), but after 30 seconds, it needed to take another 5~8 seconds to re-view, and the log messages will be repeated.
 
May 15 15:18:21 mail kernel: TCP: [203.186.95.8]:12728 to [58.177.222.113]:80 tcpflags 0x2<SYN>; syncache_add: Received duplicate SYN, resetting timer and retransmitting SYN|ACK
May 15 15:19:03 mail kernel: TCP: [221.127.88.188]:5128 to [58.177.222.113]:80 tcpflags 0x2<SYN>; syncache_add: Received duplicate SYN, resetting timer and retransmitting SYN|ACK
 
I know how to disable these log messages, but I would like to know that the delay is because
of receiving duplicate SYN? is it normal message? Please help me to solve the problem, thanks !!!!
Thank you so much!
 
Best regards,
Victor
 
2008/5/19 John Baldwin <jhb@freebsd.org>:
On Monday 12 May 2008 03:45:16 am John wrote:
> >Number:         123603
> >Category:       amd64
> >Synopsis:       tcp_do_segment and Received duplicate SYN
> >Confidential:   no
> >Severity:       critical
> >Priority:       high
> >Responsible:    freebsd-amd64
> >State:          open
> >Quarter:
> >Keywords:
> >Date-Required:
> >Class:          sw-bug
> >Submitter-Id:   current-users
> >Arrival-Date:   Mon May 12 07:50:01 UTC 2008
> >Closed-Date:
> >Last-Modified:
> >Originator:     John
> >Release:        FB7.0 (x64)
> >Organization:
>
> NULL
>
> >Environment:
>
> FreeBSD mail.mydomain.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Thu Mar  6
> 12:04:57 HKT 2008     root@mydomain.com:/usr/src/sys/amd64/compile/FB7NEW
> amd64
>
> >Description:
>
> A FreeBSD 7.0 (x64) Lighttpd Web Server with most-updated ports and patchs.
> when a client connect and view a static HTML file, At the first time
> (before web server idle time), it needs to wait a long time to establish a
> connection, OR when this server try to download file from Internet, there
> are lots of logs messages just like below:
>
> May 12 11:57:54 mail kernel: TCP: [55.66.77.88]:41792 to [11.22.33.44]:80
> tcpflags 0x2<SYN>; syncache_add: Received duplicate SYN, resetting timer
> and retransmitting SYN|ACK
> May 12 15:17:53 mail kernel: TCP: [193.166.3.2]:45979 to
> [11.22.33.44]:63372 tcpflags 0x10<ACK>; tcp_do_segment: FIN_WAIT_1:
> Received 1448 bytes of data after socket was closed, sending RST and
> removing tcpcb May 12 15:17:53 mail kernel: TCP: [193.166.3.2]:21 to
> [11.22.33.44]:55007 tcpflags 0x18<PUSH,ACK>; tcp_do_segment: FIN_WAIT_2:
> Received 13 bytes of data after socket was closed, sending RST and removing
> tcpcb
>
> >How-To-Repeat:
>
> any type of  connection will generate above log messages.

You can either comment out all the log(LOG_DEBUG, ...) calls
in /sys/netinet/tcp*.c or change your /etc/syslog.conf to not send kern.debug
messages to the console.

I think these messages should probably be conditional on a kernel option FWIW.

--
John Baldwin

------=_Part_19869_29339230.1211253872117--