From owner-freebsd-ports Sat Jun 16 19: 0:13 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 86A8037B406 for ; Sat, 16 Jun 2001 19:00:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f5H202713766; Sat, 16 Jun 2001 19:00:02 -0700 (PDT) (envelope-from gnats) Received: from totem.fix.no (totem.fix.no [213.142.66.130]) by hub.freebsd.org (Postfix) with ESMTP id A022B37B401 for ; Sat, 16 Jun 2001 18:55:14 -0700 (PDT) (envelope-from anders@totem.fix.no) Received: by totem.fix.no (Postfix, from userid 1000) id 2DE483C8E; Sun, 17 Jun 2001 03:55:13 +0200 (CEST) Message-Id: <20010617015513.2DE483C8E@totem.fix.no> Date: Sun, 17 Jun 2001 03:55:13 +0200 (CEST) From: Anders Nordby Reply-To: Anders Nordby To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/28214: Fix port: ftp/oftpd Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 28214 >Category: ports >Synopsis: Fix port: ftp/oftpd >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Jun 16 19:00:02 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Anders Nordby >Release: FreeBSD 4.3-STABLE i386 >Organization: Fluxpod Information eXchange >Environment: kern.osreldate: 430000 (4.3-STABLE from medio may) >Description: Sendfile code in oftpd isn't really working well, it's making oftpd eat obnoxious amonts of CPU time while repeatedly calling sendfile(). I'm prodding the author about it. But I'd like it disabled for now, until a proper fix is ready. >How-To-Repeat: >Fix: diff -Nur oftpd.old/files/patch-ftp_session.c oftpd/files/patch-ftp_session.c --- oftpd.old/files/patch-ftp_session.c Thu Jan 1 01:00:00 1970 +++ oftpd/files/patch-ftp_session.c Sun Jun 17 03:46:42 2001 @@ -0,0 +1,29 @@ +--- src/ftp_session.c.orig Sun Jun 17 03:45:08 2001 ++++ src/ftp_session.c Sun Jun 17 03:46:26 2001 +@@ -1165,7 +1165,7 @@ + /* for sendfile(), we still have to use a loop to avoid + having our watchdog time us out on large files - it does + allow us to avoid an extra copy to/from user space */ +-#ifdef HAVE_SENDFILE ++/* #ifdef HAVE_SENDFILE + offset = f->file_offset; + file_size = stat_buf.st_size - offset; + while (offset < stat_buf.st_size) { +@@ -1200,7 +1200,7 @@ + + watchdog_defer_watched(f->watched); + } +-#else ++#else */ + for (;;) { + read_ret = read(file_fd, buf, sizeof(buf)); + if (read_ret == -1) { +@@ -1219,7 +1219,7 @@ + + watchdog_defer_watched(f->watched); + } +-#endif /* HAVE_SENDFILE */ ++/* #endif */ /* HAVE_SENDFILE */ + } + + /* disconnect */ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message