Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

golangci-lint immediately segfaults [MacOS 11] #1478

Open
laudiacay opened this issue Sep 16, 2021 · 3 comments
Open

golangci-lint immediately segfaults [MacOS 11] #1478

laudiacay opened this issue Sep 16, 2021 · 3 comments

Comments

@laudiacay
Copy link
Contributor

when calling golangci-lint as built after calling make in this repository, with no arguments, the following happens. The problem still occurs when I remove the go-no-map-range linter and rebuild.

I think the issue maybe has something to do with the golangci-lint version on my machine, but I'm not sure.

$ support/tools/bin/golangci-lint 
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff204e3c9e]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff204e3c9e
stack: frame={sp:0x7ffeefbff5c8, fp:0x7ffeefbff618} stack=[0x7ffeefb80668,0x7ffeefbff6d0)
0x00007ffeefbff4c8:  0x01007ffeefbff4e8  0x0000000000000004 
0x00007ffeefbff4d8:  0x000000000000001f  0x00007fff204e3c9e 
0x00007ffeefbff4e8:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbff4f8:  0x0000000004036071 <runtime.throw+0x0000000000000071>  0x00007ffeefbff598 
0x00007ffeefbff508:  0x0000000004a3d6e6  0x00007ffeefbff550 
0x00007ffeefbff518:  0x0000000004036328 <runtime.fatalthrow.func1+0x0000000000000048>  0x000000000526f740 
0x00007ffeefbff528:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbff538:  0x00007ffeefbff598  0x0000000004036071 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff548:  0x000000000526f740  0x00007ffeefbff588 
0x00007ffeefbff558:  0x00000000040362b0 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff568 
0x00007ffeefbff568:  0x00000000040362e0 <runtime.fatalthrow.func1+0x0000000000000000>  0x000000000526f740 
0x00007ffeefbff578:  0x0000000004036071 <runtime.throw+0x0000000000000071>  0x00007ffeefbff598 
0x00007ffeefbff588:  0x00007ffeefbff5b8  0x0000000004036071 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff598:  0x00007ffeefbff5a0  0x00000000040360a0 <runtime.throw.func1+0x0000000000000000> 
0x00007ffeefbff5a8:  0x0000000004a4bd86  0x000000000000002a 
0x00007ffeefbff5b8:  0x00007ffeefbff608  0x000000000404c556 <runtime.sigpanic+0x0000000000000396> 
0x00007ffeefbff5c8: <0x0000000004a4bd86  0x000000000526f740 
0x00007ffeefbff5d8:  0x00007ffeefbff648  0x0000000004028066 <runtime.(*mheap).allocSpan+0x0000000000000546> 
0x00007ffeefbff5e8:  0x000000c000218000  0x0000000000002000 
0x00007ffeefbff5f8:  0x000000c000000008  0x0000000000000000 
0x00007ffeefbff608:  0x00007ffeefbff650 !0x00007fff204e3c9e 
0x00007ffeefbff618: >0x00007ffeefbff650  0x00000000050d0000 
0x00007ffeefbff628:  0x000000000000035c  0x000000000427ab25 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 
0x00007ffeefbff638:  0x000000000406b65f <runtime.syscall+0x000000000000001f>  0x000000c000217848 
0x00007ffeefbff648:  0x00007ffeefbff690  0x000000c000217818 
0x00007ffeefbff658:  0x0000000004069490 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000001 
0x00007ffeefbff668:  0x0000000004003f00 <internal/abi.(*IntArgRegBitmap).Get+0x0000000000000020>  0x3f00000000001018 
0x00007ffeefbff678:  0x0000000000000000  0x00000000052ad6d8 
0x00007ffeefbff688:  0x0000000000000810  0x000000c0000001a0 
0x00007ffeefbff698:  0x00000000040675a9 <runtime.systemstack+0x0000000000000049>  0x0000000000000004 
0x00007ffeefbff6a8:  0x0000000004b58620  0x000000000526f740 
0x00007ffeefbff6b8:  0x00007ffeefbff700  0x00000000040674a5 <runtime.mstart+0x0000000000000005> 
0x00007ffeefbff6c8:  0x000000000406745d <runtime.rt0_go+0x000000000000013d> 
runtime.throw({0x4a4bd86, 0x526f740})
	/usr/local/Cellar/go/1.17/libexec/src/runtime/panic.go:1198 +0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff204e3c9e
stack: frame={sp:0x7ffeefbff5c8, fp:0x7ffeefbff618} stack=[0x7ffeefb80668,0x7ffeefbff6d0)
0x00007ffeefbff4c8:  0x01007ffeefbff4e8  0x0000000000000004 
0x00007ffeefbff4d8:  0x000000000000001f  0x00007fff204e3c9e 
0x00007ffeefbff4e8:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbff4f8:  0x0000000004036071 <runtime.throw+0x0000000000000071>  0x00007ffeefbff598 
0x00007ffeefbff508:  0x0000000004a3d6e6  0x00007ffeefbff550 
0x00007ffeefbff518:  0x0000000004036328 <runtime.fatalthrow.func1+0x0000000000000048>  0x000000000526f740 
0x00007ffeefbff528:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbff538:  0x00007ffeefbff598  0x0000000004036071 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff548:  0x000000000526f740  0x00007ffeefbff588 
0x00007ffeefbff558:  0x00000000040362b0 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff568 
0x00007ffeefbff568:  0x00000000040362e0 <runtime.fatalthrow.func1+0x0000000000000000>  0x000000000526f740 
0x00007ffeefbff578:  0x0000000004036071 <runtime.throw+0x0000000000000071>  0x00007ffeefbff598 
0x00007ffeefbff588:  0x00007ffeefbff5b8  0x0000000004036071 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff598:  0x00007ffeefbff5a0  0x00000000040360a0 <runtime.throw.func1+0x0000000000000000> 
0x00007ffeefbff5a8:  0x0000000004a4bd86  0x000000000000002a 
0x00007ffeefbff5b8:  0x00007ffeefbff608  0x000000000404c556 <runtime.sigpanic+0x0000000000000396> 
0x00007ffeefbff5c8: <0x0000000004a4bd86  0x000000000526f740 
0x00007ffeefbff5d8:  0x00007ffeefbff648  0x0000000004028066 <runtime.(*mheap).allocSpan+0x0000000000000546> 
0x00007ffeefbff5e8:  0x000000c000218000  0x0000000000002000 
0x00007ffeefbff5f8:  0x000000c000000008  0x0000000000000000 
0x00007ffeefbff608:  0x00007ffeefbff650 !0x00007fff204e3c9e 
0x00007ffeefbff618: >0x00007ffeefbff650  0x00000000050d0000 
0x00007ffeefbff628:  0x000000000000035c  0x000000000427ab25 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 
0x00007ffeefbff638:  0x000000000406b65f <runtime.syscall+0x000000000000001f>  0x000000c000217848 
0x00007ffeefbff648:  0x00007ffeefbff690  0x000000c000217818 
0x00007ffeefbff658:  0x0000000004069490 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000001 
0x00007ffeefbff668:  0x0000000004003f00 <internal/abi.(*IntArgRegBitmap).Get+0x0000000000000020>  0x3f00000000001018 
0x00007ffeefbff678:  0x0000000000000000  0x00000000052ad6d8 
0x00007ffeefbff688:  0x0000000000000810  0x000000c0000001a0 
0x00007ffeefbff698:  0x00000000040675a9 <runtime.systemstack+0x0000000000000049>  0x0000000000000004 
0x00007ffeefbff6a8:  0x0000000004b58620  0x000000000526f740 
0x00007ffeefbff6b8:  0x00007ffeefbff700  0x00000000040674a5 <runtime.mstart+0x0000000000000005> 
0x00007ffeefbff6c8:  0x000000000406745d <runtime.rt0_go+0x000000000000013d> 
runtime.sigpanic()
	/usr/local/Cellar/go/1.17/libexec/src/runtime/signal_unix.go:719 +0x396

goroutine 1 [syscall, locked to thread]:
syscall.syscall(0x427ab20, 0x1, 0x40487413, 0xc0002178d8)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/sys_darwin.go:22 +0x3b fp=0xc000217848 sp=0xc000217828 pc=0x406605b
syscall.syscall(0x40b71a6, 0xb840090, 0xc000217900, 0x40b70d8)
	<autogenerated>:1 +0x26 fp=0xc000217890 sp=0xc000217848 pc=0x406be26
golang.org/x/sys/unix.ioctl(0x49a669a, 0x4, 0x100000006e900)
	/Users/laudiacay/go/pkg/mod/golang.org/x/sys@v0.0.0-20200323222414-85ca7c5b95cd/unix/zsyscall_darwin_amd64.go:746 +0x39 fp=0xc0002178c0 sp=0xc000217890 pc=0x427a419
golang.org/x/sys/unix.IoctlGetTermios(...)
	/Users/laudiacay/go/pkg/mod/golang.org/x/sys@v0.0.0-20200323222414-85ca7c5b95cd/unix/ioctl.go:63
github.com/mattn/go-isatty.IsTerminal(0x49a669a)
	/Users/laudiacay/go/pkg/mod/github.com/mattn/go-isatty@v0.0.12/isatty_bsd.go:10 +0x50 fp=0xc000217930 sp=0xc0002178c0 pc=0x427ac30
github.com/fatih/color.init()
	/Users/laudiacay/go/pkg/mod/github.com/fatih/color@v1.9.0/color.go:21 +0x7a fp=0xc000217968 sp=0xc000217930 pc=0x427d17a
runtime.doInit(0x50d80c0)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6498 +0x123 fp=0xc000217aa0 sp=0xc000217968 pc=0x4045b03
runtime.doInit(0x50d81e0)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc000217bd8 sp=0xc000217aa0 pc=0x4045a51
runtime.doInit(0x50d7340)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc000217d10 sp=0xc000217bd8 pc=0x4045a51
runtime.doInit(0x50e0440)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc000217e48 sp=0xc000217d10 pc=0x4045a51
runtime.doInit(0x50d4860)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc000217f80 sp=0xc000217e48 pc=0x4045a51
runtime.main()
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:238 +0x1e6 fp=0xc000217fe0 sp=0xc000217f80 pc=0x4038986
runtime.goexit()
@Stebalien
Copy link
Member

Try a go clean -cache -modcache then rebuild? This isn't an issue with this repo.

@laudiacay
Copy link
Contributor Author

It seems like it's an issue with the version of golangci-lint we're using in this repo. When I upgrade it to the most recent version, it refuses to load the go-no-map-range linter (figuring out how to make that work now), but it stops segfaulting. Fix incoming in a second I think...

@laudiacay
Copy link
Contributor Author

yeah, that was a build artifact issue... PR'd

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants