Closed chriscool closed 9 years ago
That's a race, it's likely unmounting too soon and the mount point is still busy. The commit involved should have no real change on the behavior, apart from the race coming & going as a random side effect.
In bazil.org/fuse's own unit tests, I do this https://github.com/bazil/fuse/blob/4fe24646670059b759e9a2b06a37384b7877f166/fs/fstestutil/mounted.go#L37 and regularly see a few of those messages, with the loop retrying 0-2 times before the unmount succeeds.
I am not aware of any mechanism to wait until a mount point is not-busy.
The test in t0030 is the following:
test_expect_success "'ipfs mount' fails when there is no mount dir" '
tmp_ipfs_mount() { ipfs mount -f=not_ipfs -n=not_ipns >output 2>output.err; } &&
test_must_fail tmp_ipfs_mount
'
test_expect_success "'ipfs mount' output looks good" '
test_must_be_empty output &&
test_should_contain "not_ipns\|not_ipfs" output.err
'
So we are checking that ipfs mount
will report an error like "cannot mount not_ipfs" when it cannot mount because the specified directory does not exist. Instead we get "Error: fusermount: exit status 1". So we get an error but it's not a nice error for the user.
It doesn't look like a race problem for me and it doesn't look like an unmounting problem.
Oh sorry, I jumped the gun. I usually see fusermount complaining at unmount time, and have seen that with sharness.
fusermount: exit status 1
. Is this intended @tv42 ?test_expect_success "'ipfs mount' fails when there is no mount dir" '
works ok in osxtest_expect_success "'ipfs mount' output looks good" '
works ok in osxI really have no idea what that test wants to test, but it seems to testing some detail of error message content that's in no way guaranteed.
@tv42
what i'm asking you is whether you intend for the message to have changed. fuse used to return an error like
fusermount: "fusermount: <msg-including-path>" exit status 1
so we removed the wrapping and returned the raw <msg-including-path>
.
do your latest changes intend for the (helpful) <msg-including-path>
to be replaced by the (obscure) fusermount: exit status 1
?? (If so, we'll craft our own helpful message another way, but just checking because you may want to have a better UX there.)
That's /bin/fusermount
not my code.
ok we'll fix it on our end-- sorry to bother :)
Well, it's more, fusermount doesn't give a nice error to stderr for me to use.
https://github.com/bazil/fuse/commit/d28b015fbc4824368118e16ce3a1a11f4979b3dd switched from capturing stderr and returning it as an error to just logging them, as fusermount was observed sending frivolous messages to stderr.
I'm sure that could be done somehow better, but there's bigger fish to fry for now.
These days when running the sharness tests on my Linux machine, I always get the following test failure:
Bisecting this failure points to the following commit that updates a dependency:
commit e9074beb6da592a203ddcea3e4a22dd9c0af13fb Author: Henry cryptix@riseup.net Date: Thu May 28 22:09:26 2015 +0200
cc @cryptix @tv42