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

color.SetOutput() panics on go 1.17 #46

Closed
shoenseiwaso opened this issue Sep 7, 2021 · 0 comments · Fixed by #47
Closed

color.SetOutput() panics on go 1.17 #46

shoenseiwaso opened this issue Sep 7, 2021 · 0 comments · Fixed by #47

Comments

@shoenseiwaso
Copy link
Contributor

shoenseiwaso commented Sep 7, 2021

The problem is on this line:

if w, ok := w.(*os.File); !ok || !isatty.IsTerminal(w.Fd()) {

The panic is fixed v0.0.14 of the upstream go-isatty, via mattn/go-isatty#66

Root cause is here:
golang/go#47776

Here's what the panic looks like on go 1.17:

runtime.sigpanic()
	/usr/local/Cellar/go/1.17/libexec/src/runtime/signal_unix.go:719 +0x396

goroutine 1 [syscall, locked to thread]:
syscall.syscall(0x4321040, 0x1, 0x40487413, 0xc00015b8c0)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/sys_darwin.go:22 +0x3b fp=0xc00015b830 sp=0xc00015b810 pc=0x4061bfb
syscall.syscall(0xc00010cea0, 0xc00015b900, 0x400ee34, 0x100000000000000)
	<autogenerated>:1 +0x26 fp=0xc00015b878 sp=0xc00015b830 pc=0x4067926
golang.org/x/sys/unix.ioctl(0x18, 0x100000004a9d108, 0x4aa6328)
	/Users/jeff/go/pkg/mod/golang.org/x/sys@v0.0.0-20200930185726-fdedc70b468f/unix/zsyscall_darwin_amd64.go:731 +0x39 fp=0xc00015b8a8 sp=0xc00015b878 pc=0x4320cd9
golang.org/x/sys/unix.IoctlGetTermios(...)
	/Users/jeff/go/pkg/mod/golang.org/x/sys@v0.0.0-20200930185726-fdedc70b468f/unix/ioctl.go:72
github.com/mattn/go-isatty.IsTerminal(0x44ff480)
	/Users/jeff/go/pkg/mod/github.com/mattn/go-isatty@v0.0.12/isatty_bsd.go:10 +0x50 fp=0xc00015b918 sp=0xc00015b8a8 pc=0x433f470
github.com/labstack/gommon/color.(*Color).SetOutput(0xc00000e3f0, {0x4609b40, 0xc000010018})
	/Users/jeff/go/pkg/mod/github.com/labstack/gommon@v0.3.0/color/color.go:146 +0x92 fp=0xc00015b938 sp=0xc00015b918 pc=0x433f8b2
github.com/labstack/gommon/color.New(...)
	/Users/jeff/go/pkg/mod/github.com/labstack/gommon@v0.3.0/color/color.go:134
github.com/labstack/gommon/color.init()
	/Users/jeff/go/pkg/mod/github.com/labstack/gommon@v0.3.0/color/color.go:102 +0x4ea fp=0xc00015b968 sp=0xc00015b938 pc=0x4340f6a
runtime.doInit(0x48edce0)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6498 +0x123 fp=0xc00015baa0 sp=0xc00015b968 pc=0x4044c03
runtime.doInit(0x48f2320)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00015bbd8 sp=0xc00015baa0 pc=0x4044b51
runtime.doInit(0x48f10c0)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00015bd10 sp=0xc00015bbd8 pc=0x4044b51
runtime.doInit(0x48f11a0)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00015be48 sp=0xc00015bd10 pc=0x4044b51
runtime.doInit(0x48efba0)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00015bf80 sp=0xc00015be48 pc=0x4044b51
runtime.main()
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:238 +0x1e6 fp=0xc00015bfe0 sp=0xc00015bf80 pc=0x4037ce6
runtime.goexit()
	/usr/local/Cellar/go/1.17/libexec/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc00015bfe8 sp=0xc00015bfe0 pc=0x40652a1
exit status 2
@vishr vishr closed this as completed in #47 Sep 8, 2021
tsachiherman pushed a commit to algorand/go-algorand that referenced this issue Oct 28, 2021
Summary

@barnjamin mentioned in #2899 that labstack/gommon/issues/46 has a similar issue.

Should be fixed by up version of sys. Closing #2899.
cce pushed a commit to cce/go-algorand that referenced this issue Oct 28, 2021
Summary

@barnjamin mentioned in algorand#2899 that labstack/gommon/issues/46 has a similar issue.

Should be fixed by up version of sys. Closing algorand#2899.
sparshev added a commit to adobe/aquarium-fish that referenced this issue May 12, 2022
Now fish supports the naming that includes strict image version.

And by the way:
* Updated the echo dep due to panic in go 1.17: labstack/gommon#46
* Fixed start of the not allocated resources during node init
* Updated the test scripts and created script to fill images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant