From root@atleo6.leo.org  Tue May 25 02:01:14 2004
Return-Path: <root@atleo6.leo.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id EBE6816A4CF
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 25 May 2004 02:01:14 -0700 (PDT)
Received: from mailout1.informatik.tu-muenchen.de (mailout1.informatik.tu-muenchen.de [131.159.0.18])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7B43343D45
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 25 May 2004 02:01:12 -0700 (PDT)
	(envelope-from root@atleo6.leo.org)
Received: (qmail 37129 invoked from network); 25 May 2004 09:00:54 -0000
Received: from unknown (HELO atleo6.leo.org) (131.159.72.45)
  by mail.leo.org with SMTP; 25 May 2004 09:00:54 -0000
Received: by atleo6.leo.org (Postfix, from userid 0)
	id A940E67818; Tue, 25 May 2004 11:00:54 +0200 (CEST)
Message-Id: <20040525090054.A940E67818@atleo6.leo.org>
Date: Tue, 25 May 2004 11:00:54 +0200 (CEST)
From: dl@leo.org
Reply-To: dl@leo.org
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: FreeBSDs ftpd has problems under -CURRENT
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         67167
>Category:       bin
>Synopsis:       FreeBSDs ftpd has problems under -CURRENT
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 25 02:10:24 PDT 2004
>Closed-Date:    Fri Apr 14 21:36:58 GMT 2006
>Last-Modified:  Fri Apr 14 21:36:58 GMT 2006
>Originator:     Daniel Lang <dl@leo.org>
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
LEO
>Environment:
System: FreeBSD atleo6.leo.org 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Sun Apr 11 18:17:54 CEST 2004 langd@atleo6.leo.org:/usr/obj/usr/src/sys/ATLEO6 i386


>Description:

I run a heavily loaded ftp-server under FreeBSD 5.2-CURRENT.
I am using FreeBSD's own ftpd (/usr/libexec/ftpd) with the following
command-line to provide anonymous ftp access:

/usr/libexec/ftpd -A -D -l -W -r -S -a ftp.leo.org -p /var/run/ftpd.pid

I did so under -STABLE as well. Under -STABLE this performed
extraordinary well (much better than proftpd for instance).
Under -CURRENT every now and then, the system has trouble to
accept new connections. If a connection is established the data
transfer is very fast, but sometimes it takes very long to establish
the connection, such that clients do time out.

I also provide access via HTTP using apache2 linked with libthr.
I never have problems accepting connections over http. The throughput
is similar, maybe just slighlty below ftp (I get 10MB/s via FTP
and 9.3MB/s using HTTP to a machine in the LAN with a 100Mbit/s
NIC, so I can saturate the NIC on the client easily, the server
has a Gigabit NIC (em0)).

Further in the syslog I get tons of the following messages:
[..]
May 25 00:28:13 atleo6 ftpd[9248]: getsockname (/usr/libexec/ftpd): Socket operation on non-socket
May 25 00:30:18 atleo6 ftpd[7836]: getsockname (/usr/libexec/ftpd): Socket operation on non-socket
May 25 00:28:03 atleo6 ftpd[9228]: getsockname (/usr/libexec/ftpd): Socket operation on non-socket
May 25 00:34:02 atleo6 ftpd[9216]: getsockname (/usr/libexec/ftpd): Socket operation on non-socket
May 25 00:36:28 atleo6 ftpd[9698]: getsockname (/usr/libexec/ftpd): Socket operation on non-socket
May 25 00:37:07 atleo6 ftpd[9745]: getsockname (/usr/libexec/ftpd): Socket operation on non-socket
[..]

I know these are poor symptoms, but I am willing to dig into this
issue, if I get instructions. I have excluded INVARIANTS and WITNESS
from the kernel.

>How-To-Repeat:

Run a heavy loaded public ftp server under -current with FreeBSD's ftpd. 

>Fix:

unknown


>Release-Note:
>Audit-Trail:

From: Yar Tikhiy <yar@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org, dl@leo.org
Cc:  
Subject: Re: bin/67167: FreeBSDs ftpd has problems under -CURRENT
Date: Sat, 18 Dec 2004 15:54:20 +0300

 Hi Daniel,
 
 Sorry for the great lag in dealing with your PR.
 
 In a system built from source dated around 5.3-RELEASE, I cannot
 reproduce this problem using the naive approach of doing
 
 	while :; nc -z my-ftp-host 21; done
 
 against the ftpd service.  Could you try 5.3-RELEASE or later code
 from CVS in your environment?  Thanks!
 
 -- 
 Yar

From: Maxim Konovalov <maxim@macomnet.ru>
To: Daniel Lang <dl@leo.org>
Cc: bug-followup@freebsd.org
Subject: bin/67167
Date: Fri, 14 Apr 2006 01:27:58 +0400 (MSD)

 Daniel,
 
 It sounds for me the problem is not in ftpd(8) but somewhere else.
 With all network/locking improvements in the system could you check
 the problem persists in RELENG_6 system?
 
 Thanks!
 
 -- 
 Maxim Konovalov

From: Daniel Lang <dl@leo.org>
To: Maxim Konovalov <maxim@macomnet.ru>
Cc: bug-followup@freebsd.org
Subject: Re: bin/67167: FreeBSDs ftpd has problems under -CURRENT
Date: Fri, 14 Apr 2006 23:20:15 +0200

 Dear Maxim,
 
 Maxim Konovalov wrote on Fri, Apr 14, 2006 at 01:27:58AM +0400:
 > Daniel,
 > 
 > It sounds for me the problem is not in ftpd(8) but somewhere else.
 > With all network/locking improvements in the system could you check
 > the problem persists in RELENG_6 system?
 
 Thanks for your reply. However, the machine where I had this
 problem on, no longer runs FreeBSD, so I cannot verify. :-/
 
 You may close the PR from my point of view.
 
 Cheers,
  Daniel
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Fri Apr 14 21:35:09 UTC 2006 
State-Changed-Why:  
Daniel can't verify the problem exists in RELENG_6. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=67167 
>Unformatted:
