attestantio / vouch

Apache License 2.0
112 stars 28 forks source link

[Bug] Segmentation fault while shutting down a beacon node that vouch uses #145

Closed schonex closed 1 year ago

schonex commented 1 year ago

Running multiple beacon nodes, this was the first one on the configuration list. Shut it down and vouch died with the following:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xf83346]
goroutine 113 [running]:
github.com/attestantio/vouch/services/cache/standard.(*Service).updateExecutionHeadFromBlock(0x14a1807?, 0x1842088?)
        /home/runner/work/vouch/vouch/services/cache/standard/events.go:56 +0x26
github.com/attestantio/vouch/services/cache/standard.(*Service).handleHead(0xc0007d0680, 0xc0005dbb18?)
        /home/runner/work/vouch/vouch/services/cache/standard/events.go:52 +0x20a
github.com/attestantio/go-eth2-client/multi.(*activeHandler).handleEvent(0xc0007d1580, 0xc0057d6aa0)
        /home/runner/go/pkg/mod/github.com/attestantio/go-eth2-client@v0.15.7/multi/events.go:109 +0x131
github.com/attestantio/go-eth2-client/http.(*Service).handleEvent(0x88c4ac?, {0x18420f8?, 0xc00031bbf0?}, 0xc003122bd0, 0xc000092870)
        /home/runner/go/pkg/mod/github.com/attestantio/go-eth2-client@v0.15.7/http/events.go:169 +0x9dd
github.com/attestantio/go-eth2-client/http.(*Service).Events.func1.1(0xc0005dbdc0?)
        /home/runner/go/pkg/mod/github.com/attestantio/go-eth2-client@v0.15.7/http/events.go:74 +0x2f
github.com/r3labs/sse/v2.(*Client).SubscribeWithContext.func1()
        /home/runner/go/pkg/mod/github.com/r3labs/sse/v2@v2.10.0/client.go:108 +0x267
gopkg.in/cenkalti/backoff%2ev1.RetryNotify(0xc0005dbec0, {0x183c970, 0xc003490a20}, 0x0)
        /home/runner/go/pkg/mod/gopkg.in/cenkalti/backoff.v1@v1.1.0/retry.go:37 +0x1b7
github.com/r3labs/sse/v2.(*Client).SubscribeWithContext(0xc0001ef400, {0x18420f8?, 0xc00031bbf0?}, {0x0?, 0x0?}, 0x1?)
        /home/runner/go/pkg/mod/github.com/r3labs/sse/v2@v2.10.0/client.go:118 +0xb0
github.com/r3labs/sse/v2.(*Client).SubscribeRawWithContext(...)
        /home/runner/go/pkg/mod/github.com/r3labs/sse/v2@v2.10.0/client.go:258
github.com/attestantio/go-eth2-client/http.(*Service).Events.func1()
        /home/runner/go/pkg/mod/github.com/attestantio/go-eth2-client@v0.15.7/http/events.go:73 +0x170
created by github.com/attestantio/go-eth2-client/http.(*Service).Events
        /home/runner/go/pkg/mod/github.com/attestantio/go-eth2-client@v0.15.7/http/events.go:68 +0x85b