0xPolygon / polygon-edge

A Framework for Building Ethereum-compatible Blockchain Networks
https://polygon.technology/solutions/polygon-edge/
Apache License 2.0
1.01k stars 534 forks source link

panic: runtime error: invalid memory address or nil pointer dereference #1462

Closed squiddyswap closed 1 year ago

squiddyswap commented 1 year ago

(panic: runtime error: invalid memory address or nil pointer dereference)

get this error after running at least 3 hours and all validators crash with the same error.

panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x155848c]

goroutine 239 [running]: github.com/umbracle/ethgo/blocktracker.(BlockTracker).handleReconcileImpl(0xc001582e00, 0xc0056fe000) /go/pkg/mod/github.com/umbracle/ethgo@v0.1.4-0.20230326234627-15b1df435098/blocktracker/blocktracker.go:238 +0x4ac github.com/umbracle/ethgo/blocktracker.(BlockTracker).HandleBlockEvent(0xc001582e00, 0x17d4820?) /go/pkg/mod/github.com/umbracle/ethgo@v0.1.4-0.20230326234627-15b1df435098/blocktracker/blocktracker.go:256 +0xd7 github.com/umbracle/ethgo/blocktracker.(BlockTracker).HandleReconcile(0xc001582e00, 0xc009538550?) /go/pkg/mod/github.com/umbracle/ethgo@v0.1.4-0.20230326234627-15b1df435098/blocktracker/blocktracker.go:285 +0x2b github.com/umbracle/ethgo/blocktracker.(BlockTracker).Start.func2(0xc001274e18?) /go/pkg/mod/github.com/umbracle/ethgo@v0.1.4-0.20230326234627-15b1df435098/blocktracker/blocktracker.go:166 +0x25 github.com/umbracle/ethgo/blocktracker.(JSONBlockTracker).Track.func1() /go/pkg/mod/github.com/umbracle/ethgo@v0.1.4-0.20230326234627-15b1df435098/blocktracker/blocktracker.go:351 +0x143 created by github.com/umbracle/ethgo/blocktracker.(JSONBlockTracker).Track /go/pkg/mod/github.com/umbracle/ethgo@v0.1.4-0.20230326234627-15b1df435098/blocktracker/blocktracker.go:332 +0xaa

Your environment

Steps to reproduce

Expected behavior

Logs

output from the logs are above

Sisiann commented 1 year ago

hello @squiddyswap this is a testnet issue, I will suggest you talk with a representative from polygon multichain Developer's live chat support page. POLYGON DEVELOPER'S SUPPORT. Engage in a conversation regarding your issue with the Polygon representative, they will look into the transaction and help you escalate and resolve this issue right away.

squiddyswap commented 1 year ago

@Sisiann Okay will do. Thank you.

polygomic commented 1 year ago

I got this error also. do you found any fixes?

squiddyswap commented 1 year ago

@polygomic No fix for this yet. this error shows its face when you are testing with Mumbai and the events blocktracker is set. Don't know when they may fix this. Because, the blockchain will crash after at least a few hours or less.

squiddyswap commented 1 year ago

@polygomic This also may be related to the bridge. I did about 4 deposits on Polygon Mumbai and after that this started occurring.

goran-ethernal commented 1 year ago

This was solved in the ethgo library that Edge uses for tracking rootchain blocks, and solution is included in Edge as per 1.0.0 release.

Basically, this error occurred if reorg happened on rootchain, or some unknown error on data gathering.