-
Notifications
You must be signed in to change notification settings - Fork 18k
syscall: TestGetfsstat fails on some (VMware?) OS X builders #16937
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
Comments
@josharian and I see this on both 10.8 and 10.10, both on VMWare. I think VMWare is not really at fault, but now we're just getting a different number of mounted filesystems and finally seeing the mistake. I suspect our /cc @ianlancetaylor |
CL https://golang.org/cl/28487 mentions this issue. |
Updates #16937 Change-Id: I6d1b210c741269b58040bd68bf3b51644f891737 Reviewed-on: https://go-review.googlesource.com/28487 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
What is the output of the |
Good question. I'll add more debugging. I tried checking the C-vs-Go size, but the Go struct is at least how bug cgo thinks it is (C.sizeof_struct_etc), which makes sense since Go made the struct. The failure after adding more debugging is:
I'll make it also log the mount output, and the contents of the non-zero struct entries. |
Updates #16937 Change-Id: I98aa203176f8f2ca2fcca6e334a65bc60d6f824d Reviewed-on: https://go-review.googlesource.com/28535 Reviewed-by: Ian Lance Taylor <iant@golang.org>
|
CL https://golang.org/cl/28550 mentions this issue. |
@quentinmit raised a good point on https://golang.org/cl/28550 .... how does OS X's
Notably, it's passing a buffer size of
I suppose we could just do that too. |
OS X mount, ... calls And its source: https://opensource.apple.com/source/Libc/Libc-167/gen.subproj/getmntinfo.c int
getmntinfo(mntbufp, flags)
struct statfs **mntbufp;
int flags;
{
static struct statfs *mntbuf;
static int mntsize;
static long bufsize;
if (mntsize <= 0 && (mntsize = getfsstat(0, 0, MNT_NOWAIT)) < 0)
return (0);
if (bufsize > 0 && (mntsize = getfsstat(mntbuf, bufsize, flags)) < 0)
return (0);
while (bufsize <= mntsize * sizeof(struct statfs)) {
if (mntbuf)
free(mntbuf);
bufsize = (mntsize + 1) * sizeof(struct statfs);
if ((mntbuf = (struct statfs *)malloc(bufsize)) == 0)
return (0);
if ((mntsize = getfsstat(mntbuf, bufsize, flags)) < 0)
return (0);
}
*mntbufp = mntbuf;
return (mntsize);
} Notably: bufsize = (mntsize + 1) * sizeof(struct statfs); |
No, the size doesn't matter at all. Tested it on a VMware instance. MNT_NOWAIT (2) works, which is what |
CL https://golang.org/cl/28585 mentions this issue. |
Same as https://golang.org/cl/28550 but for x/sys/unix. Updates golang/go#16937 Change-Id: Ie93df8ff1c40a7f2d98f1fb3ecf6110330bf1cbc Reviewed-on: https://go-review.googlesource.com/28585 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Fixes test failure when VMWare's shared folder filesystem is present. MNT_NOWAIT is what the mount(8) command does. Fixes #16937 Change-Id: Id436185f544b7069db46c8716d6a0bf580b31da0 Reviewed-on: https://go-review.googlesource.com/28550 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-on: https://go-review.googlesource.com/28650 Run-TryBot: Chris Broadfoot <cbro@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This happened again yesterday: https://storage.googleapis.com/go-build-log/326d8dd1/darwin-amd64-10_11_c1295122.log |
@ALTree, only because it was a trybot run on an old commit which hadn't been rebased to tip and didn't have the updated test. |
Ah! Thanks and sorry for the noise. I will rebase my CL. |
The text was updated successfully, but these errors were encountered: