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

Report JSON-RPC calls panics to Sentry #6135

Open
igor-sirotin opened this issue Nov 27, 2024 · 0 comments
Open

Report JSON-RPC calls panics to Sentry #6135

igor-sirotin opened this issue Nov 27, 2024 · 0 comments

Comments

@igor-sirotin
Copy link
Collaborator

We use go-ethereum implementation of JSON-RPC server which internally recovers from panics:

// Catch panic while running the callback.
defer func() {
if err := recover(); err != nil {
const size = 64 << 10
buf := make([]byte, size)
buf = buf[:runtime.Stack(buf, false)]
log.Error("RPC method " + method + " crashed: " + fmt.Sprintf("%v\n%s", err, buf))
errRes = &internalServerError{errcodePanic, "method handler crashed"}
}
}()

And I don't see direct way of intercepting this error or changing this behaviour.

There're 2 ways to go:

  1. Update our geth's fork and remove this recover.
  2. Switch JSON-RPC server library

I prefer the latter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant