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

x/sys/unix: crash during initialization #51943

Closed
csueiras opened this issue Mar 25, 2022 · 4 comments
Closed

x/sys/unix: crash during initialization #51943

csueiras opened this issue Mar 25, 2022 · 4 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@csueiras
Copy link

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

go version
go version go1.17.8 darwin/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/csueiras/Library/Caches/go-build"
GOENV="/Users/csueiras/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/csueiras/code/fleet/pkg/mod"
GONOPROXY="off"
GONOSUMDB="lab.co.clearstreet.io/clearstreet"
GOOS="darwin"
GOPATH="/Users/csueiras/code/fleet"
GOPRIVATE="lab.co.clearstreet.io/clearstreet"
GOPROXY="https://artifacts.co.clearstreet.io/artifactory/go/,direct"
GOROOT="/usr/local/Cellar/go/1.17.8/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.17.8/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17.8"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/csueiras/code/fleet/src/apollo/services/bk/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 -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/tx/gfyd03_n4ld5w5q32hjbgw940000gq/T/go-build3193204292=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I'm just trying to run some tests, this fails every time I try to run tests. We recently upgraded from go 1.13, and with go 1.13 I was able to run all tests just fine.

✗ go test cmd/bkcoordinator/app/app_integration_test.go
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff7081a70a]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff7081a70a
stack: frame={sp:0x7ffeefbfedc8, fp:0x7ffeefbfee18} stack=[0x7ffeefb7fe68,0x7ffeefbfeed0)
0x00007ffeefbfecc8:  0x01007ffeefbfece8  0x0000000000000004
0x00007ffeefbfecd8:  0x000000000000001f  0x00007fff7081a70a
0x00007ffeefbfece8:  0x0b01dfacedebac1e  0x0000000000000001
0x00007ffeefbfecf8:  0x0000000004039a71 <runtime.throw+0x0000000000000071>  0x00007ffeefbfed98
0x00007ffeefbfed08:  0x000000000537c327  0x00007ffeefbfed50
0x00007ffeefbfed18:  0x0000000004039d28 <runtime.fatalthrow.func1+0x0000000000000048>  0x000000000604d340
0x00007ffeefbfed28:  0x0000000000000001  0x0000000000000001
0x00007ffeefbfed38:  0x00007ffeefbfed98  0x0000000004039a71 <runtime.throw+0x0000000000000071>
0x00007ffeefbfed48:  0x000000000604d340  0x00007ffeefbfed88
0x00007ffeefbfed58:  0x0000000004039cb0 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbfed68
0x00007ffeefbfed68:  0x0000000004039ce0 <runtime.fatalthrow.func1+0x0000000000000000>  0x000000000604d340
0x00007ffeefbfed78:  0x0000000004039a71 <runtime.throw+0x0000000000000071>  0x00007ffeefbfed98
0x00007ffeefbfed88:  0x00007ffeefbfedb8  0x0000000004039a71 <runtime.throw+0x0000000000000071>
0x00007ffeefbfed98:  0x00007ffeefbfeda0  0x0000000004039aa0 <runtime.throw.func1+0x0000000000000000>
0x00007ffeefbfeda8:  0x0000000005395889  0x000000000000002a
0x00007ffeefbfedb8:  0x00007ffeefbfee08  0x0000000004050096 <runtime.sigpanic+0x0000000000000396>
0x00007ffeefbfedc8: <0x0000000005395889  0x0000000000000000
0x00007ffeefbfedd8:  0x0000000005fc0540  0x000000000406d6c1 <runtime.goexit+0x0000000000000001>
0x00007ffeefbfede8:  0x000000000403c0c6 <runtime.main+0x00000000000001e6>  0x000000000604d340
0x00007ffeefbfedf8:  0x00007ffeefbfee40  0x000000000402b551 <runtime.addspecial+0x0000000000000191>
0x00007ffeefbfee08:  0x00007ffeefbfee50 !0x00007fff7081a70a
0x00007ffeefbfee18: >0x00007ffeefbfee50  0x0000000005f54000
0x00007ffeefbfee28:  0x00000000000007d6  0x00000000044d1c25 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005>
0x00007ffeefbfee38:  0x000000000406f59f <runtime.syscall+0x000000000000001f>  0x000000c00019f710
0x00007ffeefbfee48:  0x000000000402baea <runtime.setprofilebucket+0x000000000000006a>  0x000000c00019f6e0
0x00007ffeefbfee58:  0x000000000406d3d0 <runtime.asmcgocall+0x0000000000000070>  0x0000000006780180
0x00007ffeefbfee68:  0x000000c00014d680  0x00007ffeefbfee90
0x00007ffeefbfee78:  0x00000000040305e5 <runtime.mProf_Malloc.func1+0x0000000000000025>  0x000000000608b240
0x00007ffeefbfee88:  0x0000000000000948  0x000000c0000001a0
0x00007ffeefbfee98:  0x000000000406b4e9 <runtime.systemstack+0x0000000000000049>  0x0000000000000004
0x00007ffeefbfeea8:  0x00000000055babf8  0x000000000604d340
0x00007ffeefbfeeb8:  0x00007ffeefbfef08  0x000000000406b3e5 <runtime.mstart+0x0000000000000005>
0x00007ffeefbfeec8:  0x000000000406b39d <runtime.rt0_go+0x000000000000013d>
runtime.throw({0x5395889, 0x0})
	/usr/local/Cellar/go/1.17.8/libexec/src/runtime/panic.go:1198 +0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff7081a70a
stack: frame={sp:0x7ffeefbfedc8, fp:0x7ffeefbfee18} stack=[0x7ffeefb7fe68,0x7ffeefbfeed0)
0x00007ffeefbfecc8:  0x01007ffeefbfece8  0x0000000000000004
0x00007ffeefbfecd8:  0x000000000000001f  0x00007fff7081a70a
0x00007ffeefbfece8:  0x0b01dfacedebac1e  0x0000000000000001
0x00007ffeefbfecf8:  0x0000000004039a71 <runtime.throw+0x0000000000000071>  0x00007ffeefbfed98
0x00007ffeefbfed08:  0x000000000537c327  0x00007ffeefbfed50
0x00007ffeefbfed18:  0x0000000004039d28 <runtime.fatalthrow.func1+0x0000000000000048>  0x000000000604d340
0x00007ffeefbfed28:  0x0000000000000001  0x0000000000000001
0x00007ffeefbfed38:  0x00007ffeefbfed98  0x0000000004039a71 <runtime.throw+0x0000000000000071>
0x00007ffeefbfed48:  0x000000000604d340  0x00007ffeefbfed88
0x00007ffeefbfed58:  0x0000000004039cb0 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbfed68
0x00007ffeefbfed68:  0x0000000004039ce0 <runtime.fatalthrow.func1+0x0000000000000000>  0x000000000604d340
0x00007ffeefbfed78:  0x0000000004039a71 <runtime.throw+0x0000000000000071>  0x00007ffeefbfed98
0x00007ffeefbfed88:  0x00007ffeefbfedb8  0x0000000004039a71 <runtime.throw+0x0000000000000071>
0x00007ffeefbfed98:  0x00007ffeefbfeda0  0x0000000004039aa0 <runtime.throw.func1+0x0000000000000000>
0x00007ffeefbfeda8:  0x0000000005395889  0x000000000000002a
0x00007ffeefbfedb8:  0x00007ffeefbfee08  0x0000000004050096 <runtime.sigpanic+0x0000000000000396>
0x00007ffeefbfedc8: <0x0000000005395889  0x0000000000000000
0x00007ffeefbfedd8:  0x0000000005fc0540  0x000000000406d6c1 <runtime.goexit+0x0000000000000001>
0x00007ffeefbfede8:  0x000000000403c0c6 <runtime.main+0x00000000000001e6>  0x000000000604d340
0x00007ffeefbfedf8:  0x00007ffeefbfee40  0x000000000402b551 <runtime.addspecial+0x0000000000000191>
0x00007ffeefbfee08:  0x00007ffeefbfee50 !0x00007fff7081a70a
0x00007ffeefbfee18: >0x00007ffeefbfee50  0x0000000005f54000
0x00007ffeefbfee28:  0x00000000000007d6  0x00000000044d1c25 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005>
0x00007ffeefbfee38:  0x000000000406f59f <runtime.syscall+0x000000000000001f>  0x000000c00019f710
0x00007ffeefbfee48:  0x000000000402baea <runtime.setprofilebucket+0x000000000000006a>  0x000000c00019f6e0
0x00007ffeefbfee58:  0x000000000406d3d0 <runtime.asmcgocall+0x0000000000000070>  0x0000000006780180
0x00007ffeefbfee68:  0x000000c00014d680  0x00007ffeefbfee90
0x00007ffeefbfee78:  0x00000000040305e5 <runtime.mProf_Malloc.func1+0x0000000000000025>  0x000000000608b240
0x00007ffeefbfee88:  0x0000000000000948  0x000000c0000001a0
0x00007ffeefbfee98:  0x000000000406b4e9 <runtime.systemstack+0x0000000000000049>  0x0000000000000004
0x00007ffeefbfeea8:  0x00000000055babf8  0x000000000604d340
0x00007ffeefbfeeb8:  0x00007ffeefbfef08  0x000000000406b3e5 <runtime.mstart+0x0000000000000005>
0x00007ffeefbfeec8:  0x000000000406b39d <runtime.rt0_go+0x000000000000013d>
runtime.sigpanic()
	/usr/local/Cellar/go/1.17.8/libexec/src/runtime/signal_unix.go:719 +0x396

goroutine 1 [syscall, locked to thread]:
syscall.syscall(0x44d1c20, 0x1, 0x40487413, 0xc00019f7a0)
	/usr/local/Cellar/go/1.17.8/libexec/src/runtime/sys_darwin.go:22 +0x3b fp=0xc00019f710 sp=0xc00019f6f0 pc=0x4069f9b
syscall.syscall(0x4079ce6, 0x4006e05, 0xc00019f7c8, 0x4079c18)
	<autogenerated>:1 +0x26 fp=0xc00019f758 sp=0xc00019f710 pc=0x406fd66
golang.org/x/sys/unix.ioctl(0x5351409, 0x4, 0x1000000203000)
	/Users/csueiras/code/fleet/pkg/mod/golang.org/x/sys@v0.0.0-20210423082822-04245dca01da/unix/zsyscall_darwin_amd64.go:690 +0x39 fp=0xc00019f788 sp=0xc00019f758 pc=0x44d1519
golang.org/x/sys/unix.IoctlGetTermios(...)
	/Users/csueiras/code/fleet/pkg/mod/golang.org/x/sys@v0.0.0-20210423082822-04245dca01da/unix/ioctl.go:73
github.com/mattn/go-isatty.IsTerminal(0x5351409)
	/Users/csueiras/code/fleet/pkg/mod/github.com/mattn/go-isatty@v0.0.12/isatty_bsd.go:10 +0x50 fp=0xc00019f7f8 sp=0xc00019f788 pc=0x46826d0
github.com/fatih/color.init()
	/Users/csueiras/code/fleet/pkg/mod/github.com/fatih/color@v1.10.0/color.go:21 +0x7a fp=0xc00019f830 sp=0xc00019f7f8 pc=0x4682ada
runtime.doInit(0x5fae800)
	/usr/local/Cellar/go/1.17.8/libexec/src/runtime/proc.go:6498 +0x123 fp=0xc00019f968 sp=0xc00019f830 pc=0x4049383
runtime.doInit(0x5fb6680)
	/usr/local/Cellar/go/1.17.8/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00019faa0 sp=0xc00019f968 pc=0x40492d1
runtime.doInit(0x5fb8080)
	/usr/local/Cellar/go/1.17.8/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00019fbd8 sp=0xc00019faa0 pc=0x40492d1
runtime.doInit(0x5fb09a0)
	/usr/local/Cellar/go/1.17.8/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00019fd10 sp=0xc00019fbd8 pc=0x40492d1
runtime.doInit(0x5fbc2e0)
	/usr/local/Cellar/go/1.17.8/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00019fe48 sp=0xc00019fd10 pc=0x40492d1
runtime.doInit(0x5faa640)
	/usr/local/Cellar/go/1.17.8/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00019ff80 sp=0xc00019fe48 pc=0x40492d1
runtime.main()
	/usr/local/Cellar/go/1.17.8/libexec/src/runtime/proc.go:238 +0x1e6 fp=0xc00019ffe0 sp=0xc00019ff80 pc=0x403c0c6
runtime.goexit()
	/usr/local/Cellar/go/1.17.8/libexec/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc00019ffe8 sp=0xc00019ffe0 pc=0x406d6c1
FAIL	command-line-arguments	0.423s
FAIL

What did you expect to see?

Run the tests

What did you see instead?

A panic due to SIGSEGV

@seankhliao
Copy link
Member

does updating golang.org/x/sys help?

@seankhliao
Copy link
Member

also, what macos version?

@mknyszek mknyszek changed the title affected/package: runtime (with go test) x/sys/unix: crash during initialization Mar 25, 2022
@gopherbot gopherbot added this to the Unreleased milestone Mar 25, 2022
@mknyszek
Copy link
Contributor

+1 to what @seankhliao said. This looks like a stale version of golang.org/x/sys being used.

@mknyszek mknyszek added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Mar 25, 2022
@csueiras
Copy link
Author

Upgrading x/sys to latest fixed the issue

@golang golang locked and limited conversation to collaborators Mar 25, 2023
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. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants