Skip to content
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

cmd/link: fallocate_test.go:46: unexpected disk usage: got 1 blocks, want 2048 #42005

Open
wheelcomplex opened this issue Oct 15, 2020 · 5 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@wheelcomplex
Copy link
Contributor

wheelcomplex commented Oct 15, 2020

What version of Go are you using (go version)?

$ go version
go version devel +7602d41196 Thu Oct 15 23:12:53 2020 +0000 linux/amd64

Does this issue reproduce with the latest release?

no reproduced in go-1.14.4

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/david/home/.cache/go-build"
GOENV="/home/david/home/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/david/sandspace/pkgextgo/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/david/sandspace/pkgextgo/"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/home/david/sandspace/go"
GOSUMDB="sum.golang.org"
GOTMPDIR="/home/david/sandspace/tmp"
GOTOOLDIR="/home/david/sandspace/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="0"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -fmessage-length=0 -fdebug-prefix-map=/home/david/sandspace/tmp/go-build907894934=/tmp/go-build -gno-record-gcc-switches"

What did you do?

compile Go from source: cd src && ./all.bash

What did you expect to see?

ALL TESTS PASSED

What did you see instead?

ok  	cmd/link/internal/benchmark	0.086s
--- FAIL: TestFallocate (0.00s)
    fallocate_test.go:61: unexpected disk usage: got 1 blocks, want 2048
    fallocate_test.go:61: unexpected disk usage: got 1 blocks, want 4096
    fallocate_test.go:61: unexpected disk usage: got 1 blocks, want 6144
FAIL
FAIL	cmd/link/internal/ld	5.307s

What did you figured out:

openZFS 2.0 reports fallocate is supported, but actaully not.

This should be a bug in openZFS 2.0, but we can workaround.

An improvement for The old issuse will follows up.

@gopherbot
Copy link

gopherbot commented Oct 15, 2020

Change https://golang.org/cl/262837 mentions this issue: cmd/link: TestFallocate fallocate_test error #42005

@toothrot
Copy link
Contributor

toothrot commented Oct 16, 2020

@toothrot toothrot added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Oct 16, 2020
@toothrot toothrot added this to the Backlog milestone Oct 16, 2020
@cherrymui
Copy link
Member

cherrymui commented Oct 16, 2020

Already commented on the CL.

As @wheelcomplex mentioned, this is an OS bug.

@IvanVolosyuk
Copy link

IvanVolosyuk commented Oct 17, 2020

With transparent compression on filesystem level number of blocks can be non-deterministic in this test.

@wheelcomplex
Copy link
Contributor Author

wheelcomplex commented Feb 14, 2021

ZFS 2.0 has released and currently behavior is intended. The CL has been updated to address this.

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 13, 2022
davepacheco pushed a commit to davepacheco/go that referenced this issue Nov 14, 2022
Basic fallocate(mode=0/2) compatibility has been added in openZFS 2.0.

Test case TestFallocate has been suggested to skip on ZFS (openzfs/zfs#11073).

fix: golang#42005

Change-Id: Ic7ea6cbcb076c8e422c4136950b5e1f2c034955c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
Status: Triage Backlog
Development

No branches or pull requests

5 participants