Closed
Description
Latest main 3820a8d throws panics on some Caplin endpoints (check err logs below).
Looking at the logs of the VC it looks like these errors may be coming from "attester duties" and "proposer duties" endpoints that the VC is querying:
Jan 06 15:11:25.001 ERRO Failed to download proposer duties err: Some endpoints failed, num_failed: 2 http://localhost:5555/ => Unavailable(NotSynced), http://localhost:5555/ => RequestFailed(HttpClient(url: http://localhost:5555/, kind: request, detail: connection closed before message completed)), service: duties
Jan 06 15:11:25.001 ERRO Failed to download attester duties err: FailedToDownloadAttesters("Some endpoints failed, num_failed: 2 http://localhost:5555/ => Unavailable(NotSynced), http://localhost:5555/ => RequestFailed(HttpClient(url: http://localhost:5555/, kind: request, detail: connection closed before message completed))"), request_epoch: 884749, curr
ent_epoch: 884749, service: duties
Related to recent change #13308 - don't see these issues after reverting it
2025/01/06 15:11:25 http: panic serving 127.0.0.1:39270: runtime error: invalid memory address or nil pointer dereference
goroutine 20239 [running]:
net/http.(*conn).serve.func1()
net/http/server.go:1947 +0xbe
panic({0x276f820?, 0x4b2b860?})
runtime/panic.go:785 +0x132
github.com/erigontech/erigon/cl/beacon/beaconhttp.(*EndpointError).WriteTo(0x0, {0x344ac40, 0xc0279abdc0})
github.com/erigontech/erigon/cl/beacon/beaconhttp/api.go:80 +0x36
github.com/erigontech/erigon/cl/beacon/handler.(*ApiHandler).init.func2.1.4.1.HandleEndpointFunc[...].2(0xc0280e0640)
github.com/erigontech/erigon/cl/beacon/beaconhttp/api.go:110 +0xbc
net/http.HandlerFunc.ServeHTTP(0xc0280ef4a0?, {0x344ac40?, 0xc0279abdc0?}, 0xc028b90150?)
net/http/server.go:2220 +0x29
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc039042600, {0x344ac40, 0xc0279abdc0}, 0xc0280e0640)
github.com/go-chi/chi/v5@v5.1.0/mux.go:459 +0x2e2
net/http.HandlerFunc.ServeHTTP(0xc027d4bcb0?, {0x344ac40?, 0xc0279abdc0?}, 0xc016a23048?)
net/http/server.go:2220 +0x29
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc039042600, {0x344ac40, 0xc0279abdc0}, 0xc0280e0640)
github.com/go-chi/chi/v5@v5.1.0/mux.go:73 +0x32f
github.com/go-chi/chi/v5.(*Mux).Mount.func1({0x344ac40, 0xc0279abdc0}, 0xc0280e0640)
github.com/go-chi/chi/v5@v5.1.0/mux.go:327 +0x1bb
net/http.HandlerFunc.ServeHTTP(0xc0280ef4a0?, {0x344ac40?, 0xc0279abdc0?}, 0xc01b44a0f0?)
net/http/server.go:2220 +0x29
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc0390425a0, {0x344ac40, 0xc0279abdc0}, 0xc0280e0640)
github.com/go-chi/chi/v5@v5.1.0/mux.go:459 +0x2e2
net/http.HandlerFunc.ServeHTTP(0xc027d4bcb0?, {0x344ac40?, 0xc0279abdc0?}, 0xc016a23218?)
net/http/server.go:2220 +0x29
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc0390425a0, {0x344ac40, 0xc0279abdc0}, 0xc0280e0640)
github.com/go-chi/chi/v5@v5.1.0/mux.go:73 +0x32f
github.com/go-chi/chi/v5.(*Mux).Mount.func1({0x344ac40, 0xc0279abdc0}, 0xc0280e0640)
github.com/go-chi/chi/v5@v5.1.0/mux.go:327 +0x1bb
net/http.HandlerFunc.ServeHTTP(0xc0280ef4a0?, {0x344ac40?, 0xc0279abdc0?}, 0xc001a16c90?)
net/http/server.go:2220 +0x29
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc039042180, {0x344ac40, 0xc0279abdc0}, 0xc0280e0640)
github.com/go-chi/chi/v5@v5.1.0/mux.go:459 +0x2e2
net/http.HandlerFunc.ServeHTTP(0xc027d4bcb0?, {0x344ac40?, 0xc0279abdc0?}, 0xc016a233e8?)
net/http/server.go:2220 +0x29
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc039042180, {0x344ac40, 0xc0279abdc0}, 0xc0280e0640)
github.com/go-chi/chi/v5@v5.1.0/mux.go:73 +0x32f
github.com/go-chi/chi/v5.(*Mux).Mount.func1({0x344ac40, 0xc0279abdc0}, 0xc0280e0640)
github.com/go-chi/chi/v5@v5.1.0/mux.go:327 +0x1bb
net/http.HandlerFunc.ServeHTTP(0xc0280ef4a0?, {0x344ac40?, 0xc0279abdc0?}, 0xc001a16c60?)
net/http/server.go:2220 +0x29
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc039042120, {0x344ac40, 0xc0279abdc0}, 0xc0280e0640)
github.com/go-chi/chi/v5@v5.1.0/mux.go:459 +0x2e2
net/http.HandlerFunc.ServeHTTP(0xc027d4bcb0?, {0x344ac40?, 0xc0279abdc0?}, 0xc016a235b8?)
net/http/server.go:2220 +0x29
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc039042120, {0x344ac40, 0xc0279abdc0}, 0xc0280e0640)
github.com/go-chi/chi/v5@v5.1.0/mux.go:73 +0x32f
github.com/go-chi/chi/v5.(*Mux).Mount.func1({0x344ac40, 0xc0279abdc0}, 0xc0280e0640)
github.com/go-chi/chi/v5@v5.1.0/mux.go:327 +0x1bb
net/http.HandlerFunc.ServeHTTP(0xc0280ef4a0?, {0x344ac40?, 0xc0279abdc0?}, 0xc028a1e904?)
net/http/server.go:2220 +0x29
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc039042060, {0x344ac40, 0xc0279abdc0}, 0xc0280e0640)
github.com/go-chi/chi/v5@v5.1.0/mux.go:459 +0x2e2
net/http.HandlerFunc.ServeHTTP(0xc027d4bcb0?, {0x344ac40?, 0xc0279abdc0?}, 0xc027d4bcb0?)
net/http/server.go:2220 +0x29
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc039042060, {0x344ac40, 0xc0279abdc0}, 0xc0280e0640)
github.com/go-chi/chi/v5@v5.1.0/mux.go:73 +0x32f
github.com/erigontech/erigon/cl/beacon/handler.(*ApiHandler).ServeHTTP(0x34536c0?, {0x344ac40?, 0xc0279abdc0?}, 0x4b34340?)
github.com/erigontech/erigon/cl/beacon/handler/handler.go:367 +0x6c
github.com/erigontech/erigon/cl/beacon.ListenAndServe.func1({0x344ac40, 0xc0279abdc0}, 0xc0280e0500)
github.com/erigontech/erigon/cl/beacon/router.go:59 +0x1df
net/http.HandlerFunc.ServeHTTP(0xc0270552c0?, {0x344ac40?, 0xc0279abdc0?}, 0xc028a1e904?)
net/http/server.go:2220 +0x29
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc024580ba0, {0x344ac40, 0xc0279abdc0}, 0xc0280e0500)
github.com/go-chi/chi/v5@v5.1.0/mux.go:459 +0x2e2
net/http.HandlerFunc.ServeHTTP(0xc0282cbb80?, {0x344ac40?, 0xc0279abdc0?}, 0xc0280e0500?)
net/http/server.go:2220 +0x29
github.com/go-chi/cors.(*Cors).Handler-fm.(*Cors).Handler.func1({0x344ac40, 0xc0279abdc0}, 0xc0280e0500)
github.com/go-chi/cors@v1.2.1/cors.go:228 +0x17e
net/http.HandlerFunc.ServeHTTP(0x34536f8?, {0x344ac40?, 0xc0279abdc0?}, 0x4b34340?)
net/http/server.go:2220 +0x29
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc024580ba0, {0x344ac40, 0xc0279abdc0}, 0xc0280e03c0)
github.com/go-chi/chi/v5@v5.1.0/mux.go:90 +0x2ee
net/http.serverHandler.ServeHTTP({0xc02ae46b10?}, {0x344ac40?, 0xc0279abdc0?}, 0x6?)
net/http/server.go:3210 +0x8e
net/http.(*conn).serve(0xc00e41d170, {0x34536c0, 0xc01823b830})
net/http/server.go:2092 +0x5d0
created by net/http.(*Server).Serve in goroutine 19926
net/http/server.go:3360 +0x485
Activity