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

Unknown error trying to run the spinner #134

Open
SamiAlsubhi opened this issue Mar 12, 2022 · 5 comments
Open

Unknown error trying to run the spinner #134

SamiAlsubhi opened this issue Mar 12, 2022 · 5 comments

Comments

@SamiAlsubhi
Copy link

SamiAlsubhi commented Mar 12, 2022

I am just taking simplest example to test the spinner:

func main() {

	s := spinner.New(spinner.CharSets[9], 100*time.Millisecond) // Build our new spinner
	s.Start()                                                   // Start the spinner
	time.Sleep(4 * time.Second)                                 // Run for some time to simulate work
	s.Stop()

}

and I get this stack of errors, any idea what is the issue?
go version: go1.17.1 darwin/amd64

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

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff20458c9e
stack: frame={sp:0x7ffeefbff4b8, fp:0x7ffeefbff508} stack=[0x7ffeefb80558,0x7ffeefbff5c0)
0x00007ffeefbff3b8:  0x01007ffeefbff3d8  0x0000000000000004 
0x00007ffeefbff3c8:  0x000000000000001f  0x00007fff20458c9e 
0x00007ffeefbff3d8:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbff3e8:  0x00000000040373b1 <runtime.throw+0x0000000000000071>  0x00007ffeefbff488 
0x00007ffeefbff3f8:  0x00000000043e8d38  0x00007ffeefbff440 
0x00007ffeefbff408:  0x0000000004037668 <runtime.fatalthrow.func1+0x0000000000000048>  0x00000000046033a0 
0x00007ffeefbff418:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbff428:  0x00007ffeefbff488  0x00000000040373b1 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff438:  0x00000000046033a0  0x00007ffeefbff478 
0x00007ffeefbff448:  0x00000000040375f0 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff458 
0x00007ffeefbff458:  0x0000000004037620 <runtime.fatalthrow.func1+0x0000000000000000>  0x00000000046033a0 
0x00007ffeefbff468:  0x00000000040373b1 <runtime.throw+0x0000000000000071>  0x00007ffeefbff488 
0x00007ffeefbff478:  0x00007ffeefbff4a8  0x00000000040373b1 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff488:  0x00007ffeefbff490  0x00000000040373e0 <runtime.throw.func1+0x0000000000000000> 
0x00007ffeefbff498:  0x00000000043ecef6  0x000000000000002a 
0x00007ffeefbff4a8:  0x00007ffeefbff4f8  0x000000000404c9b6 <runtime.sigpanic+0x0000000000000396> 
0x00007ffeefbff4b8: <0x00000000043ecef6  0x000000000401cd05 <runtime.(*fixalloc).alloc+0x0000000000000085> 
0x00007ffeefbff4c8:  0x00007ffeefbff538  0x000000000402a4c6 <runtime.(*mheap).allocSpan+0x0000000000000546> 
0x00007ffeefbff4d8:  0x000000c00011c000  0x000000000000e000 
0x00007ffeefbff4e8:  0x000000c000000008  0x0000000004076e00 <syscall.libc_stat64_trampoline+0x0000000000000000> 
0x00007ffeefbff4f8:  0x00007ffeefbff540 !0x00007fff20458c9e 
0x00007ffeefbff508: >0x00007ffeefbff540  0x00000000045c0000 
0x00007ffeefbff518:  0x00000000000003a1  0x00000000040f82e5 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 
0x00007ffeefbff528:  0x0000000004068abf <runtime.syscall+0x000000000000001f>  0x000000c000061ab8 
0x00007ffeefbff538:  0x00007ffeefbff580  0x000000c000061a88 
0x00007ffeefbff548:  0x0000000004066910 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000007 
0x00007ffeefbff558:  0x000000c000027a00  0x7a000000043f8278 
0x00007ffeefbff568:  0x0000000000000010  0x000000000439b280 
0x00007ffeefbff578:  0x00000000000005a0  0x000000c0000001a0 
0x00007ffeefbff588:  0x0000000004064a29 <runtime.systemstack+0x0000000000000049>  0x0000000000000004 
0x00007ffeefbff598:  0x0000000004436d60  0x00000000046033a0 
0x00007ffeefbff5a8:  0x00007ffeefbff5f8  0x0000000004064925 <runtime.mstart+0x0000000000000005> 
0x00007ffeefbff5b8:  0x00000000040648dd <runtime.rt0_go+0x000000000000013d> 
runtime.throw({0x43ecef6, 0x401cd05})
        /usr/local/go/src/runtime/panic.go:1198 +0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff20458c9e
stack: frame={sp:0x7ffeefbff4b8, fp:0x7ffeefbff508} stack=[0x7ffeefb80558,0x7ffeefbff5c0)
0x00007ffeefbff3b8:  0x01007ffeefbff3d8  0x0000000000000004 
0x00007ffeefbff3c8:  0x000000000000001f  0x00007fff20458c9e 
0x00007ffeefbff3d8:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbff3e8:  0x00000000040373b1 <runtime.throw+0x0000000000000071>  0x00007ffeefbff488 
0x00007ffeefbff3f8:  0x00000000043e8d38  0x00007ffeefbff440 
0x00007ffeefbff408:  0x0000000004037668 <runtime.fatalthrow.func1+0x0000000000000048>  0x00000000046033a0 
0x00007ffeefbff418:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbff428:  0x00007ffeefbff488  0x00000000040373b1 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff438:  0x00000000046033a0  0x00007ffeefbff478 
0x00007ffeefbff448:  0x00000000040375f0 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff458 
0x00007ffeefbff458:  0x0000000004037620 <runtime.fatalthrow.func1+0x0000000000000000>  0x00000000046033a0 
0x00007ffeefbff468:  0x00000000040373b1 <runtime.throw+0x0000000000000071>  0x00007ffeefbff488 
0x00007ffeefbff478:  0x00007ffeefbff4a8  0x00000000040373b1 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff488:  0x00007ffeefbff490  0x00000000040373e0 <runtime.throw.func1+0x0000000000000000> 
0x00007ffeefbff498:  0x00000000043ecef6  0x000000000000002a 
0x00007ffeefbff4a8:  0x00007ffeefbff4f8  0x000000000404c9b6 <runtime.sigpanic+0x0000000000000396> 
0x00007ffeefbff4b8: <0x00000000043ecef6  0x000000000401cd05 <runtime.(*fixalloc).alloc+0x0000000000000085> 
0x00007ffeefbff4c8:  0x00007ffeefbff538  0x000000000402a4c6 <runtime.(*mheap).allocSpan+0x0000000000000546> 
0x00007ffeefbff4d8:  0x000000c00011c000  0x000000000000e000 
0x00007ffeefbff4e8:  0x000000c000000008  0x0000000004076e00 <syscall.libc_stat64_trampoline+0x0000000000000000> 
0x00007ffeefbff4f8:  0x00007ffeefbff540 !0x00007fff20458c9e 
0x00007ffeefbff508: >0x00007ffeefbff540  0x00000000045c0000 
0x00007ffeefbff518:  0x00000000000003a1  0x00000000040f82e5 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 
0x00007ffeefbff528:  0x0000000004068abf <runtime.syscall+0x000000000000001f>  0x000000c000061ab8 
0x00007ffeefbff538:  0x00007ffeefbff580  0x000000c000061a88 
0x00007ffeefbff548:  0x0000000004066910 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000007 
0x00007ffeefbff558:  0x000000c000027a00  0x7a000000043f8278 
0x00007ffeefbff568:  0x0000000000000010  0x000000000439b280 
0x00007ffeefbff578:  0x00000000000005a0  0x000000c0000001a0 
0x00007ffeefbff588:  0x0000000004064a29 <runtime.systemstack+0x0000000000000049>  0x0000000000000004 
0x00007ffeefbff598:  0x0000000004436d60  0x00000000046033a0 
0x00007ffeefbff5a8:  0x00007ffeefbff5f8  0x0000000004064925 <runtime.mstart+0x0000000000000005> 
0x00007ffeefbff5b8:  0x00000000040648dd <runtime.rt0_go+0x000000000000013d> 
runtime.sigpanic()
        /usr/local/go/src/runtime/signal_unix.go:719 +0x396

goroutine 1 [syscall, locked to thread]:
syscall.syscall(0x40f82e0, 0x1, 0x40487413, 0xc000061b48)
        /usr/local/go/src/runtime/sys_darwin.go:22 +0x3b fp=0xc000061ab8 sp=0xc000061a98 pc=0x40634db
syscall.syscall(0x4071dc6, 0x4380b80, 0xc000061b70, 0x4071cf8)
        <autogenerated>:1 +0x26 fp=0xc000061b00 sp=0xc000061ab8 pc=0x4069286
golang.org/x/sys/unix.ioctl(0x43de921, 0x4, 0x1000000000000)
        /Users/sami/Desktop/golang/pkg/mod/golang.org/x/sys@v0.0.0-20200116001909-b77594299b42/unix/zsyscall_darwin_amd64.go:746 +0x39 fp=0xc000061b30 sp=0xc000061b00 pc=0x40f7f79
golang.org/x/sys/unix.IoctlGetTermios(...)
        /Users/sami/Desktop/golang/pkg/mod/golang.org/x/sys@v0.0.0-20200116001909-b77594299b42/unix/ioctl.go:63
github.com/mattn/go-isatty.IsTerminal(0x43de921)
        /Users/sami/Desktop/golang/pkg/mod/github.com/mattn/go-isatty@v0.0.12/isatty_bsd.go:10 +0x50 fp=0xc000061ba0 sp=0xc000061b30 pc=0x40f8390
github.com/fatih/color.init()
        /Users/sami/Desktop/golang/pkg/mod/github.com/fatih/color@v1.7.0/color.go:21 +0x7a fp=0xc000061bd8 sp=0xc000061ba0 pc=0x40f87fa
runtime.doInit(0x45c78c0)
        /usr/local/go/src/runtime/proc.go:6498 +0x123 fp=0xc000061d10 sp=0xc000061bd8 pc=0x4046923
runtime.doInit(0x45c84e0)
        /usr/local/go/src/runtime/proc.go:6475 +0x71 fp=0xc000061e48 sp=0xc000061d10 pc=0x4046871
runtime.doInit(0x45c79e0)
        /usr/local/go/src/runtime/proc.go:6475 +0x71 fp=0xc000061f80 sp=0xc000061e48 pc=0x4046871
runtime.main()
        /usr/local/go/src/runtime/proc.go:238 +0x1e6 fp=0xc000061fe0 sp=0xc000061f80 pc=0x4039a06
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc000061fe8 sp=0xc000061fe0 pc=0x4066c01
exit status 2
@briandowns
Copy link
Owner

I've tried this on my mac amd64 with Go 1.16 and 1.17 and am not seeing this. Is it possible to upgrade to a newer version of Go and test again? Curious why there are references to "golang.org/x/sys/unix" in there.

@theckman
Copy link

theckman commented Mar 12, 2022

@briandowns may be because this project's go.mod requires github.com/mattn/go-isatty, which in turn requires golang.org/x/sys/unix.

@theckman
Copy link

theckman commented Mar 12, 2022

@SamiAlsubhi what version of macOS is this running against? Is it an Intel or ARM (M1) Mac? Does the same happen on the latest Go release (1.17.8)?

@briandowns
Copy link
Owner

He stated go1.17.1 darwin/amd64 and I've asked him to upgrade and try again.

@theckman
Copy link

Ah I missed the Go version there. 👍 MacOS version can also be a factor, so it could be helpful to know that too. I have a few Mac's laying around I could maybe test with (depending on the OS version).

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

No branches or pull requests

3 participants