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

Fix go 1.17 panic #196

Merged
merged 1 commit into from
Nov 18, 2021
Merged

Fix go 1.17 panic #196

merged 1 commit into from
Nov 18, 2021

Conversation

oleggator
Copy link
Contributor

@oleggator oleggator commented Nov 18, 2021

github.com/fatih/color v1.12.0 causes panic on go 1.17
This PR fixes this.

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff2033cc9e]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff2033cc9e
stack: frame={sp:0x7ffeefbff638, fp:0x7ffeefbff688} stack=[0x7ffeefb806d8,0x7ffeefbff740)
0x00007ffeefbff538:  0x01007ffeefbff558  0x0000000000000004 
0x00007ffeefbff548:  0x000000000000001f  0x00007fff2033cc9e 
0x00007ffeefbff558:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbff568:  0x0000000004039091 <runtime.throw+0x0000000000000071>  0x00007ffeefbff608 
0x00007ffeefbff578:  0x0000000004642d21  0x00007ffeefbff5c0 
0x00007ffeefbff588:  0x0000000004039348 <runtime.fatalthrow.func1+0x0000000000000048>  0x0000000004acb060 
0x00007ffeefbff598:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbff5a8:  0x00007ffeefbff608  0x0000000004039091 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff5b8:  0x0000000004acb060  0x00007ffeefbff5f8 
0x00007ffeefbff5c8:  0x00000000040392d0 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff5d8 
0x00007ffeefbff5d8:  0x0000000004039300 <runtime.fatalthrow.func1+0x0000000000000000>  0x0000000004acb060 
0x00007ffeefbff5e8:  0x0000000004039091 <runtime.throw+0x0000000000000071>  0x00007ffeefbff608 
0x00007ffeefbff5f8:  0x00007ffeefbff628  0x0000000004039091 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff608:  0x00007ffeefbff610  0x00000000040390c0 <runtime.throw.func1+0x0000000000000000> 
0x00007ffeefbff618:  0x000000000464b075  0x000000000000002a 
0x00007ffeefbff628:  0x00007ffeefbff678  0x000000000404f516 <runtime.sigpanic+0x0000000000000396> 
0x00007ffeefbff638: <0x000000000464b075  0x000000000401cc45 <runtime.(*fixalloc).alloc+0x0000000000000085> 
0x00007ffeefbff648:  0x00007ffeefbff6b8  0x000000000402a406 <runtime.(*mheap).allocSpan+0x0000000000000546> 
0x00007ffeefbff658:  0x000000c000144000  0x0000000000002000 
0x00007ffeefbff668:  0x000000c000000008  0x0000000000000000 
0x00007ffeefbff678:  0x00007ffeefbff6c0 !0x00007fff2033cc9e 
0x00007ffeefbff688: >0x00007ffeefbff6c0  0x0000000004a50000 
0x00007ffeefbff698:  0x00000000000007f7  0x0000000004109fa5 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 
0x00007ffeefbff6a8:  0x000000000406e11f <runtime.syscall+0x000000000000001f>  0x000000c00013dab8 
0x00007ffeefbff6b8:  0x00007ffeefbff700  0x000000c00013da88 
0x00007ffeefbff6c8:  0x000000000406bf70 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000001 
0x00007ffeefbff6d8:  0x000000c000112b00  0x2b000000046675a8 
0x00007ffeefbff6e8:  0x0000000000000010  0x00000000045928e0 
0x00007ffeefbff6f8:  0x00000000000005a0  0x000000c0000001a0 
0x00007ffeefbff708:  0x000000000406a089 <runtime.systemstack+0x0000000000000049>  0x0000000000000004 
0x00007ffeefbff718:  0x00000000046f16c8  0x0000000004acb060 
0x00007ffeefbff728:  0x00007ffeefbff778  0x0000000004069f85 <runtime.mstart+0x0000000000000005> 
0x00007ffeefbff738:  0x0000000004069f3d <runtime.rt0_go+0x000000000000013d> 
runtime.throw({0x464b075, 0x401cc45})
        /usr/local/opt/go/libexec/src/runtime/panic.go:1198 +0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff2033cc9e
stack: frame={sp:0x7ffeefbff638, fp:0x7ffeefbff688} stack=[0x7ffeefb806d8,0x7ffeefbff740)
0x00007ffeefbff538:  0x01007ffeefbff558  0x0000000000000004 
0x00007ffeefbff548:  0x000000000000001f  0x00007fff2033cc9e 
0x00007ffeefbff558:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbff568:  0x0000000004039091 <runtime.throw+0x0000000000000071>  0x00007ffeefbff608 
0x00007ffeefbff578:  0x0000000004642d21  0x00007ffeefbff5c0 
0x00007ffeefbff588:  0x0000000004039348 <runtime.fatalthrow.func1+0x0000000000000048>  0x0000000004acb060 
0x00007ffeefbff598:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbff5a8:  0x00007ffeefbff608  0x0000000004039091 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff5b8:  0x0000000004acb060  0x00007ffeefbff5f8 
0x00007ffeefbff5c8:  0x00000000040392d0 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff5d8 
0x00007ffeefbff5d8:  0x0000000004039300 <runtime.fatalthrow.func1+0x0000000000000000>  0x0000000004acb060 
0x00007ffeefbff5e8:  0x0000000004039091 <runtime.throw+0x0000000000000071>  0x00007ffeefbff608 
0x00007ffeefbff5f8:  0x00007ffeefbff628  0x0000000004039091 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff608:  0x00007ffeefbff610  0x00000000040390c0 <runtime.throw.func1+0x0000000000000000> 
0x00007ffeefbff618:  0x000000000464b075  0x000000000000002a 
0x00007ffeefbff628:  0x00007ffeefbff678  0x000000000404f516 <runtime.sigpanic+0x0000000000000396> 
0x00007ffeefbff638: <0x000000000464b075  0x000000000401cc45 <runtime.(*fixalloc).alloc+0x0000000000000085> 
0x00007ffeefbff648:  0x00007ffeefbff6b8  0x000000000402a406 <runtime.(*mheap).allocSpan+0x0000000000000546> 
0x00007ffeefbff658:  0x000000c000144000  0x0000000000002000 
0x00007ffeefbff668:  0x000000c000000008  0x0000000000000000 
0x00007ffeefbff678:  0x00007ffeefbff6c0 !0x00007fff2033cc9e 
0x00007ffeefbff688: >0x00007ffeefbff6c0  0x0000000004a50000 
0x00007ffeefbff698:  0x00000000000007f7  0x0000000004109fa5 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 
0x00007ffeefbff6a8:  0x000000000406e11f <runtime.syscall+0x000000000000001f>  0x000000c00013dab8 
0x00007ffeefbff6b8:  0x00007ffeefbff700  0x000000c00013da88 
0x00007ffeefbff6c8:  0x000000000406bf70 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000001 
0x00007ffeefbff6d8:  0x000000c000112b00  0x2b000000046675a8 
0x00007ffeefbff6e8:  0x0000000000000010  0x00000000045928e0 
0x00007ffeefbff6f8:  0x00000000000005a0  0x000000c0000001a0 
0x00007ffeefbff708:  0x000000000406a089 <runtime.systemstack+0x0000000000000049>  0x0000000000000004 
0x00007ffeefbff718:  0x00000000046f16c8  0x0000000004acb060 
0x00007ffeefbff728:  0x00007ffeefbff778  0x0000000004069f85 <runtime.mstart+0x0000000000000005> 
0x00007ffeefbff738:  0x0000000004069f3d <runtime.rt0_go+0x000000000000013d> 
runtime.sigpanic()
        /usr/local/opt/go/libexec/src/runtime/signal_unix.go:719 +0x396

goroutine 1 [syscall, locked to thread]:
syscall.syscall(0x4109fa0, 0x1, 0x40487413, 0xc00013db48)
        /usr/local/opt/go/libexec/src/runtime/sys_darwin.go:22 +0x3b fp=0xc00013dab8 sp=0xc00013da98 pc=0x4068bbb
syscall.syscall(0x4077326, 0x4010fd4, 0xc00013db70, 0x4077258)
        <autogenerated>:1 +0x26 fp=0xc00013db00 sp=0xc00013dab8 pc=0x406e8e6
golang.org/x/sys/unix.ioctl(0x463354f, 0x4, 0x1000000000008)
        /Users/o.utkin/go/pkg/mod/golang.org/x/sys@v0.0.0-20210420072515-93ed5bcd2bfe/unix/zsyscall_darwin_amd64.go:690 +0x39 fp=0xc00013db30 sp=0xc00013db00 pc=0x4109859
golang.org/x/sys/unix.IoctlGetTermios(...)
        /Users/o.utkin/go/pkg/mod/golang.org/x/sys@v0.0.0-20210420072515-93ed5bcd2bfe/unix/ioctl.go:73
github.com/mattn/go-isatty.IsTerminal(0x463354f)
        /Users/o.utkin/go/pkg/mod/github.com/mattn/go-isatty@v0.0.13/isatty_bsd.go:10 +0x50 fp=0xc00013dba0 sp=0xc00013db30 pc=0x410a0b0
github.com/fatih/color.init()
        /Users/o.utkin/go/pkg/mod/github.com/fatih/color@v1.12.0/color.go:23 +0xa5 fp=0xc00013dbd8 sp=0xc00013dba0 pc=0x410ada5
runtime.doInit(0x4a571c0)
        /usr/local/opt/go/libexec/src/runtime/proc.go:6498 +0x123 fp=0xc00013dd10 sp=0xc00013dbd8 pc=0x4048863
runtime.doInit(0x4a5dd60)
        /usr/local/opt/go/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00013de48 sp=0xc00013dd10 pc=0x40487b1
runtime.doInit(0x4a52c80)
        /usr/local/opt/go/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00013df80 sp=0xc00013de48 pc=0x40487b1
runtime.main()
        /usr/local/opt/go/libexec/src/runtime/proc.go:238 +0x1e6 fp=0xc00013dfe0 sp=0xc00013df80 pc=0x403b6e6
runtime.goexit()
        /usr/local/opt/go/libexec/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc00013dfe8 sp=0xc00013dfe0 pc=0x406c261

Copy link
Collaborator

@klauspost klauspost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@harshavardhana harshavardhana merged commit 8d7bda1 into minio:master Nov 18, 2021
@oleggator oleggator deleted the fix-1.17-panic branch November 19, 2021 08:38
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 this pull request may close these issues.

3 participants