Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caplin RPC request returns a panic. #11414

Closed
rayn316 opened this issue Jul 31, 2024 · 0 comments · Fixed by #11419
Closed

Caplin RPC request returns a panic. #11414

rayn316 opened this issue Jul 31, 2024 · 0 comments · Fixed by #11419
Assignees
Labels
caplin complexity:low Issue will take up to several days to fix imp1 High importance
Milestone

Comments

@rayn316
Copy link

rayn316 commented Jul 31, 2024

System information

Erigon version: v2.60.5
OS & Version: Linux
Consensus Layer: caplin

The node is still syncing. Caplin has enabled archive mode with the following parameters:
--internalcl --caplin.archive --caplin.backfilling.blob.no-pruning --caplin.backfilling.blob --caplin.backfilling --beacon.api=beacon,builder,config,debug,node,validator,lighthouse --beacon.api.port 21307.

Expected behaviour

request: curl http://127.0.0.1:21307/eth/v1/beacon/states/9614656/validators/942327
Return beacon data normally.

Actual behaviour

Please return the following panic error.

Steps to reproduce the behaviour

Backtrace

2024/07/31 15:45:26 http: panic serving 127.0.0.1:49842: runtime error: invalid memory address or nil pointer dereference
goroutine 22813481 [running]:
net/http.(*conn).serve.func1()
        net/http/server.go:1898 +0xbe
panic({0x2527be0?, 0x46aa5b0?})
        runtime/panic.go:770 +0x132
github.com/ledgerwatch/erigon/cl/cltypes/solid.(*ValidatorSet).Length(...)
        github.com/ledgerwatch/erigon/cl/cltypes/solid/validator_set.go:107
github.com/ledgerwatch/erigon/cl/beacon/handler.responseValidator(0xc037ddc2d0?, 0x31bac18?, {0x0?, 0x0?}, 0x31bac18?, 0x1)
        github.com/ledgerwatch/erigon/cl/beacon/handler/validators.go:583 +0x47
github.com/ledgerwatch/erigon/cl/beacon/handler.(*ApiHandler).GetEthV1BeaconStatesValidator(0xc0818da908, {0x102cec38?, 0xc03d568500?}, 0xc1d2980120)
        github.com/ledgerwatch/erigon/cl/beacon/handler/validators.go:411 +0x905
github.com/ledgerwatch/erigon/cl/beacon/beaconhttp.EndpointHandlerFunc[...].Handle(...)
        github.com/ledgerwatch/erigon/cl/beacon/beaconhttp/api.go:78
github.com/ledgerwatch/erigon/cl/beacon/handler.(*ApiHandler).init.func2.1.3.6.1.HandleEndpointFunc[...].7(0xc1d2980120)
        github.com/ledgerwatch/erigon/cl/beacon/beaconhttp/api.go:87 +0x55
net/http.HandlerFunc.ServeHTTP(0xc0a4d09b30?, {0x318dbd0?, 0xc1d136cee0?}, 0xc268697308?)
        net/http/server.go:2166 +0x29
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc0c6fcb020, {0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:459 +0x2e6
net/http.HandlerFunc.ServeHTTP(0xc1fdf12ea0?, {0x318dbd0?, 0xc1d136cee0?}, 0xc0db0eee70?)
        net/http/server.go:2166 +0x29
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc0c6fcb020, {0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:73 +0x32f
github.com/go-chi/chi/v5.(*Mux).Mount.func1({0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:327 +0x1bb
net/http.HandlerFunc.ServeHTTP(0xc0a4d09b30?, {0x318dbd0?, 0xc1d136cee0?}, 0xc2e9976ea0?)
        net/http/server.go:2166 +0x29
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc0c6fcafc0, {0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:459 +0x2e6
net/http.HandlerFunc.ServeHTTP(0xc1fdf12ea0?, {0x318dbd0?, 0xc1d136cee0?}, 0xc0db0ef040?)
        net/http/server.go:2166 +0x29
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc0c6fcafc0, {0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:73 +0x32f
github.com/go-chi/chi/v5.(*Mux).Mount.func1({0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:327 +0x1bb
net/http.HandlerFunc.ServeHTTP(0xc0a4d09b30?, {0x318dbd0?, 0xc1d136cee0?}, 0xc08647e360?)
        net/http/server.go:2166 +0x29
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc0c6fcad20, {0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:459 +0x2e6
net/http.HandlerFunc.ServeHTTP(0xc1fdf12ea0?, {0x318dbd0?, 0xc1d136cee0?}, 0xc0db0ef210?)
        net/http/server.go:2166 +0x29
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc0c6fcad20, {0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:73 +0x32f
github.com/go-chi/chi/v5.(*Mux).Mount.func1({0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:327 +0x1bb
net/http.HandlerFunc.ServeHTTP(0xc0a4d09b30?, {0x318dbd0?, 0xc1d136cee0?}, 0xc08647e330?)
        net/http/server.go:2166 +0x29
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc0c6fcac00, {0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:459 +0x2e6
net/http.HandlerFunc.ServeHTTP(0xc1fdf12ea0?, {0x318dbd0?, 0xc1d136cee0?}, 0xc0db0ef3e0?)
        net/http/server.go:2166 +0x29
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc0c6fcac00, {0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:73 +0x32f
github.com/go-chi/chi/v5.(*Mux).Mount.func1({0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:327 +0x1bb
net/http.HandlerFunc.ServeHTTP(0xc0a4d09b30?, {0x318dbd0?, 0xc1d136cee0?}, 0xc08647e300?)
        net/http/server.go:2166 +0x29
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc0c6fcaba0, {0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:459 +0x2e6
net/http.HandlerFunc.ServeHTTP(0xc1fdf12ea0?, {0x318dbd0?, 0xc1d136cee0?}, 0xc0db0ef5b0?)
        net/http/server.go:2166 +0x29
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc0c6fcaba0, {0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:73 +0x32f
github.com/go-chi/chi/v5.(*Mux).Mount.func1({0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:327 +0x1bb
net/http.HandlerFunc.ServeHTTP(0xc0a4d09b30?, {0x318dbd0?, 0xc1d136cee0?}, 0xc24c6c1fc4?)
        net/http/server.go:2166 +0x29
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc0c6fcaae0, {0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:459 +0x2e6
net/http.HandlerFunc.ServeHTTP(0xc1fdf12ea0?, {0x318dbd0?, 0xc1d136cee0?}, 0xfdf12ea0?)
        net/http/server.go:2166 +0x29
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc0c6fcaae0, {0x318dbd0, 0xc1d136cee0}, 0xc1d2980120)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:73 +0x32f
github.com/ledgerwatch/erigon/cl/beacon/handler.(*ApiHandler).ServeHTTP(0x3195610?, {0x318dbd0?, 0xc1d136cee0?}, 0x46b1f30?)
        github.com/ledgerwatch/erigon/cl/beacon/handler/handler.go:317 +0x72
github.com/ledgerwatch/erigon/cl/beacon.ListenAndServe.func1({0x318dbd0, 0xc1d136cee0}, 0xc1a8401e60)
        github.com/ledgerwatch/erigon/cl/beacon/router.go:41 +0x1df
net/http.HandlerFunc.ServeHTTP(0xc1e017b1d0?, {0x318dbd0?, 0xc1d136cee0?}, 0xc24c6c1fc4?)
        net/http/server.go:2166 +0x29
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc03c109860, {0x318dbd0, 0xc1d136cee0}, 0xc1a8401e60)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:459 +0x2e6
net/http.HandlerFunc.ServeHTTP(0xc0c936d680?, {0x318dbd0?, 0xc1d136cee0?}, 0xc1a8401e60?)
        net/http/server.go:2166 +0x29
github.com/go-chi/cors.(*Cors).Handler-fm.(*Cors).Handler.func1({0x318dbd0, 0xc1d136cee0}, 0xc1a8401e60)
        github.com/go-chi/cors@v1.2.1/cors.go:228 +0x17e
net/http.HandlerFunc.ServeHTTP(0x3195648?, {0x318dbd0?, 0xc1d136cee0?}, 0x46b1f30?)
        net/http/server.go:2166 +0x29
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc03c109860, {0x318dbd0, 0xc1d136cee0}, 0xc1a8401d40)
        github.com/go-chi/chi/v5@v5.0.12/mux.go:90 +0x2ee
net/http.serverHandler.ServeHTTP({0xc1fdf12d50?}, {0x318dbd0?, 0xc1d136cee0?}, 0x6?)
        net/http/server.go:3137 +0x8e
net/http.(*conn).serve(0xc1c18b9170, {0x3195610, 0xc026642930})
        net/http/server.go:2039 +0x5e8
created by net/http.(*Server).Serve in goroutine 62568
        net/http/server.go:3285 +0x4b4
@AskAlexSharov AskAlexSharov added caplin imp1 High importance labels Jul 31, 2024
@AskAlexSharov AskAlexSharov added this to the 2.60.6-fixes milestone Jul 31, 2024
@AskAlexSharov AskAlexSharov added the complexity:low Issue will take up to several days to fix label Jul 31, 2024
@domiwei domiwei self-assigned this Jul 31, 2024
domiwei added a commit that referenced this issue Aug 13, 2024
Fix #11414
root cause: empty validator set
Giulio2002 pushed a commit that referenced this issue Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
caplin complexity:low Issue will take up to several days to fix imp1 High importance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants