From pantzer@glass.dc.luth.se  Mon Jan 21 06:44:07 2002
Return-Path: <pantzer@glass.dc.luth.se>
Received: from glass.dc.luth.se (glass.dc.luth.se [130.240.42.240])
	by hub.freebsd.org (Postfix) with ESMTP id 3AD3737B41C
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 21 Jan 2002 06:43:59 -0800 (PST)
Received: (from pantzer@localhost)
	by glass.dc.luth.se (8.11.6/8.11.6) id g0LFZn907416;
	Mon, 21 Jan 2002 16:35:49 +0100 (CET)
	(envelope-from pantzer)
Message-Id: <200201211535.g0LFZn907416@glass.dc.luth.se>
Date: Mon, 21 Jan 2002 16:35:49 +0100 (CET)
From: Mattias Pantzare <pantzer@ludd.luth.se>
Reply-To: Mattias Pantzare <pantzer@ludd.luth.se>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ftpd enters endless sendfile loop
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         34117
>Category:       bin
>Synopsis:       ftpd enters endless sendfile loop
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 21 06:50:02 PST 2002
>Closed-Date:    Fri Feb 1 06:44:50 PST 2002
>Last-Modified:  Fri Feb 01 06:45:14 PST 2002
>Originator:     Mattias Pantzare
>Release:        FreeBSD 4.5-RC1 i386
>Organization:
>Environment:
System: FreeBSD glass.dc.luth.se 4.5-RC1 FreeBSD 4.5-RC1 #1: Thu Jan 17 21:45:48 CET 2002 root@glass.dc.luth.se:/usr/src/sys/compile/GLASS i386


	
>Description:
ftpd on FreeBSD can enter an endless loop on big files.

>How-To-Repeat:
ftp a big file from a FreeBSD ftpd. (5Gb)

>Fix:

*** ftpd.c.org  Mon Jan 21 13:52:26 2002
--- ftpd.c      Mon Jan 21 13:59:10 2002
***************
*** 1782,1788 ****
                        len = filesize;
                        err = cnt = offset = 0;
  
!                       while (err != -1 && cnt < filesize) {
                                err = sendfile(filefd, netfd, offset, len,
                                        (struct sf_hdtr *) NULL, &cnt, 0);
                                byte_count += cnt;
--- 1782,1788 ----
                        len = filesize;
                        err = cnt = offset = 0;
  
!                       while (err != -1 && offset < filesize) {
                                err = sendfile(filefd, netfd, offset, len,
                                        (struct sf_hdtr *) NULL, &cnt, 0);
                                byte_count += cnt;

>Release-Note:
>Audit-Trail:

From: Maxim Konovalov <maxim@macomnet.ru>
To: Mattias Pantzare <pantzer@ludd.luth.se>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/34117: ftpd enters endless sendfile loop
Date: Mon, 21 Jan 2002 17:54:43 +0300 (MSK)

 Duplicated with bin/33770:
 
 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=bin/33770
 
 -- 
 Maxim Konovalov, MAcomnet, Internet-Intranet Dept., system engineer
 phone: +7 (095) 796-9079, mailto: maxim@macomnet.ru
 
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Fri Feb 1 06:44:50 PST 2002 
State-Changed-Why:  
Duplicate of bin/33770. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34117 
>Unformatted:
