attestantio / vouch

Apache License 2.0
112 stars 28 forks source link

panic in attestationdata/best.(*Service).scoreAttestationData #9

Closed stefa2k closed 3 years ago

stefa2k commented 3 years ago
vouch-b    | panic: runtime error: invalid memory address or nil pointer dereference
vouch-b    | [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xee1c71]
vouch-b    |
vouch-b    | goroutine 366 [running]:
vouch-b    | github.com/attestantio/vouch/strategies/attestationdata/best.(*Service).scoreAttestationData(0xc0009727b0, 0x1621d60, 0xc003509200, 0x7f6efd904b60, 0xc00013a120, 0xc000399090, 0x10, 0xc0035d8080, 0x0)
vouch-b    |    /app/strategies/attestationdata/best/score.go:49 +0x5b1
vouch-b    | github.com/attestantio/vouch/strategies/attestationdata/best.(*Service).AttestationData.func1(0x15a59, 0x0, 0xc0009727b0, 0xbfedb900ef976247, 0x4239ea858, 0x1efe4c0, 0x1621d60, 0xc003509200, 0xc000399090, 0x10, ...)
vouch-b    |    /app/strategies/attestationdata/best/attestationdata.go:53 +0x23e
vouch-b    | created by github.com/attestantio/vouch/strategies/attestationdata/best.(*Service).AttestationData
vouch-b    |    /app/strategies/attestationdata/best/attestationdata.go:41 +0x240
mcdee commented 3 years ago

Thank you for reporting this. It's a pretty odd one, in that the only way this could occur is if the beacon node that gave us the attestation then fails to return the block for which the attestation has been made! Do you know which beacon node this was, out of curiosity?

I'll make a fix for this ASAP.

stefa2k commented 3 years ago

Hey, thanks for the fast reply! Don't know which beacon, I was in the process of updating a node with multiple clients (lighthouse, prysm, teku) as well as rebooting the host. Running multiple vouch instances and having this on each vouch when rebooting the host on which the beacon-node-address client is residing on.