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

Memory dereference during server query #71

Closed
filippos47 opened this issue Oct 17, 2024 · 0 comments
Closed

Memory dereference during server query #71

filippos47 opened this issue Oct 17, 2024 · 0 comments

Comments

@filippos47
Copy link
Member

Version: v0.8.0

time="2024-10-17T08:30:01Z" level=info msg="E[2024-10-17|08:30:01.208] panic in RPC HTTP handler                    err=\"runtime error: invalid memory address or nil pointer dereference\" stack=\"goroutine 9357 [running]:\\nruntime/debug.Stack()\\n\\t/usr/local/go/src/runtime/debug/stack.go:24 +0x5e\\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.Serve.RecoverAndLogHandler.func1.2()\\n\\t/go/pkg/mod/github.com/cometbft/cometbft@v0.38.7/rpc/jsonrpc/server/http_server.go:206 +0x557\\npanic({0x3423760?, 0x662aae0?})\\n\\t/usr/local/go/src/runtime/panic.go:770 +0x132\\ngithub.com/babylonlabs-io/btc-staker/stakerdb.(*TrackedTransactionStore).QueryStoredTransactions.func1.1({0x7fad480cdfa0?, 0xc003caf680?, 0xc000fb0800?}, {0x7fad48079038, 0x3d6, 0x3d6})\\n\\t/go/src/github.com/babylonlabs-io/btc-staker/stakerdb/trackedtranactionstore.go:1227 +0xe5\\ngithub.com/babylonlabs-io/btc-staker/stakerdb.paginator.query({{0x7fad480cdfa0, 0xc003caf680}, 0x0, 0x0, 0x64}, 0xc00238ea00)\\n\\t/go/src/github.com/babylonlabs-io/btc-staker/stakerdb/paginator.go:129 +0xa5\\ngithub.com/babylonlabs-io/btc-staker/stakerdb.(*TrackedTransactionStore).QueryStoredTransactions.func1({0x44f6c70, 0xc0020086f8})\\n\\t/go/src/github.com/babylonlabs-io/btc-staker/stakerdb/trackedtranactionstore.go:1253 +0x21e\\ngithub.com/btcsuite/btcwallet/walletdb/bdb.(*db).View(0xc0011fe6c8, 0xc0027a4210, 0x0?)\\n\\t/go/pkg/mod/github.com/btcsuite/btcwallet/walletdb@v1.4.0/bdb/db.go:392 +0x9e\\ngithub.com/babylonlabs-io/btc-staker/stakerdb.(*TrackedTransactionStore).QueryStoredTransactions(0xc001367e10, {0xc003caf601?, 0xc000fb0b68?, 0x87?, 0xc003cb3578?})\\n\\t/go/src/github.com/babylonlabs-io/btc-staker/stakerdb/trackedtranactionstore.go:1174 +0x113\\ngithub.com/babylonlabs-io/btc-staker/staker.(*StakerApp).WithdrawableTransactions(0xc00286a000, 0x0?, 0xc000fb0ba8?)\\n\\t/go/src/github.com/babylonlabs-io/btc-staker/staker/stakerapp.go:1907 +0x8f\\ngithub.com/babylonlabs-io/btc-staker/stakerservice.(*StakerService).withdrawableTransactions(0xc002801830, 0x0?, 0xc0003d38c0?, 0x3?)\\n\\t/go/src/github.com/babylonlabs-io/btc-staker/stakerservice/service.go:291 +0x50\\nreflect.Value.call({0x34378c0?, 0xc00081bac0?, 0x3a16760?}, {0x3a2d9dc, 0x4}, {0xc00372f040, 0x3, 0x3?})\\n\\t/usr/local/go/src/reflect/value.go:596 +0xca6\\nreflect.Value.Call({0x34378c0?, 0xc00081bac0?, 0x1c?}, {0xc00372f040?, 0x3a16760?, 0x0?})\\n\\t/usr/local/go/src/reflect/value.go:380 +0xb9\\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.RegisterRPCFuncs.makeJSONRPCHandler.func3({0x44ee0b0, 0xc003e85ea8}, 0xc0028959e0)\\n\\t/go/pkg/mod/github.com/cometbft/cometbft@v0.38.7/rpc/jsonrpc/server/http_json_handler.go:108 +0xce6\\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.RegisterRPCFuncs.handleInvalidJSONRPCPaths.func4({0x44ee0b0?, 0xc003e85ea8?}, 0x40?)\\n\\t/go/pkg/mod/github.com/cometbft/cometbft@v0.38.7/rpc/jsonrpc/server/http_json_handler.go:140 +0x42\\nnet/http.HandlerFunc.ServeHTTP(0xc00288ef70?, {0x44ee0b0?, 0xc003e85ea8?}, 0xc0000ad990?)\\n\\t/usr/local/go/src/net/http/server.go:2166 +0x29\\nnet/http.(*ServeMux).ServeHTTP(0x0?, {0x44ee0b0, 0xc003e85ea8}, 0xc0028959e0)\\n\\t/usr/local/go/src/net/http/server.go:2683 +0x1ad\\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.maxBytesHandler.ServeHTTP({{0x44d0680?, 0xc00288ef70?}, 0xd?}, {0x44ee0b0, 0xc003e85ea8}, 0xc0028959e0)\\n\\t/go/pkg/mod/github.com/cometbft/cometbft@v0.38.7/rpc/jsonrpc/server/http_server.go:256 +0xfb\\ngithub.com/cometbft/cometbft/rpc/jsonrpc/server.Serve.RecoverAndLogHandler.func1({0x44ed2d0, 0xc00116c620}, 0xc0028959e0)\\n\\t/go/pkg/mod/github.com/cometbft/cometbft@v0.38.7/rpc/jsonrpc/server/http_server.go:229 +0x26c\\nnet/http.HandlerFunc.ServeHTTP(0x414805?, {0x44ed2d0?, 0xc00116c620?}, 0xc00116c601?)\\n\\t/usr/local/go/src/net/http/server.go:2166 +0x29\\nnet/http.serverHandler.ServeHTTP({0x44e5118?}, {0x44ed2d0?, 0xc00116c620?}, 0x6?)\\n\\t/usr/local/go/src/net/http/server.go:3137 +0x8e\\nnet/http.(*conn).serve(0xc001ecaa20, {0x4516658, 0xc003133020})\\n\\t/usr/local/go/src/net/http/server.go:2039 +0x5e8\\ncreated by net/http.(*Server).Serve in goroutine 387\\n\\t/usr/local/go/src/net/http/server.go:3285 +0x4b4\\n\""
time="2024-10-17T08:30:01Z" level=info msg="D[2024-10-17|08:30:01.209] served RPC HTTP response                     method=POST url=/ status=500 duration=0 remoteAddr=10.100.75.38:46818"

While I don't know for sure which server command was executed at that point, it probably happened while trying to create a staking tx.

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

2 participants