bin/89100: premature EOF with ftpd on some large files

David Kelly dkelly at
Wed Nov 16 04:40:23 GMT 2005

>Number:         89100
>Category:       bin
>Synopsis:       premature EOF with ftpd on some large files
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 16 04:40:21 GMT 2005
>Originator:     David Kelly
>Release:        FreeBSD 6.0-STABLE i386
System: FreeBSD 6.0-STABLE FreeBSD 6.0-STABLE #2: Sun Nov 13 19:23:43 CST 2005 dkelly at i386


Using ftpd to send large files often results in: "226 Transfer finished
due to premature end of file."

For several days thought the problem was related to geom_vinum as most
of my big files are on a striped vinum volume whose creation dates back
to 5.0. Largely because /bin/cp could read the files correctly, write to
the simple volume on /dev/ad0s1f, and then ftpd had no problem reading
the file.

Then I started having the same problem with large files on /dev/ad0s1f
(/usr). The common denominator is ftpd.

ftp> get bigfile /dev/null
local: /dev/null remote: bigfile
229 Entering Extended Passive Mode (|||56427|)
150 Opening BINARY mode data connection for 'bigfile' (4700241920 bytes).
226 Transfer finished due to premature end of file.
405274624 bytes received in 00:08 (46.06 MB/s)
ftp> quit

% dc
10 i 16 o
4700241920 p
405274624 p

Every time I pay attention the received file is exactly 4G short. Doesn't
matter if it is written to /dev/null, differnt filesystem, or same


Once a file is a problem it is always a problem in the same place. I
have not been able to create a large file which immediately has this
problem. Have not tested every large file immediately after creation,
only find this problem the next day or two.

Seems I have this problem with every file written with 5.4 on the
geom_vinum filesystem.


No permanent cure but ftpd has been able to read every fresh copy made
with /bin/cp.



More information about the freebsd-bugs mailing list