Repository navigation
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
Please answer these questions before submitting your issue. Thanks!
What did you do?
-
Install coreutils package on Mac:
brew install coreutils -
Attempt to run a Go program with line buffering output:
gstdbuf --output=L go test ./...
What did you expect to see?
I expected the tests to run.
What did you see instead?
$ gstdbuf --output=0 go test ./...
go tool compile: exit status 2
fatal error: runtime: bsdthread_register error (unset DYLD_INSERT_LIBRARIES)
runtime stack:
runtime.throw(0x183236f, 0x3f)
/Users/kevin/go/src/runtime/panic.go:589 +0x72 fp=0x7ffeefbff298 sp=0x7ffeefbff268 pc=0x102a272
runtime.goenvs()
/Users/kevin/go/src/runtime/os_darwin.go:127 +0x9c fp=0x7ffeefbff2c8 sp=0x7ffeefbff298 pc=0x10280bc
runtime.schedinit()
/Users/kevin/go/src/runtime/proc.go:505 +0xd3 fp=0x7ffeefbff330 sp=0x7ffeefbff2c8 pc=0x102cbc3
runtime.rt0_go(0x7ffeefbff360, 0x2, 0x7ffeefbff360, 0x0, 0x2, 0x7ffeefbff5f8, 0x7ffeefbff626, 0x0, 0x7ffeefbff62e, 0x7ffeefbff684, ...)
/Users/kevin/go/src/runtime/asm_amd64.s:223 +0x187 fp=0x7ffeefbff338 sp=0x7ffeefbff330 pc=0x1053887
go tool compile: exit status 2
fatal error: runtime: bsdthread_register error (unset DYLD_INSERT_LIBRARIES)
runtime stack:
runtime.throw(0x183236f, 0x3f)
/Users/kevin/go/src/runtime/panic.go:589 +0x72 fp=0x7ffeefbff298 sp=0x7ffeefbff268 pc=0x102a272
runtime.goenvs()
/Users/kevin/go/src/runtime/os_darwin.go:127 +0x9c fp=0x7ffeefbff2c8 sp=0x7ffeefbff298 pc=0x10280bc
runtime.schedinit()
/Users/kevin/go/src/runtime/proc.go:505 +0xd3 fp=0x7ffeefbff330 sp=0x7ffeefbff2c8 pc=0x102cbc3
runtime.rt0_go(0x7ffeefbff360, 0x2, 0x7ffeefbff360, 0x0, 0x2, 0x7ffeefbff5f8, 0x7ffeefbff626, 0x0, 0x7ffeefbff62e, 0x7ffeefbff684, ...)
/Users/kevin/go/src/runtime/asm_amd64.s:223 +0x187 fp=0x7ffeefbff338 sp=0x7ffeefbff330 pc=0x1053887
Does this issue reproduce with the latest release (go1.10.1)?
Yes
System details
go version devel +adb52cff58 Fri Apr 27 20:57:51 2018 +0000 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/kevin/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/kevin"
GORACE=""
GOROOT="/Users/kevin/go"
GOTMPDIR=""
GOTOOLDIR="/Users/kevin/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/sf/fsn3_vgd0n98r0jb86bgp83r0000gn/T/go-build352001371=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version devel +adb52cff58 Fri Apr 27 20:57:51 2018 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +adb52cff58 Fri Apr 27 20:57:51 2018 +0000
uname -v: Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64
ProductName: Mac OS X
ProductVersion: 10.13.4
BuildVersion: 17E199
lldb --version: lldb-900.0.57
Swift-4.0
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Activity
kevinburke commentedon Apr 29, 2018
To be clear line buffering doesn't matter / isn't important for this particular program. It was just the first thing I thought of when I wanted to test out
stdbuf/gstdbuf, and it turns out it panics and I figured at the very least we could prevent a panic there or present a better error message.If the answer is "don't run your program after messing with the line buffer" that's fine too.
[-]cmd/compile: fatal error[/-][+]cmd/compile: fatal error on Mac when caller changes stdout buffering[/+]randall77 commentedon Apr 29, 2018
This may be fixed as part of #17490. If you have a chance, try to rebuild the Go distribution using the pending CL on that issue and report back whether it fixes this issue.
kevinburke commentedon Apr 29, 2018
I rebuilt with the pending CL. The first time I ran
gstdbuf --output=0 go test ./...I gotgo tool: no such tool "vet". I then ran the same prefix withgo install ./...andgo test ./...and the second time I ran the tests, they passed with no problems.ianlancetaylor commentedon May 1, 2018
@kevinburke Is there anything else to do here?
kevinburke commentedon May 1, 2018
I don't think so...