Fw: ZFS + sendfile = data corruption

Andrey V. Elsukov bu7cher at yandex.ru
Thu Apr 19 06:07:52 UTC 2007

Sorry, I've misspelled email address, so i forward this 
email to the list. May be someone else can confirm this 

----- Message -----
Hi, All and Pawel.

I found a new bug related to ZFS.
My system is not a fresh CURRENT, and may be this bug 
is already fixed. Then excuse me.

I use vsftpd for sharing some files for a windows users.
By the default vsftpd use sendfile(2) for file transfers.
And my files is on the ZFS. When i tried download theses 
files (of course i use binary mode data connection) i got 
a corrupted files. 
A downloaded files have the same file size, but not content.
In first file i've found following strings:

> strings dsc01150.jpg
d dump header
cannot allocate vm
_kvm_vatop: pte not valid
invalid address (0x%lx)
cannot read %d bytes for page bitmap
wrong minidump version. expected %d got %d
cannot read %d bytes for ptemap
cannot allocate %d bytes for bitmap
cannot allocate %d bytes for ptemap
not a minidump for this platform
kvm_kvatop called in live kernel!
_kvm_vatop: virtual address 0x%lx not minidumped
_kvm_vatop: physical address 0x%llx not in minidump
_kvm_vatop: physical address 0x%lx not in minidump
cannot mmap corefile
Cannot read PDPT
cannot read PDPT
cannot read IdlePDPT
cannot read IdlePTD
bad namelist
cannot read PTD
vatop called in live kernel!
_kvm_vatop: pdpe_pa not found
_kvm_vatop: pde_pa not found
_kvm_vatop: pde not valid
_kvm_vatop: lseek
_kvm_vatop_pae: lseek
_kvm_vatop_pae: read
_kvm_vatop: read
_kvm_kvatop: pte not valid
_kvm_vatop_pae: pte not valid
_kvm_vatop_pae: pdpe_pa not found
_kvm_vatop_pae: pde_pa not found
_kvm_vatop: address not in dump
_kvm_kvatop_pae: pde not valid
_kvm_vatop: bootstrap data not in dump
_kvm_vatop_pae: bootstrap data not in dump
_kvm_vatop_pae: address not in dump
can't allocate %u bytes: %s
empty file
exec file name too long
bad flags arg
%s: %s
invalid address (%x)
short read
short write
kvm_write not implemented for dead kernels
$FreeBSD: src/lib/csu/i386-elf/crtn.S,v 1.6 2005/05/19 07:31:06 dfr Exp $

Other data seems that memory from other processes:
data from HTML-forms from firefox, dhclient configuration,...

When i have disabled "use_sendfile=NO" for the vsftpd - 
all files was downloaded ok. With UFS all works good.

WBR, Andrey V. Elsukov

More information about the freebsd-current mailing list