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/dist: I/O error: read src/xxx.go: is a directory #35776

Closed
mvdan opened this issue Nov 22, 2019 · 3 comments
Closed

cmd/dist: I/O error: read src/xxx.go: is a directory #35776

mvdan opened this issue Nov 22, 2019 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@mvdan
Copy link
Member

mvdan commented Nov 22, 2019

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

$ go version
go version go1.13.4 linux/amd64

I was trying to build master at 95be9b7. I of course cannot run go version right now.

Does this issue reproduce with the latest release?

Not that I've seen. Never encountered this error before.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mvdan/.cache/go-build"
GOENV="/home/mvdan/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY="brank.as/*"
GONOSUMDB="brank.as/*"
GOOS="linux"
GOPATH="/home/mvdan/go"
GOPRIVATE="brank.as/*"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/mvdan/tip/src/cmd/go.mod"
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 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build881894378=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.13.4 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.13.4
uname -sr: Linux 5.3.12-arch1-1
/usr/lib/libc.so.6: GNU C Library (GNU libc) stable release version 2.30.
gdb --version: GNU gdb (GDB) 8.3.1

What did you do?

GOROOT_BOOTSTRAP=/usr/lib/go GOGC=off ./make.bash -v

What did you expect to see?

A successful build, like every other day.

What did you see instead?

Building Go toolchain3 using go_bootstrap and Go toolchain2.

[...]

# cmd/link/internal/sym
src/cmd/link/internal/sym/segment.go:1:1: I/O error: read src/cmd/link/internal/sym/segment.go: is a directory
go tool dist: FAILED: /home/mvdan/tip/pkg/tool/linux_amd64/go_bootstrap install -gcflags=all= -ldflags=all= -v -a -i cmd/asm cmd/cgo cmd/compile cmd/link: exit status 2

Below is the full output:

Building Go cmd/dist using /usr/lib/go. (go1.13.4 linux/amd64)
cmd/dist

Building Go toolchain1 using /usr/lib/go.
bootstrap/math/bits
bootstrap/internal/goversion
math/bits
bootstrap/internal/race
bootstrap/sort
math
bootstrap/container/heap
strconv
bootstrap/cmd/internal/sys
crypto/md5
bootstrap/cmd/internal/src
bootstrap/cmd/internal/bio
crypto/sha1
crypto/sha256
bootstrap/cmd/internal/edit
bootstrap/cmd/internal/objabi
bootstrap/debug/dwarf
bootstrap/compress/flate
bootstrap/math/big
bootstrap/cmd/internal/goobj2
bootstrap/cmd/compile/internal/syntax
bootstrap/cmd/internal/dwarf
bootstrap/cmd/asm/internal/flags
bootstrap/cmd/internal/gcprog
compress/flate
bootstrap/cmd/asm/internal/lex
bootstrap/compress/zlib
bootstrap/cmd/internal/obj
bootstrap/debug/macho
bootstrap/debug/pe
bootstrap/internal/xcoff
bootstrap/debug/elf
bootstrap/cmd/internal/obj/wasm
bootstrap/cmd/internal/obj/riscv
bootstrap/cmd/internal/obj/mips
bootstrap/cmd/internal/obj/ppc64
bootstrap/cmd/internal/obj/s390x
bootstrap/cmd/internal/obj/arm
bootstrap/cmd/internal/obj/arm64
bootstrap/cmd/internal/obj/x86
bootstrap/cmd/cgo
bootstrap/cmd/compile/internal/logopt
bootstrap/cmd/compile/internal/types
bootstrap/cmd/link/internal/sym
bootstrap/cmd/link/internal/objfile
bootstrap/cmd/link/internal/loader
bootstrap/cmd/link/internal/loadmacho
bootstrap/cmd/link/internal/loadxcoff
bootstrap/cmd/link/internal/loadpe
bootstrap/cmd/link/internal/loadelf
bootstrap/cmd/asm/internal/arch
bootstrap/cmd/compile/internal/ssa
bootstrap/cmd/link/internal/ld
bootstrap/cmd/asm/internal/asm
bootstrap/cmd/asm
bootstrap/cmd/link/internal/amd64
bootstrap/cmd/link/internal/mips
bootstrap/cmd/link/internal/mips64
bootstrap/cmd/link/internal/arm
bootstrap/cmd/link/internal/riscv64
bootstrap/cmd/link/internal/ppc64
bootstrap/cmd/link/internal/arm64
bootstrap/cmd/link/internal/s390x
bootstrap/cmd/link/internal/wasm
bootstrap/cmd/link/internal/x86
bootstrap/cmd/link
bootstrap/cmd/compile/internal/gc
bootstrap/cmd/compile/internal/wasm
bootstrap/cmd/compile/internal/arm64
bootstrap/cmd/compile/internal/amd64
bootstrap/cmd/compile/internal/mips64
bootstrap/cmd/compile/internal/s390x
bootstrap/cmd/compile/internal/arm
bootstrap/cmd/compile/internal/ppc64
bootstrap/cmd/compile/internal/mips
bootstrap/cmd/compile/internal/x86
bootstrap/cmd/compile

Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
runtime
internal/bytealg
runtime/internal/sys
internal/cpu
runtime/internal/atomic
runtime/internal/math
cmd/go
flag
path/filepath
cmd/go/internal/base
cmd/go/internal/modget
cmd/go/internal/work
cmd/go/internal/modfetch
cmd/go/internal/version
cmd/go/internal/test
io
cmd/vendor/golang.org/x/mod/semver
os/signal
internal/xcoff
os
debug/dwarf
unicode/utf8
cmd/go/internal/lockedfile
cmd/go/internal/run
cmd/go/internal/fix
cmd/go/internal/generate
debug/macho
cmd/go/internal/get
cmd/go/internal/tool
bufio
compress/zlib
cmd/go/internal/lockedfile/internal/filelock
hash/adler32
cmd/go/internal/clean
cmd/go/internal/cmdflag
encoding/binary
regexp
log
cmd/go/internal/help
encoding/json
encoding/xml
strings
math
text/template
math/rand
regexp/syntax
cmd/go/internal/bug
cmd/internal/buildid
cmd/go/internal/cfg
encoding
text/template/parse
unicode/utf16
internal/cfg
cmd/internal/objabi
cmd/go/internal/modload
fmt
internal/syscall/unix
cmd/go/internal/cache
crypto/sha1
cmd/go/internal/modcmd
sync
math/bits
encoding/hex
container/heap
cmd/go/internal/doc
cmd/internal/sys
cmd/internal/test2json
crypto
cmd/go/internal/envcmd
sort
cmd/go/internal/fmtcmd
crypto/sha256
runtime/debug
cmd/go/internal/list
cmd/go/internal/web
path
time
internal/race
cmd/go/internal/vet
strconv
cmd/go/internal/search
io/ioutil
cmd/go/internal/modfetch/codehost
bytes
cmd/vendor/golang.org/x/mod/module
debug/pe
cmd/vendor/golang.org/x/xerrors
debug/elf
cmd/go/internal/str
go/scanner
cmd/vendor/golang.org/x/xerrors/internal
reflect
archive/zip
sync/atomic
cmd/go/internal/mvs
go/token
errors
internal/lazyregexp
hash/crc32
internal/testlog
cmd/go/internal/renameio
internal/oserror
internal/reflectlite
internal/poll
os/exec
cmd/go/internal/robustio
unicode
context
compress/flate
go/build
hash
net/url
cmd/go/internal/modconv
syscall
go/doc
internal/singleflight
cmd/vendor/golang.org/x/mod/modfile
cmd/go/internal/modinfo
internal/goroot
cmd/vendor/golang.org/x/mod/zip
go/parser
cmd/vendor/golang.org/x/mod/sumdb/dirhash
cmd/vendor/golang.org/x/mod/internal/lazyregexp
encoding/base64
internal/goversion
go/ast
internal/fmtsort
cmd/go/internal/par
cmd/go/internal/imports
cmd/go/internal/load
internal/lazytemplate


Building Go toolchain2 using go_bootstrap and Go toolchain1.
runtime/internal/sys
internal/race
unicode
internal/cpu
runtime/internal/atomic
sync/atomic
math/bits
unicode/utf8
encoding
runtime/internal/math
unicode/utf16
internal/goversion
internal/testlog
internal/bytealg
math
runtime
internal/reflectlite
sync
math/rand
errors
sort
internal/oserror
io
strconv
syscall
container/heap
hash
bytes
text/tabwriter
strings
hash/adler32
hash/crc32
bufio
reflect
crypto
path
regexp/syntax
html
internal/syscall/unix
time
regexp
context
internal/poll
os
internal/fmtsort
encoding/binary
runtime/debug
path/filepath
fmt
cmd/internal/sys
encoding/base64
crypto/md5
crypto/sha1
crypto/sha256
io/ioutil
os/exec
log
cmd/internal/edit
flag
cmd/internal/src
text/scanner
go/token
compress/flate
debug/dwarf
encoding/json
cmd/internal/bio
net/url
go/scanner
encoding/hex
cmd/internal/objabi
cmd/internal/goobj2
go/ast
math/big
cmd/compile/internal/syntax
compress/zlib
cmd/internal/dwarf
cmd/asm/internal/flags
cmd/internal/gcprog
debug/elf
cmd/asm/internal/lex
debug/macho
debug/pe
cmd/internal/obj
internal/xcoff
compress/gzip
go/parser
go/printer
runtime/pprof
runtime/trace
cmd/cgo
cmd/internal/obj/wasm
cmd/internal/obj/riscv
cmd/internal/obj/mips
cmd/internal/obj/arm
cmd/internal/obj/ppc64
cmd/internal/obj/arm64
cmd/internal/obj/s390x
cmd/internal/obj/x86
cmd/compile/internal/logopt
cmd/compile/internal/types
cmd/link/internal/sym
cmd/link/internal/objfile
cmd/link/internal/loader
cmd/link/internal/loadmacho
cmd/link/internal/loadpe
cmd/link/internal/loadelf
cmd/link/internal/loadxcoff
cmd/asm/internal/arch
cmd/link/internal/ld
cmd/compile/internal/ssa
cmd/asm/internal/asm
cmd/asm
cmd/link/internal/amd64
cmd/link/internal/arm
cmd/link/internal/mips64
cmd/link/internal/arm64
cmd/link/internal/mips
cmd/link/internal/ppc64
cmd/link/internal/riscv64
cmd/link/internal/s390x
cmd/link/internal/wasm
cmd/link/internal/x86
cmd/link
cmd/compile/internal/gc
cmd/compile/internal/wasm
cmd/compile/internal/arm
cmd/compile/internal/mips
cmd/compile/internal/mips64
cmd/compile/internal/arm64
cmd/compile/internal/s390x
cmd/compile/internal/amd64
cmd/compile/internal/ppc64
cmd/compile/internal/x86
cmd/compile

Building Go toolchain3 using go_bootstrap and Go toolchain2.
unicode/utf8
internal/race
runtime/internal/sys
unicode
runtime/internal/atomic
math/bits
internal/cpu
sync/atomic
encoding
runtime/internal/math
unicode/utf16
internal/goversion
internal/testlog
internal/bytealg
math
runtime
internal/reflectlite
sync
math/rand
errors
sort
internal/oserror
io
strconv
container/heap
syscall
hash
text/tabwriter
bytes
strings
hash/adler32
hash/crc32
crypto
reflect
bufio
path
regexp/syntax
html
internal/syscall/unix
time
regexp
context
internal/poll
os
internal/fmtsort
encoding/binary
cmd/internal/sys
encoding/base64
crypto/md5
crypto/sha1
crypto/sha256
runtime/debug
path/filepath
fmt
io/ioutil
os/exec
log
cmd/internal/edit
text/scanner
cmd/internal/src
flag
go/token
compress/flate
debug/dwarf
encoding/json
cmd/internal/bio
net/url
go/scanner
cmd/internal/objabi
encoding/hex
cmd/internal/goobj2
math/big
go/ast
cmd/compile/internal/syntax
cmd/internal/dwarf
cmd/asm/internal/flags
cmd/asm/internal/lex
internal/xcoff
compress/zlib
cmd/internal/obj
cmd/internal/gcprog
compress/gzip
debug/elf
debug/macho
debug/pe
runtime/pprof
go/parser
go/printer
runtime/trace
cmd/internal/obj/mips
cmd/internal/obj/arm64
cmd/internal/obj/arm
cmd/internal/obj/ppc64
cmd/internal/obj/riscv
cmd/internal/obj/s390x
cmd/internal/obj/wasm
cmd/internal/obj/x86
cmd/compile/internal/logopt
cmd/cgo
cmd/compile/internal/types
cmd/link/internal/sym
# cmd/link/internal/sym
src/cmd/link/internal/sym/segment.go:1:1: I/O error: read src/cmd/link/internal/sym/segment.go: is a directory
cmd/asm/internal/arch
cmd/compile/internal/ssa
cmd/asm/internal/asm
cmd/asm
cmd/compile/internal/gc
cmd/compile/internal/wasm
cmd/compile/internal/amd64
cmd/compile/internal/mips64
cmd/compile/internal/ppc64
cmd/compile/internal/arm64
cmd/compile/internal/mips
cmd/compile/internal/arm
cmd/compile/internal/s390x
cmd/compile/internal/x86
cmd/compile
go tool dist: FAILED: /home/mvdan/tip/pkg/tool/linux_amd64/go_bootstrap install -gcflags=all= -ldflags=all= -v -a -i cmd/asm cmd/cgo cmd/compile cmd/link: exit status 2
@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 22, 2019
@bcmills bcmills added this to the Go1.14 milestone Nov 22, 2019
@bcmills
Copy link
Contributor

bcmills commented Nov 22, 2019

Just a hunch, but it sounds like memory corruption to me.

(No occurrences of this failure mode in the dashboard, and we've got a bunch of other open bugs that seem to indicate memory corruption somewhere in the runtime and/or compiler.)

CC @ianlancetaylor @aclements @randall77

@mvdan
Copy link
Member Author

mvdan commented Nov 22, 2019

Yep, two of the memory corruption bugs @josharian listed a few days ago are mine, so it's certainly a possibility.

@aclements
Copy link
Member

Folding into the memory corruption super-bug.

@golang golang locked and limited conversation to collaborators Nov 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants