svent / sift

A fast and powerful alternative to grep
https://sift-tool.org
GNU General Public License v3.0
1.6k stars 108 forks source link

Panic in GC? #83

Open charles-haynes opened 7 years ago

charles-haynes commented 7 years ago

Got something I've never seen before. Looks like a panic in the garbage collector?

sift 0.8.0 (darwin/amd64)ˇ running on MacOS 10.12.1

$ sift 'nginx:alpine'
fatal error: unexpected signal during runtime execution
fatal error: unexpected signal during runtime execution
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x5831c614f67 pc=0x403ea69]

runtime stack:
runtime.throw(0x42bb840, 0x2a)
    /usr/local/go/src/runtime/panic.go:527 +0x90
runtime.sigpanic()
    /usr/local/go/src/runtime/sigpanic_unix.go:12 +0x5a
runtime.(*gcWork).put(0xc820025220, 0xc8200cc000)
    /usr/local/go/src/runtime/mgcwork.go:87 +0x49
runtime.greyobject(0xc8200cc000, 0x0, 0x0, 0xc81fff99ff, 0x0, 0x4705a40, 0xc820025220)
    /usr/local/go/src/runtime/mgcmark.go:956 +0x2f1
runtime.shade(0xc8200cc000)
    /usr/local/go/src/runtime/mgcmark.go:894 +0x9a
runtime.gcmarkwb_m(0xc8200d09a0, 0xc8200cc000)
    /usr/local/go/src/runtime/mbarrier.go:91 +0xc1
runtime.writebarrierptr_nostore1.func1()
    /usr/local/go/src/runtime/mbarrier.go:117 +0x134
runtime.systemstack(0x700006ccdd98)
    /usr/local/go/src/runtime/asm_amd64.s:278 +0xab
runtime.writebarrierptr_nostore1(0xc8200d09a0, 0xc8200cc000)
    /usr/local/go/src/runtime/mbarrier.go:118 +0x71
runtime.writebarrierptr(0xc8200d09a0, 0xc8200cc000)
    /usr/local/go/src/runtime/mbarrier.go:137 +0x4b
runtime.execute(0xc8200cc000, 0x0)
    /usr/local/go/src/runtime/proc1.go:1338 +0x1bc
runtime.schedule()
    /usr/local/go/src/runtime/proc1.go:1650 +0x2b1
runtime.exitsyscall0(0xc8200cc180)
    /usr/local/go/src/runtime/proc1.go:2139 +0x171
runtime.mcall(0x45b4000)
    /usr/local/go/src/runtime/asm_amd64.s:204 +0x5b

goroutine 11 [running]:
syscall.Syscall(0x154, 0xc8204a93f0, 0xc8203953b0, 0x0, 0x0, 0x0, 0x0)
    /usr/local/go/src/syscall/asm_darwin_amd64.s:16 +0x5 fp=0xc8204019c8 sp=0xc8204019c0
syscall.Lstat(0xc8204a9340, 0xa9, 0xc8203953b0, 0x0, 0x0)
    /usr/local/go/src/syscall/zsyscall_darwin_amd64.go:771 +0x8b fp=0xc820401a18 sp=0xc8204019c8
os.Lstat(0xc8204a9340, 0xa9, 0x0, 0x0, 0x0, 0x0)
    /usr/local/go/src/os/file_unix.go:167 +0x66 fp=0xc820401a68 sp=0xc820401a18
os.(*File).readdir(0xc820030478, 0x100, 0xc820578040, 0x3, 0x4, 0x0, 0x0)
    /usr/local/go/src/os/file_unix.go:182 +0x223 fp=0xc820401b50 sp=0xc820401a68
os.(*File).Readdir(0xc820030478, 0x100, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/local/go/src/os/doc.go:115 +0x85 fp=0xc820401b90 sp=0xc820401b50
main.processDirectory(0xc82031a280, 0x9f)
    /Users/charles/go/src/github.com/svent/sift/sift.go:206 +0x505 fp=0xc820402090 sp=0xc820401b90
main.enqueueDirectory(0xc82031a280, 0x9f)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99 fp=0xc8204020c8 sp=0xc820402090
main.processDirectory(0xc820086500, 0x93)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d fp=0xc8204025c8 sp=0xc8204020c8
main.enqueueDirectory(0xc820086500, 0x93)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99 fp=0xc820402600 sp=0xc8204025c8
main.processDirectory(0xc820698750, 0x86)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d fp=0xc820402b00 sp=0xc820402600
main.enqueueDirectory(0xc820698750, 0x86)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99 fp=0xc820402b38 sp=0xc820402b00
main.processDirectory(0xc82005f580, 0x80)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d fp=0xc820403038 sp=0xc820402b38
main.enqueueDirectory(0xc82005f580, 0x80)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99 fp=0xc820403070 sp=0xc820403038
main.processDirectory(0xc82005e980, 0x73)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d fp=0xc820403570 sp=0xc820403070
main.enqueueDirectory(0xc82005e980, 0x73)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99 fp=0xc8204035a8 sp=0xc820403570
main.processDirectory(0xc8200aee00, 0x63)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d fp=0xc820403aa8 sp=0xc8204035a8
main.enqueueDirectory(0xc8200aee00, 0x63)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99 fp=0xc820403ae0 sp=0xc820403aa8
main.processDirectory(0xc820633620, 0x56)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d fp=0xc820403fe0 sp=0xc820403ae0
main.enqueueDirectory(0xc820633620, 0x56)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99 fp=0xc820404018 sp=0xc820403fe0
main.processDirectory(0xc82067c190, 0x50)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d fp=0xc820404518 sp=0xc820404018
main.enqueueDirectory(0xc82067c190, 0x50)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99 fp=0xc820404550 sp=0xc820404518
main.processDirectory(0xc82039b630, 0x43)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d fp=0xc820404a50 sp=0xc820404550
main.enqueueDirectory(0xc82039b630, 0x43)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99 fp=0xc820404a88 sp=0xc820404a50
main.processDirectory(0xc820608280, 0x31)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d fp=0xc820404f88 sp=0xc820404a88
main.enqueueDirectory(0xc820608280, 0x31)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99 fp=0xc820404fc0 sp=0xc820404f88
main.processDirectory(0xc820499ef0, 0x24)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d fp=0xc8204054c0 sp=0xc820404fc0
main.enqueueDirectory(0xc820499ef0, 0x24)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99 fp=0xc8204054f8 sp=0xc8204054c0
main.processDirectory(0xc82049fd00, 0x1f)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d fp=0xc8204059f8 sp=0xc8204054f8
main.enqueueDirectory(0xc82049fd00, 0x1f)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99 fp=0xc820405a30 sp=0xc8204059f8
main.processDirectory(0xc82032e8c0, 0x12)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d fp=0xc820405f30 sp=0xc820405a30
main.processDirectories.func1()
    /Users/charles/go/src/github.com/svent/sift/sift.go:170 +0x7d fp=0xc820405f80 sp=0xc820405f30
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc820405f88 sp=0xc820405f80
created by main.processDirectories
    /Users/charles/go/src/github.com/svent/sift/sift.go:172 +0x5c

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0x4390efc)
    /usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*WaitGroup).Wait(0x4390ef0)
    /usr/local/go/src/sync/waitgroup.go:126 +0xb4
main.executeSearch(0xc82034dd90, 0x1, 0x1, 0x0, 0x0, 0x0)
    /Users/charles/go/src/github.com/svent/sift/sift.go:546 +0x44f
main.main()
    /Users/charles/go/src/github.com/svent/sift/sift.go:686 +0x12e4

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1

goroutine 5 [chan receive]:
main.resultHandler()
    /Users/charles/go/src/github.com/svent/sift/output.go:25 +0x5f
created by main.executeSearch
    /Users/charles/go/src/github.com/svent/sift/sift.go:512 +0x283

goroutine 6 [runnable]:
syscall.Syscall(0x3, 0x12, 0xc8201a2000, 0x40000, 0x3e5, 0x0, 0x0)
    /usr/local/go/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.read(0x12, 0xc8201a2000, 0x40000, 0x40000, 0xc820030498, 0x0, 0x0)
    /usr/local/go/src/syscall/zsyscall_darwin_amd64.go:972 +0x5f
syscall.Read(0x12, 0xc8201a2000, 0x40000, 0x40000, 0xc820508000, 0x0, 0x0)
    /usr/local/go/src/syscall/syscall_unix.go:160 +0x4d
os.(*File).read(0xc820030490, 0xc8201a2000, 0x40000, 0x40000, 0x41ca840, 0x0, 0x0)
    /usr/local/go/src/os/file_unix.go:211 +0x75
os.(*File).Read(0xc820030490, 0xc8201a2000, 0x40000, 0x40000, 0x0, 0x0, 0x0)
    /usr/local/go/src/os/file.go:95 +0x8a
main.processReader(0x47c0000, 0xc820030490, 0xc820222000, 0x1, 0x1, 0xc8201a2000, 0x40000, 0x40000, 0xc8201e2000, 0x40000, ...)
    /Users/charles/go/src/github.com/svent/sift/matching.go:86 +0x1c19
main.processFileTargets()
    /Users/charles/go/src/github.com/svent/sift/sift.go:438 +0xd17
created by main.executeSearch
    /Users/charles/go/src/github.com/svent/sift/sift.go:516 +0x2cf

goroutine 7 [runnable]:
main.processFileTargets()
    /Users/charles/go/src/github.com/svent/sift/sift.go:400 +0x292
created by main.executeSearch
    /Users/charles/go/src/github.com/svent/sift/sift.go:516 +0x2cf

goroutine 8 [running]:
    goroutine running on other thread; stack unavailable
created by main.executeSearch
    /Users/charles/go/src/github.com/svent/sift/sift.go:516 +0x2cf

goroutine 9 [runnable]:
main.processFileTargets()
    /Users/charles/go/src/github.com/svent/sift/sift.go:400 +0x292
created by main.executeSearch
    /Users/charles/go/src/github.com/svent/sift/sift.go:516 +0x2cf

goroutine 12 [running]:
    goroutine running on other thread; stack unavailable
created by main.processDirectories
    /Users/charles/go/src/github.com/svent/sift/sift.go:172 +0x5c

goroutine 13 [runnable]:
syscall.Syscall6(0x158, 0x17, 0xc820506000, 0x1000, 0xc820539db0, 0x0, 0x0, 0x88, 0x0, 0x0)
    /usr/local/go/src/syscall/asm_darwin_amd64.s:41 +0x5
syscall.Getdirentries(0x17, 0xc820506000, 0x1000, 0x1000, 0xc820539db0, 0x0, 0x0, 0x0)
    /usr/local/go/src/syscall/zsyscall_darwin_amd64.go:571 +0x89
syscall.ReadDirent(0x17, 0xc820506000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/local/go/src/syscall/syscall_bsd.go:71 +0x63
os.(*File).readdirnames(0xc82026e4e8, 0x100, 0xc820507000, 0x0, 0x100, 0x0, 0x0)
    /usr/local/go/src/os/dir_unix.go:39 +0x215
os.(*File).Readdirnames(0xc82026e4e8, 0x100, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/local/go/src/os/doc.go:134 +0x85
os.(*File).readdir(0xc82026e4e8, 0x100, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/local/go/src/os/file_unix.go:179 +0xb3
os.(*File).Readdir(0xc82026e4e8, 0x100, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/local/go/src/os/doc.go:115 +0x85
main.processDirectory(0xc820416aa0, 0x49)
    /Users/charles/go/src/github.com/svent/sift/sift.go:206 +0x505
main.enqueueDirectory(0xc820416aa0, 0x49)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99
main.processDirectory(0xc820442cc0, 0x38)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d
main.enqueueDirectory(0xc820442cc0, 0x38)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99
main.processDirectory(0xc820462db0, 0x29)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d
main.enqueueDirectory(0xc820462db0, 0x29)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99
main.processDirectory(0xc820462ab0, 0x25)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d
main.enqueueDirectory(0xc820462ab0, 0x25)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99
main.processDirectory(0xc8204ac7e0, 0x1a)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d
main.enqueueDirectory(0xc8204ac7e0, 0x1a)
    /Users/charles/go/src/github.com/svent/sift/sift.go:183 +0x99
main.processDirectory(0xc8200ad930, 0xd)
    /Users/charles/go/src/github.com/svent/sift/sift.go:251 +0xf5d
main.processDirectories.func1()
    /Users/charles/go/src/github.com/svent/sift/sift.go:170 +0x7d
created by main.processDirectories
    /Users/charles/go/src/github.com/svent/sift/sift.go:172 +0x5c
[signal 0xb code=0x1 addr=0x5831c64354f pc=0x403ea69]

runtime stack:
runtime.throw(0x42bb840, 0x2a)
    /usr/local/go/src/runtime/panic.go:527 +0x90
runtime.sigpanic()
    /usr/local/go/src/runtime/sigpanic_unix.go:12 +0x5a
runtime.(*gcWork).put(0xc820022720, 0xc82033e120)
    /usr/local/go/src/runtime/mgcwork.go:87 +0x49
runtime.greyobject(0xc82033e120, 0x0, 0x0, 0xc81ffe60f6, 0x0, 0x47073a0, 0xc820022720)
    /usr/local/go/src/runtime/mgcmark.go:956 +0x2f1
runtime.shade(0xc82033e120)
    /usr/local/go/src/runtime/mgcmark.go:894 +0x9a
runtime.gcmarkwb_m(0xc82026e198, 0xc82033e120)
    /usr/local/go/src/runtime/mbarrier.go:91 +0xc1
runtime.writebarrierptr_nostore1.func1()
    /usr/local/go/src/runtime/mbarrier.go:117 +0x134
runtime.systemstack(0xc820020000)
    /usr/local/go/src/runtime/asm_amd64.s:262 +0x79
runtime.mstart()
    /usr/local/go/src/runtime/proc1.go:674
[signal 0xb code=0x1 addr=0x5831c6233b6 pc=0x403ea69]

runtime stack:
runtime.throw(0x42bb840, 0x2a)
    /usr/local/go/src/runtime/panic.go:527 +0x90
runtime.sigpanic()
    /usr/local/go/src/runtime/sigpanic_unix.go:12 +0x5a
runtime.(*gcWork).put(0xc820021220, 0xc820416b40)
    /usr/local/go/src/runtime/mgcwork.go:87 +0x49
runtime.greyobject(0xc820416b40, 0x0, 0x0, 0xc81ffdf4a5, 0x0, 0x47c1b48, 0xc820021220)
    /usr/local/go/src/runtime/mgcmark.go:956 +0x2f1
runtime.shade(0xc820416b40)
    /usr/local/go/src/runtime/mgcmark.go:894 +0x9a
runtime.gcmarkwb_m(0xc8204316c8, 0xc820416b40)
    /usr/local/go/src/runtime/mbarrier.go:91 +0xc1
runtime.writebarrierptr_nostore1.func1()
    /usr/local/go/src/runtime/mbarrier.go:117 +0x134
runtime.systemstack(0xc820024000)
    /usr/local/go/src/runtime/asm_amd64.s:262 +0x79
runtime.mstart()
    /usr/local/go/src/runtime/proc1.go:674
svent commented 7 years ago

Thanks for you report - I guess this was not reproducible? I will try to look into it, but I am not sure whether I will find something to fix in sift...

charles-haynes commented 7 years ago

Yeah. Maybe pass it on to the go guys? It wasn't reproducible. 🤔

On Thu., 10 Nov. 2016, 7:27 am Sven Taute, notifications@github.com wrote:

Thanks for you report - I guess this was not reproducible? I will try to look into it, but I am not sure whether I will find something to fix in sift...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/svent/sift/issues/83#issuecomment-259517422, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBTnbzBjgcwwFbbj8GLbs9kUS1DyaEXks5q8iywgaJpZM4KtAij .