Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jan 2002 16:35:49 +0100 (CET)
From:      Mattias Pantzare <pantzer@ludd.luth.se>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/34117: ftpd enters endless sendfile loop
Message-ID:  <200201211535.g0LFZn907416@glass.dc.luth.se>

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

>Number:         34117
>Category:       bin
>Synopsis:       ftpd enters endless sendfile loop
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 21 06:50:02 PST 2002
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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