Skip to content

Instantly share code, notes, and snippets.

@catwell
Created March 7, 2023 13:44
Show Gist options
  • Save catwell/4d55d020f3c97f0dccf42d6a71f55da1 to your computer and use it in GitHub Desktop.
Save catwell/4d55d020f3c97f0dccf42d6a71f55da1 to your computer and use it in GitHub Desktop.
Bearer segfault
[bearer_1.0.0_linux_amd64 14:43] ./bearer scan bear-publishing
Loading rules
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1d93a0 pc=0x7fc16c092f16]
runtime stack:
runtime.throw({0x1520dac?, 0x352?})
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/panic.go:1047 +0x5d fp=0x7fc16d518fc8 sp=0x7fc16d518f98 pc=0x43c55d
runtime.sigpanic()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/signal_unix.go:819 +0x369 fp=0x7fc16d519018 sp=0x7fc16d518fc8 pc=0x452189
goroutine 42 [syscall]:
runtime.cgocall(0xed1eb0, 0xc0002bdd98)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/cgocall.go:158 +0x5c fp=0xc0002bdd70 sp=0xc0002bdd38 pc=0x408b3c
net._C2func_getaddrinfo(0xc0002eeab0, 0x0, 0xc0002d8900, 0xc0002f0168)
_cgo_gotypes.go:94 +0x56 fp=0xc0002bdd98 sp=0xc0002bdd70 pc=0x578a96
net.cgoLookupIPCNAME.func1({0xc0002eeab0, 0x0?, 0x0?}, 0x1421fd8?, 0x57d87b?)
/opt/hostedtoolcache/go/1.19.6/x64/src/net/cgo_unix.go:160 +0x9f fp=0xc0002bddf0 sp=0xc0002bdd98 pc=0x57a33f
net.cgoLookupIPCNAME({0x139c99a, 0x3}, {0x1421fd8, 0x9})
/opt/hostedtoolcache/go/1.19.6/x64/src/net/cgo_unix.go:160 +0x173 fp=0xc0002bdf38 sp=0xc0002bddf0 pc=0x579b93
net.cgoIPLookup(0x3f873d0?, {0x139c99a?, 0xc0002ee970?}, {0x1421fd8?, 0xc0002e0100?})
/opt/hostedtoolcache/go/1.19.6/x64/src/net/cgo_unix.go:217 +0x3b fp=0xc0002bdfa8 sp=0xc0002bdf38 pc=0x57a3fb
net.cgoLookupIP.func1()
/opt/hostedtoolcache/go/1.19.6/x64/src/net/cgo_unix.go:227 +0x36 fp=0xc0002bdfe0 sp=0xc0002bdfa8 pc=0x57a836
runtime.goexit()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0002bdfe8 sp=0xc0002bdfe0 pc=0x46cec1
created by net.cgoLookupIP
/opt/hostedtoolcache/go/1.19.6/x64/src/net/cgo_unix.go:227 +0x12a
goroutine 1 [chan receive]:
runtime.gopark(0xc1951ada68?, 0x7fc16c4a1ad8?, 0x18?, 0x0?, 0x7fc1951ada68?)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:363 +0xd6 fp=0xc000340ef8 sp=0xc000340ed8 pc=0x43f176
runtime.chanrecv(0xc00161a060, 0xc000341020, 0x1)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/chan.go:583 +0x49b fp=0xc000340f88 sp=0xc000340ef8 pc=0x40bbbb
runtime.chanrecv1(0x7ffe239f643f?, 0xf?)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/chan.go:442 +0x18 fp=0xc000340fb0 sp=0xc000340f88 pc=0x40b6b8
github.com/bearer/bearer/pkg/commands/artifact.(*runner).scanArtifact(_, {_, _}, {{{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}}, {{0x0, ...}, ...}, ...})
/home/runner/work/bearer/bearer/pkg/commands/artifact/run.go:201 +0xa5 fp=0xc000341038 sp=0xc000340fb0 pc=0xde2505
github.com/bearer/bearer/pkg/commands/artifact.(*runner).scanFS(...)
/home/runner/work/bearer/bearer/pkg/commands/artifact/run.go:183
github.com/bearer/bearer/pkg/commands/artifact.(*runner).ScanFilesystem(_, {_, _}, {{{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}}, {{0x0, ...}, ...}, ...})
/home/runner/work/bearer/bearer/pkg/commands/artifact/run.go:179 +0x58 fp=0xc000341190 sp=0xc000341038 pc=0xde2338
github.com/bearer/bearer/pkg/commands/artifact.Run({_, _}, {{{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}}, {{0x0, 0x0}, ...}, ...}, ...)
/home/runner/work/bearer/bearer/pkg/commands/artifact/run.go:240 +0x32e fp=0xc000341918 sp=0xc000341190 pc=0xde28ce
github.com/bearer/bearer/pkg/commands.NewScanCommand.func2(0xc0002a3b00, {0xc000f5e1b0, 0x1, 0x1})
/home/runner/work/bearer/bearer/pkg/commands/scan.go:79 +0x325 fp=0xc000341d00 sp=0xc000341918 pc=0xed14e5
github.com/spf13/cobra.(*Command).execute(0xc0002a3b00, {0xc000f5e170, 0x1, 0x1})
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:916 +0x862 fp=0xc000341e38 sp=0xc000341d00 pc=0x639722
github.com/spf13/cobra.(*Command).ExecuteC(0xc0002a3200)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1044 +0x3bd fp=0xc000341ef0 sp=0xc000341e38 pc=0x639f9d
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:968
main.run()
/home/runner/work/bearer/bearer/cmd/bearer/main.go:21 +0x3a fp=0xc000341f20 sp=0xc000341ef0 pc=0xed1dba
main.main()
/home/runner/work/bearer/bearer/cmd/bearer/main.go:13 +0x1d fp=0xc000341f80 sp=0xc000341f20 pc=0xed1cdd
runtime.main()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:250 +0x212 fp=0xc000341fe0 sp=0xc000341f80 pc=0x43edb2
runtime.goexit()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000341fe8 sp=0xc000341fe0 pc=0x46cec1
goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:363 +0xd6 fp=0xc000060fb0 sp=0xc000060f90 pc=0x43f176
runtime.goparkunlock(...)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:369
runtime.forcegchelper()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:302 +0xad fp=0xc000060fe0 sp=0xc000060fb0 pc=0x43f00d
runtime.goexit()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000060fe8 sp=0xc000060fe0 pc=0x46cec1
created by runtime.init.6
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:290 +0x25
goroutine 18 [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:363 +0xd6 fp=0xc00005c790 sp=0xc00005c770 pc=0x43f176
runtime.goparkunlock(...)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:369
runtime.bgsweep(0x0?)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgcsweep.go:297 +0xd7 fp=0xc00005c7c8 sp=0xc00005c790 pc=0x429cf7
runtime.gcenable.func1()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgc.go:178 +0x26 fp=0xc00005c7e0 sp=0xc00005c7c8 pc=0x41e966
runtime.goexit()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00005c7e8 sp=0xc00005c7e0 pc=0x46cec1
created by runtime.gcenable
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgc.go:178 +0x6b
goroutine 19 [GC scavenge wait]:
runtime.gopark(0xc00010e000?, 0x19c3950?, 0x0?, 0x0?, 0x0?)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:363 +0xd6 fp=0xc00005cf70 sp=0xc00005cf50 pc=0x43f176
runtime.goparkunlock(...)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:369
runtime.(*scavengerState).park(0x3f899c0)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgcscavenge.go:389 +0x53 fp=0xc00005cfa0 sp=0xc00005cf70 pc=0x427d53
runtime.bgscavenge(0x0?)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgcscavenge.go:622 +0x65 fp=0xc00005cfc8 sp=0xc00005cfa0 pc=0x428345
runtime.gcenable.func2()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgc.go:179 +0x26 fp=0xc00005cfe0 sp=0xc00005cfc8 pc=0x41e906
runtime.goexit()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00005cfe8 sp=0xc00005cfe0 pc=0x46cec1
created by runtime.gcenable
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgc.go:179 +0xaa
goroutine 34 [finalizer wait]:
runtime.gopark(0x0?, 0x16314e8?, 0x0?, 0xa0?, 0x2000000020?)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:363 +0xd6 fp=0xc000060628 sp=0xc000060608 pc=0x43f176
runtime.goparkunlock(...)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:369
runtime.runfinq()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mfinal.go:180 +0x10f fp=0xc0000607e0 sp=0xc000060628 pc=0x41da6f
runtime.goexit()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000607e8 sp=0xc0000607e0 pc=0x46cec1
created by runtime.createfing
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mfinal.go:157 +0x45
goroutine 20 [GC worker (idle)]:
runtime.gopark(0x1131ed057171?, 0x0?, 0x0?, 0x0?, 0xc0001980f0?)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:363 +0xd6 fp=0xc0002be750 sp=0xc0002be730 pc=0x43f176
runtime.gcBgMarkWorker()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgc.go:1235 +0xf1 fp=0xc0002be7e0 sp=0xc0002be750 pc=0x420ab1
runtime.goexit()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0002be7e8 sp=0xc0002be7e0 pc=0x46cec1
created by runtime.gcBgMarkStartWorkers
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgc.go:1159 +0x25
goroutine 50 [GC worker (idle)]:
runtime.gopark(0x1131ed056df4?, 0x40a95d?, 0xa0?, 0xa8?, 0xc0002bffa8?)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:363 +0xd6 fp=0xc0002bff50 sp=0xc0002bff30 pc=0x43f176
runtime.gcBgMarkWorker()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgc.go:1235 +0xf1 fp=0xc0002bffe0 sp=0xc0002bff50 pc=0x420ab1
runtime.goexit()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0002bffe8 sp=0xc0002bffe0 pc=0x46cec1
created by runtime.gcBgMarkStartWorkers
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgc.go:1159 +0x25
goroutine 21 [GC worker (idle)]:
runtime.gopark(0x1131ec2ef7e5?, 0x0?, 0x0?, 0x0?, 0x0?)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:363 +0xd6 fp=0xc00005d750 sp=0xc00005d730 pc=0x43f176
runtime.gcBgMarkWorker()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgc.go:1235 +0xf1 fp=0xc00005d7e0 sp=0xc00005d750 pc=0x420ab1
runtime.goexit()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00005d7e8 sp=0xc00005d7e0 pc=0x46cec1
created by runtime.gcBgMarkStartWorkers
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgc.go:1159 +0x25
goroutine 39 [GC worker (idle)]:
runtime.gopark(0x1131ed055fc6?, 0x0?, 0x0?, 0x0?, 0x0?)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:363 +0xd6 fp=0xc0002c0750 sp=0xc0002c0730 pc=0x43f176
runtime.gcBgMarkWorker()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgc.go:1235 +0xf1 fp=0xc0002c07e0 sp=0xc0002c0750 pc=0x420ab1
runtime.goexit()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0002c07e8 sp=0xc0002c07e0 pc=0x46cec1
created by runtime.gcBgMarkStartWorkers
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/mgc.go:1159 +0x25
goroutine 22 [select]:
runtime.gopark(0xc00006eb20?, 0x2?, 0x9f?, 0x24?, 0xc00006ea64?)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:363 +0xd6 fp=0xc00006e8a0 sp=0xc00006e880 pc=0x43f176
runtime.selectgo(0xc00006eb20, 0xc00006ea60, 0xd?, 0x0, 0x7fc16e07bfff?, 0x1)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/select.go:328 +0x7bc fp=0xc00006e9e0 sp=0xc00006e8a0 pc=0x44e67c
net.(*Resolver).lookupIPAddr(0x3f873c0, {0x19cfad8?, 0xc0001a4000}, {0x139c99a, 0x3}, {0x1421fd8, 0x9})
/opt/hostedtoolcache/go/1.19.6/x64/src/net/lookup.go:327 +0x51b fp=0xc00006ebf0 sp=0xc00006e9e0 pc=0x566fdb
net.(*Resolver).internetAddrList(0x203000?, {0x19cfad8?, 0xc0001a4000?}, {0x139c99a, 0x3}, {0x1421fd8?, 0xb?})
/opt/hostedtoolcache/go/1.19.6/x64/src/net/ipsock.go:288 +0x67a fp=0xc00006ed10 sp=0xc00006ebf0 pc=0x564d3a
net.ResolveTCPAddr({0x139c99a?, 0x200?}, {0x1421fd8, 0xb})
/opt/hostedtoolcache/go/1.19.6/x64/src/net/tcpsock.go:92 +0xaf fp=0xc00006ed68 sp=0xc00006ed10 pc=0x57044f
github.com/bearer/bearer/pkg/commands/process/balancer.GetFreePort()
/home/runner/work/bearer/bearer/pkg/commands/process/balancer/balancer.go:154 +0x65 fp=0xc00006ee08 sp=0xc00006ed68 pc=0xd60765
github.com/bearer/bearer/pkg/commands/process/balancer.(*Monitor).spawnWorker(0xc001156c40, 0xc0002e0100)
/home/runner/work/bearer/bearer/pkg/commands/process/balancer/balancer.go:141 +0x231 fp=0xc00006eea0 sp=0xc00006ee08 pc=0xd60511
github.com/bearer/bearer/pkg/commands/process/balancer.(*Monitor).monitor(0xc001156c40)
/home/runner/work/bearer/bearer/pkg/commands/process/balancer/balancer.go:95 +0x31a fp=0xc00006efc8 sp=0xc00006eea0 pc=0xd5feba
github.com/bearer/bearer/pkg/commands/process/balancer.New.func1()
/home/runner/work/bearer/bearer/pkg/commands/process/balancer/balancer.go:53 +0x26 fp=0xc00006efe0 sp=0xc00006efc8 pc=0xd5f946
runtime.goexit()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00006efe8 sp=0xc00006efe0 pc=0x46cec1
created by github.com/bearer/bearer/pkg/commands/process/balancer.New
/home/runner/work/bearer/bearer/pkg/commands/process/balancer/balancer.go:53 +0x165
goroutine 41 [select]:
runtime.gopark(0xc00006fc28?, 0x2?, 0x0?, 0x30?, 0xc00006fc0c?)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/proc.go:363 +0xd6 fp=0xc00006fa98 sp=0xc00006fa78 pc=0x43f176
runtime.selectgo(0xc00006fc28, 0xc00006fc08, 0x0?, 0x0, 0xc001622000?, 0x1)
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/select.go:328 +0x7bc fp=0xc00006fbd8 sp=0xc00006fa98 pc=0x44e67c
net.cgoLookupIP({0x19cfaa0, 0xc0002de0c0}, {0x139c99a, 0x3}, {0x1421fd8, 0x9})
/opt/hostedtoolcache/go/1.19.6/x64/src/net/cgo_unix.go:228 +0x1aa fp=0xc00006fcc8 sp=0xc00006fbd8 pc=0x57a64a
net.(*Resolver).lookupIP(0x3f873c0, {0x19cfaa0, 0xc0002de0c0}, {0x139c99a, 0x3}, {0x1421fd8, 0x9})
/opt/hostedtoolcache/go/1.19.6/x64/src/net/lookup_unix.go:74 +0x128 fp=0xc00006fe18 sp=0xc00006fcc8 pc=0x568d48
net.(*Resolver).lookupIP-fm({0x19cfaa0?, 0xc0002de0c0?}, {0x139c99a?, 0x0?}, {0x1421fd8?, 0xc0002bdec0?})
<autogenerated>:1 +0x5b fp=0xc00006fe60 sp=0xc00006fe18 pc=0x57d87b
net.glob..func1({0x19cfaa0?, 0xc0002de0c0?}, 0xc001429a00?, {0x139c99a?, 0xc0002bdef0?}, {0x1421fd8?, 0x11fa180?})
/opt/hostedtoolcache/go/1.19.6/x64/src/net/hook.go:23 +0x3d fp=0xc00006fea0 sp=0xc00006fe60 pc=0x55c81d
net.(*Resolver).lookupIPAddr.func1()
/opt/hostedtoolcache/go/1.19.6/x64/src/net/lookup.go:321 +0x9f fp=0xc00006ff38 sp=0xc00006fea0 pc=0x56787f
internal/singleflight.(*Group).doCall(0x3f873d0, 0xc00161c050, {0xc0002ee970, 0xd}, 0xc0002e0100?)
/opt/hostedtoolcache/go/1.19.6/x64/src/internal/singleflight/singleflight.go:95 +0x3b fp=0xc00006ffa8 sp=0xc00006ff38 pc=0x54b29b
internal/singleflight.(*Group).DoChan.func1()
/opt/hostedtoolcache/go/1.19.6/x64/src/internal/singleflight/singleflight.go:88 +0x36 fp=0xc00006ffe0 sp=0xc00006ffa8 pc=0x54b236
runtime.goexit()
/opt/hostedtoolcache/go/1.19.6/x64/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00006ffe8 sp=0xc00006ffe0 pc=0x46cec1
created by internal/singleflight.(*Group).DoChan
/opt/hostedtoolcache/go/1.19.6/x64/src/internal/singleflight/singleflight.go:88 +0x315
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment