New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching fails on VirtualBox shared filesystems #3845

Open
carlosmn opened this Issue Jun 28, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@carlosmn
Member

carlosmn commented Jun 28, 2016

There's a couple of reports for bindings or consumers, so let's bring it together in this tracker.

libgit2/git2go#194 has some details, as does rust-lang/cargo#2808

It looks like VirtualBox's shared filesystem performs some conversion between the posixy semantics it pretends to have and the ones it uses for the real Windows filesystem it has below. This is particularly annoying for a couple of reasons. First, creating files with holes works just fine on Windows itself, and secondly the reason we're doing the weird mmap dance instead of just calling write() is to work around Windows networked filesystem issues.

@jml

This comment has been minimized.

jml commented Mar 3, 2017

I hit this issue running cargo inside a Docker container inside a VirtualBox VM (minikube). Host OS is macOS 10.12.3.

strace -ff output here:

72 is the cargo build process, and 73 is something that spawns to do the git operations. 73 contains the failed mmap:

open("/cargo/registry/index/github.com-1ecc6299db9ec823/.git/objects/pack/pack_git2_MjSw5m", O_RDWR|O_CREAT|O_EXCL, 0600) = 5
chmod("/cargo/registry/index/github.com-1ecc6299db9ec823/.git/objects/pack/pack_git2_MjSw5m", 0444) = 0
stat("/cargo/registry/index/github.com-1ecc6299db9ec823/.git/objects/pack/pack_git2_MjSw5m", {st_mode=S_IFREG|0770, st_size=0, ...}) = 0
recvfrom(4, "\27\3\3\5r", 5, 0, NULL, NULL) = 5
recvfrom(4, "\230W2O\247\316\21\354[\361\367\213c\307{0B\327\257d\0>\224\333\332]\277N^`\267@"..., 1394, 0, NULL, NULL) = 1394
recvfrom(4, "\27\3\3\5r", 5, 0, NULL, NULL) = 5
recvfrom(4, "\230W2O\247\316\21\355\223\224rM|\212\366\23\250\177\222\330\272\200\276K%\3459#J|\240`"..., 1394, 0, NULL, NULL) = 1394
recvfrom(4, "\27\3\3\5r", 5, 0, NULL, NULL) = 5
recvfrom(4, "\230W2O\247\316\21\356h\374\270z\334K\212\317\200\22\35\200\327u/\367\0330\221d\217\30n\22"..., 1394, 0, NULL, NULL) = 1394
recvfrom(4, "\27\3\3\5r", 5, 0, NULL, NULL) = 5
recvfrom(4, "\230W2O\247\316\21\357\376:GW\314/9\333{?(\266tA\3021\t4amx\213N\242"..., 1394, 0, NULL, NULL) = 1394
recvfrom(4, "\27\3\3\5r", 5, 0, NULL, NULL) = 5
recvfrom(4, "\230W2O\247\316\21\360\364\31A\273B>V\341\364\343\333C:\3167:\366)\306\360\372\337\265r"..., 1394, 0, NULL, NULL) = 1394
recvfrom(4, "\27\3\3\5r", 5, 0, NULL, NULL) = 5
recvfrom(4, "\230W2O\247\316\21\361\370\221\n\3\t\272\t|l\272\240l\325B6u<\264\301_\357\312\251."..., 1394, 0, NULL, NULL) = 1394
lseek(5, 8191, SEEK_SET)                = 8191
write(5, "P", 1)                        = 1
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_SHARED, 5, 0) = -1 EINVAL (Invalid argument)
close(5)                                = 0
sendto(4, "\25\3\3\0\32w\256\353\332\355=<\320\3720l\377\262!\350\216\370S[w\321\375f\362CT", 31, 0, NULL, 0) = 31
close(4)                                = 0
write(2, "\33(B\33[m", 6)               = 6
write(2, "\33[33m", 5)                  = 5
write(2, "\33[1m", 4)                   = 4
write(2, "warning:", 8)                 = 8
write(2, "\33(B\33[m", 6)               = 6
write(2, " ", 1)                        = 1
write(2, "spurious network error (2 tries "..., 105) = 105
write(2, "\n", 1)
@jml

This comment has been minimized.

jml commented Mar 3, 2017

Possibly relevant tickets from the VirtualBox tracker:

jml added a commit to weaveworks-experiments/deployer that referenced this issue Mar 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment