rakshasa / libtorrent

libTorrent BitTorrent library
http://rtorrent.net/downloads/
GNU General Public License v2.0
894 stars 208 forks source link

Storage error: [File chunk write error: Invalid argument.] in VirtualBox 4.1.18 #20

Closed pyeco closed 12 years ago

pyeco commented 12 years ago

Hello,

This problem very like http://libtorrent.rakshasa.no/ticket/1637, I'm running centos 6.2 32bit in VirtualBox 4.1.18 and compiled libtorrent and rtorrent (0.13.2/0.9.2). When I try to download into vboxfs, I receive the storage error [File chunk write error: Invalid argument]. I found somebody have the same problem in https://www.virtualbox.org/ticket/819#comment:50 I don't sure where is the problem but virtualbox developers looks like they don't hear anybody's opinion after purchased.

Here is a part of strace output:

gettimeofday({1341038606, 429890}, NULL) = 0 gettimeofday({1341038606, 430156}, NULL) = 0 gettimeofday({1341038606, 430336}, NULL) = 0 gettimeofday({1341038606, 431489}, NULL) = 0 gettimeofday({1341038606, 431700}, NULL) = 0 epoll_wait(3, {{EPOLLIN, {u32=43, u64=43}}}, 1024, 570) = 1 recv(43, "\0\0\0\1\1", 64, 0) = 5 epoll_ctl(3, EPOLL_CTL_MOD, 43, {EPOLLIN|EPOLLOUT|EPOLLERR, {u32=43, u64=43}}) = 0 gettimeofday({1341038606, 589685}, NULL) = 0 gettimeofday({1341038606, 590016}, NULL) = 0 gettimeofday({1341038606, 590342}, NULL) = 0 gettimeofday({1341038606, 590602}, NULL) = 0 gettimeofday({1341038606, 590832}, NULL) = 0 epoll_wait(3, {{EPOLLOUT, {u32=43, u64=43}}}, 1024, 410) = 1 send(43, "\0\0\0\r\6\0\0\1\267\0\1\200\0\0\0@\0\0\0\0\r\6\0\0\1\267\0\1\300\0\0\0"..., 34, 0) = 34 epoll_ctl(3, EPOLL_CTL_MOD, 43, {EPOLLIN|EPOLLERR, {u32=43, u64=43}}) = 0 gettimeofday({1341038606, 593303}, NULL) = 0 gettimeofday({1341038606, 593545}, NULL) = 0 gettimeofday({1341038606, 593822}, NULL) = 0 gettimeofday({1341038606, 594021}, NULL) = Regards0 gettimeofday({1341038606, 594328}, NULL) = 0 epoll_wait(3, {{EPOLLIN, {u32=61, u64=61}}}, 1024, 407) = 1 recv(61, "\342\365\375\vFd\206\3070Z\301\224*u\5\372\347@<s\17\310}\323\240\314\222\222\236\2003l"..., 64, 0) = 64 fstat64(7, {st_mode=S_IFREG|0664, st_size=729808896, ...}) = 0 fstat64(7, {st_mode=S_IFREG|0664, st_size=729808896, ...}) = 0 mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_SHARED, 7, 0x6dc0) = -1 EINVAL (Invalid argument) epoll_ctl(3, EPOLL_CTL_MOD, 61, {EPOLLERR, {u32=61, u64=61}}) = 0 epoll_ctl(3, EPOLL_CTL_DEL, 61, {0, {u32=61, u64=61}}) = 0 close(61) = 0

I need your help, thanks.

Pyec.

rakshasa commented 12 years ago

I'm currently trying out VirtualBox for testing IPv6, and if I encounter the issue I'll look into it.

rakshasa commented 12 years ago

Having looked closer at this it is an issue of mmap not being implemented in vboxfs, and the client requires this to work.

Support for non-mmap filesystems is a possible feature in the future however it is not a priority.

mdcx commented 7 years ago

Rakshasha,

Since vboxfs doesn't support mmap, is there an alternative method for mounting a windows share in an vbox guest and having rtorrent use it? I've tried several alternatives w/o much luck.

Thanks and sorry for necroing an old issue.

akanter commented 5 years ago

This is the same issue when using a 9p shared mount (host directory mount) using libvirt/kvm. Mounting with the cache=mmap option fixes this problem. e.g.,

MOUNT_TAG /path/to/mount 9p trans=virtio,version=9p2000.L,rw,cache=mmap 0 0

Leaving this here to help anyone else who might run into a similar problem =)