Opened 6 years ago
#17757 new defect
writev() blocks over vboxsf on Linux 4.16 guest
| Reported by: | larsch2 | Owned by: | |
|---|---|---|---|
| Component: | other | Version: | VirtualBox 5.2.12 |
| Keywords: | Cc: | ||
| Guest type: | other | Host type: | other |
Description
VirtualBox 5.2.8
# uname -r 4.16.8-1-ARCH
# cat test.c
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/uio.h>
char data[8192];
int main() {
struct iovec iov[2];
int fd = open("/media/sf_sf/test.txt", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666);
iov[0].iov_base = data;
iov[0].iov_len = sizeof(data);
iov[1].iov_base = data;
iov[1].iov_len = sizeof(data);
writev(fd, iov, 2);
close(fd);
return 0;
}
Result:
# strace ./a.out
openat(AT_FDCWD, "/media/sf_sf/test.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
writev(3, [{iov_base="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=8192}, {iov_base="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=8192}], 2
This blocks forever. Writing with write() works. Only writev() blocks.
Kernel modules are from either virtualbox-guest-modules-arch or virtualbox-guest-dkms (Arch Linux).
Downgrading to 4.14.x kernel works around the problem with same version of VirtualBox & host.
Was unable to test with guest additions CD (doesn't compile on 4.16.8).
Attachments (1)
Note:
See TracTickets
for help on using tickets.

