From owner-freebsd-questions@FreeBSD.ORG Sat Nov 26 03:09:17 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DD8A16A422 for ; Sat, 26 Nov 2005 03:09:17 +0000 (GMT) (envelope-from dkelly@HiWAAY.net) Received: from smtp.knology.net (smtp.knology.net [24.214.63.101]) by mx1.FreeBSD.org (Postfix) with SMTP id 069F143D67 for ; Sat, 26 Nov 2005 03:09:15 +0000 (GMT) (envelope-from dkelly@HiWAAY.net) Received: (qmail 12325 invoked by uid 0); 26 Nov 2005 03:08:01 -0000 Received: from user-69-73-60-132.knology.net (HELO ?10.0.0.6?) (69.73.60.132) by smtp5.knology.net with SMTP; 26 Nov 2005 03:08:01 -0000 Mime-Version: 1.0 (Apple Message framework v746.2) Content-Transfer-Encoding: 7bit Message-Id: <280A8F3A-C519-425A-8A70-AD9266B8D584@HiWAAY.net> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: FreeBSD Questions From: David Kelly Date: Fri, 25 Nov 2005 21:09:11 -0600 X-Mailer: Apple Mail (2.746.2) Cc: Subject: How to find system call in kernel source code? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2005 03:09:17 -0000 The sendfile(2) function is apparently a kernel system call. I've "find /usr/src -type f -exec grep -il sendfile "{}" \;" and several variations yet not found where the code which performs sendfile() is located. Is system call 393. Guessing I'm just missing the dispatch table. This is also related to P/R bin/89100. At least for me, RELENG_6 fails to send files greater than 4 GB after a few hours or days on the disk. Freshly copied files work fine. No problem copying the file with cp. And md5 confirms the contents have not changed. Built a special ftpd with -g compiler flag. Am not good enough with gdb to breakpoint a forked child, which apparently "ftpd -D" does immediately. So sprinkled enough printf's to confirm sendfile() is coming up short, is restarted, and errs finally producing the "premature EOF" error message. Yet I've done enough that I'm confident the arguments are being passed properly and of sufficient size. The files are between 4G and 8G and when the failure occurs the transfer is always filesize modulo 4G. Exactly as if a 4 byte length truncated. But strange in that it works on a new file today but doesn't after the file is a few hours or days old. Once a file is old enough to fail all files on that filesystem written before it also fail. Not related to timestamp as "cp -p" will "repair" the file temporarily. No errors in /var/log/messages or dmesg. No errors manually launching fsck to check the filesystems. And everything but the sendfile() system call seems to work. -- David Kelly N4HHE, dkelly@HiWAAY.net ======================================================================== Whom computers would destroy, they must first drive mad.