Date: Fri, 25 Nov 2005 21:09:11 -0600 From: David Kelly <dkelly@HiWAAY.net> To: FreeBSD Questions <questions@freebsd.org> Subject: How to find system call in kernel source code? Message-ID: <280A8F3A-C519-425A-8A70-AD9266B8D584@HiWAAY.net>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?280A8F3A-C519-425A-8A70-AD9266B8D584>