mitranim / gow

Missing watch mode for Go commands. Watch Go files and execute a command like "go run" or "go test"
The Unlicense
772 stars 29 forks source link

SIGSEGV on 1.17.1 #18

Closed deltamualpha closed 3 years ago

deltamualpha commented 3 years ago

MacOS, fully updated, crashes immediately whenever I try to use gow for anything. 99% sure it worked on 1.17...

I can't tell if this is a bug in gow, github.com/rjeczalik/notify, or the runtime itself, but I'm starting here.

Stacktrace attached. ``` gow -c test -cover ./... fatal error: unexpected signal during runtime execution [signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff204a6c9e] runtime stack: runtime: unexpected return pc for runtime.sigpanic called from 0x7fff204a6c9e stack: frame={sp:0x7ffeefbff5d8, fp:0x7ffeefbff628} stack=[0x7ffeefb80678,0x7ffeefbff6e0) 0x00007ffeefbff4d8: 0x01007ffeefbff4f8 0x0000000000000004 0x00007ffeefbff4e8: 0x000000000000001f 0x00007fff204a6c9e 0x00007ffeefbff4f8: 0x0b01dfacedebac1e 0x0000000000000001 0x00007ffeefbff508: 0x00000000040348f1 0x00007ffeefbff5a8 0x00007ffeefbff518: 0x00000000040fd9b8 0x00007ffeefbff560 0x00007ffeefbff528: 0x0000000004034ba8 0x00000000041cb6e0 0x00007ffeefbff538: 0x0000000000000001 0x0000000000000001 0x00007ffeefbff548: 0x00007ffeefbff5a8 0x00000000040348f1 0x00007ffeefbff558: 0x00000000041cb6e0 0x00007ffeefbff598 0x00007ffeefbff568: 0x0000000004034b30 0x00007ffeefbff578 0x00007ffeefbff578: 0x0000000004034b60 0x00000000041cb6e0 0x00007ffeefbff588: 0x00000000040348f1 0x00007ffeefbff5a8 0x00007ffeefbff598: 0x00007ffeefbff5c8 0x00000000040348f1 0x00007ffeefbff5a8: 0x00007ffeefbff5b0 0x0000000004034920 0x00007ffeefbff5b8: 0x00000000040ffa7b 0x000000000000002a 0x00007ffeefbff5c8: 0x00007ffeefbff618 0x000000000404a416 0x00007ffeefbff5d8: <0x00000000040ffa7b 0x0000000005b040f0 0x00007ffeefbff5e8: 0x00007ffeefbff658 0x0000000004028006 0x00007ffeefbff5f8: 0x000000c000136000 0x0000000000002000 0x00007ffeefbff608: 0x000000c000000008 0x0000000000000000 0x00007ffeefbff618: 0x00007ffeefbff660 !0x00007fff204a6c9e 0x00007ffeefbff628: >0x00007ffeefbff660 0x00000000041b0000 0x00007ffeefbff638: 0x00000000000002e9 0x0000000004083e85 0x00007ffeefbff648: 0x000000000406539f 0x000000c000125b88 0x00007ffeefbff658: 0x00000000041cbac0 0x000000c000125b58 0x00007ffeefbff668: 0x0000000004063230 0x00007ffeefbff6a0 0x00007ffeefbff678: 0x000000000400fe8e 0x0000000000000030 0x00007ffeefbff688: 0x0000000000000010 0x00000000041fb7a0 0x00007ffeefbff698: 0x00000000000004d0 0x000000c0000001a0 0x00007ffeefbff6a8: 0x0000000004061349 0x0000000000000004 0x00007ffeefbff6b8: 0x000000000411d170 0x00000000041cb6e0 0x00007ffeefbff6c8: 0x00007ffeefbff718 0x0000000004061245 0x00007ffeefbff6d8: 0x00000000040611fd runtime.throw({0x40ffa7b, 0x5b040f0}) /usr/local/Cellar/go/1.17.1/libexec/src/runtime/panic.go:1198 +0x71 runtime: unexpected return pc for runtime.sigpanic called from 0x7fff204a6c9e stack: frame={sp:0x7ffeefbff5d8, fp:0x7ffeefbff628} stack=[0x7ffeefb80678,0x7ffeefbff6e0) 0x00007ffeefbff4d8: 0x01007ffeefbff4f8 0x0000000000000004 0x00007ffeefbff4e8: 0x000000000000001f 0x00007fff204a6c9e 0x00007ffeefbff4f8: 0x0b01dfacedebac1e 0x0000000000000001 0x00007ffeefbff508: 0x00000000040348f1 0x00007ffeefbff5a8 0x00007ffeefbff518: 0x00000000040fd9b8 0x00007ffeefbff560 0x00007ffeefbff528: 0x0000000004034ba8 0x00000000041cb6e0 0x00007ffeefbff538: 0x0000000000000001 0x0000000000000001 0x00007ffeefbff548: 0x00007ffeefbff5a8 0x00000000040348f1 0x00007ffeefbff558: 0x00000000041cb6e0 0x00007ffeefbff598 0x00007ffeefbff568: 0x0000000004034b30 0x00007ffeefbff578 0x00007ffeefbff578: 0x0000000004034b60 0x00000000041cb6e0 0x00007ffeefbff588: 0x00000000040348f1 0x00007ffeefbff5a8 0x00007ffeefbff598: 0x00007ffeefbff5c8 0x00000000040348f1 0x00007ffeefbff5a8: 0x00007ffeefbff5b0 0x0000000004034920 0x00007ffeefbff5b8: 0x00000000040ffa7b 0x000000000000002a 0x00007ffeefbff5c8: 0x00007ffeefbff618 0x000000000404a416 0x00007ffeefbff5d8: <0x00000000040ffa7b 0x0000000005b040f0 0x00007ffeefbff5e8: 0x00007ffeefbff658 0x0000000004028006 0x00007ffeefbff5f8: 0x000000c000136000 0x0000000000002000 0x00007ffeefbff608: 0x000000c000000008 0x0000000000000000 0x00007ffeefbff618: 0x00007ffeefbff660 !0x00007fff204a6c9e 0x00007ffeefbff628: >0x00007ffeefbff660 0x00000000041b0000 0x00007ffeefbff638: 0x00000000000002e9 0x0000000004083e85 0x00007ffeefbff648: 0x000000000406539f 0x000000c000125b88 0x00007ffeefbff658: 0x00000000041cbac0 0x000000c000125b58 0x00007ffeefbff668: 0x0000000004063230 0x00007ffeefbff6a0 0x00007ffeefbff678: 0x000000000400fe8e 0x0000000000000030 0x00007ffeefbff688: 0x0000000000000010 0x00000000041fb7a0 0x00007ffeefbff698: 0x00000000000004d0 0x000000c0000001a0 0x00007ffeefbff6a8: 0x0000000004061349 0x0000000000000004 0x00007ffeefbff6b8: 0x000000000411d170 0x00000000041cb6e0 0x00007ffeefbff6c8: 0x00007ffeefbff718 0x0000000004061245 0x00007ffeefbff6d8: 0x00000000040611fd runtime.sigpanic() /usr/local/Cellar/go/1.17.1/libexec/src/runtime/signal_unix.go:719 +0x396 goroutine 1 [syscall]: syscall.syscall(0x4083e80, 0x0, 0x40487413, 0xc000125c20) /usr/local/Cellar/go/1.17.1/libexec/src/runtime/sys_darwin.go:22 +0x3b fp=0xc000125b88 sp=0xc000125b68 pc=0x406013b syscall.syscall(0x400f714, 0x1, 0x60, 0x7ffeefbff8f4) :1 +0x26 fp=0xc000125bd0 sp=0xc000125b88 pc=0x4065b26 golang.org/x/sys/unix.ioctl(0x4255a98, 0x58, 0x60) /Users/davidashby/go/pkg/mod/golang.org/x/sys@v0.0.0-20200217220822-9197077df867/unix/zsyscall_darwin_amd64.go:746 +0x39 fp=0xc000125c00 sp=0xc000125bd0 pc=0x4083b19 golang.org/x/sys/unix.IoctlGetTermios(...) /Users/davidashby/go/pkg/mod/golang.org/x/sys@v0.0.0-20200217220822-9197077df867/unix/ioctl.go:63 main.makeTerminalRaw(0x1) /Users/davidashby/go/pkg/mod/github.com/mitranim/gow@v0.0.0-20210623102858-76f93562d1cb/gow.go:383 +0xa5 fp=0xc000125cc0 sp=0xc000125c00 pc=0x40cfee5 main.main() /Users/davidashby/go/pkg/mod/github.com/mitranim/gow@v0.0.0-20210623102858-76f93562d1cb/gow.go:164 +0x2ec fp=0xc000125f80 sp=0xc000125cc0 pc=0x40cebcc runtime.main() /usr/local/Cellar/go/1.17.1/libexec/src/runtime/proc.go:255 +0x227 fp=0xc000125fe0 sp=0xc000125f80 pc=0x4036f87 runtime.goexit() /usr/local/Cellar/go/1.17.1/libexec/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc000125fe8 sp=0xc000125fe0 pc=0x4063521 goroutine 6 [chan receive]: github.com/rjeczalik/notify.(*recursiveTree).dispatch(0xc000012140) /Users/davidashby/go/pkg/mod/github.com/rjeczalik/notify@v0.9.2/tree_recursive.go:125 +0x4d created by github.com/rjeczalik/notify.newRecursiveTree /Users/davidashby/go/pkg/mod/github.com/rjeczalik/notify@v0.9.2/tree_recursive.go:119 +0x15b goroutine 7 [syscall, locked to thread]: github.com/rjeczalik/notify._Cfunc_CFRunLoopRun() _cgo_gotypes.go:229 +0x45 github.com/rjeczalik/notify.init.1.func1() /Users/davidashby/go/pkg/mod/github.com/rjeczalik/notify@v0.9.2/watcher_fsevents_cgo.go:72 +0x45 created by github.com/rjeczalik/notify.init.1 /Users/davidashby/go/pkg/mod/github.com/rjeczalik/notify@v0.9.2/watcher_fsevents_cgo.go:64 +0x33 ```
deltamualpha commented 3 years ago

Aha, this appears to be https://github.com/golang/go/issues/45702, I think?