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

[0.34.0] [cosmoshub-2] /txs invalid memory address or nil pointer dereference #4172

Closed
ssssssu12 opened this issue Apr 23, 2019 · 6 comments
Closed

Comments

@ssssssu12
Copy link

network: cosmoshub-2
gaiad version: 0.34.0

POST /txs

Request:

{
  "tx": {
    "msg": [
      {
        "type": "cosmos-sdk/MsgMultiSend",
        "value": {
          "inputs": [
            {
              "address": "cosmos10j8aqm63m977u80alym8cshe708juedkaychlp",
              "coins": [
                {
                  "denom": "uatom",
                  "amount": "2000000"
                }
              ]
            }
          ],
          "outputs": [
            {
              "address": "cosmos1mgj99kpk4vvq3wu29gcrunqyw20chqw9h8kdgy",
              "coins": [
                {
                  "denom": "uatom",
                  "amount": "2000000"
                }
              ]
            }
          ]
        }
      }
    ],
    "fee": {
      "gas": "40000",
      "amount": [
        {
          "denom": "uatom",
          "amount": "300"
        }
      ]
    },
    "memo": "",
    "signatures": [
      {
        "signature": ".....",
        "pub_key": {
          "type": "tendermint/PubKeySecp256k1",
          "value": "....."
        }
      }
    ]
  },
  "mode": "block"
}

Response:

{
    "code": -32603,
    "message": "Internal error",
    "data": "runtime error: invalid memory address or nil pointer dereference"
}

What's wrong??

@alexanderbez
Copy link
Contributor

Thanks for the issue @ssssssu12, but it's a bit difficult to see if there is any problem w/o a stack trace. Can you please post the stack trace that gave this panic?

@faboweb
Copy link
Contributor

faboweb commented Apr 24, 2019

I get the same error when simulating a delegation tx:

POST https://stargate.lunie.io/staking/delegators/cosmos1ymazqh72lyyaptvl6h6emn8tsztka93djc07l4/delegations

Body:

{"delegator_address":"cosmos1ymazqh72lyyaptvl6h6emn8tsztka93djc07l4","validator_address":"cosmosvaloper1000ya26q2cmh399q4c5aaacd9lmmdqp90kw2jn","delegation":{"denom":"uatom","amount":"1"},"base_req":{"sequence":"2","from":"cosmos1ymazqh72lyyaptvl6h6emn8tsztka93djc07l4","account_number":"1455","chain_id":"cosmoshub-2","simulate":true,"memo":"Sent via Lunie"}}

Response:

{
  "jsonrpc": "2.0",
  "id": "",
  "error": {
    "code": -32603,
    "message": "Internal error",
    "data": "runtime error: invalid memory address or nil pointer dereference"
  }
}

@ssssssu12
Copy link
Author

@alexanderbez
This is rest-server log.

E[2019-04-24|11:27:30.856] Panic in RPC HTTP handler                    module=rest-server err="runtime error: invalid memory address or nil pointer dereference" stack="goroutine 107924 [running]:\nruntime/debug.Stack(0xc002594ad0, 0xe1f500, 0x1d67600)\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0x9d\ngithub.com/tendermint/tendermint/rpc/lib/server.RecoverAndLogHandler.func1.1(0xc00256bc20, 0x1441480, 0xc000bd7100, 0xbf281044b2fb19b9, 0x516b7c3b6458, 0x1dc3860, 0xc002afc600)\n\t/root/go/pkg/mod/github.com/tendermint/tendermint@v0.31.4/rpc/lib/server/http_server.go:140 +0x552\npanic(0xe1f500, 0x1d67600)\n\t/usr/local/go/src/runtime/panic.go:522 +0x1b5\ngithub.com/cosmos/cosmos-sdk/types.NewResponseFormatBroadcastTxCommit(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\n\t/root/go/src/github.com/cosmos/cosmos-sdk/types/result.go:110 +0x58\ngithub.com/cosmos/cosmos-sdk/client/context.CLIContext.BroadcastTxCommit(0xc000b75110, 0xc000bd70d0, 0x145a5e0, 0xc0000a5100, 0x0, 0x0, 0x1427740, 0xc0000ae008, 0xf37124, 0x4, ...)\n\t/root/go/src/github.com/cosmos/cosmos-sdk/client/context/broadcast.go:46 +0x3f1\ngithub.com/cosmos/cosmos-sdk/client/context.CLIContext.BroadcastTx(0xc000b75110, 0xc000bd70d0, 0x145a5e0, 0xc0000a5100, 0x0, 0x0, 0x1427740, 0xc0000ae008, 0xf37124, 0x4, ...)\n\t/root/go/src/github.com/cosmos/cosmos-sdk/client/context/broadcast.go:23 +0x212\ngithub.com/cosmos/cosmos-sdk/client/tx.BroadcastTxRequest.func1(0x143c780, 0xc00256bc20, 0xc002afc800)\n\t/root/go/src/github.com/cosmos/cosmos-sdk/client/tx/broadcast.go:54 +0x2b6\nnet/http.HandlerFunc.ServeHTTP(0xc000b8ee40, 0x143c780, 0xc00256bc20, 0xc002afc800)\n\t/usr/local/go/src/net/http/server.go:1995 +0x44\ngithub.com/gorilla/mux.(*Router).ServeHTTP(0xc000158000, 0x143c780, 0xc00256bc20, 0xc002afc600)\n\t/root/go/pkg/mod/github.com/gorilla/mux@v1.7.0/mux.go:212 +0xe3\ngithub.com/tendermint/tendermint/rpc/lib/server.maxBytesHandler.ServeHTTP(0x1426680, 0xc000158000, 0xf4240, 0x143c780, 0xc00256bc20, 0xc002afc600)\n\t/root/go/pkg/mod/github.com/tendermint/tendermint@v0.31.4/rpc/lib/server/http_server.go:185 +0xd0\ngithub.com/tendermint/tendermint/rpc/lib/server.RecoverAndLogHandler.func1(0x143ce00, 0xc000d6a8c0, 0xc002afc600)\n\t/root/go/pkg/mod/github.com/tendermint/tendermint@v0.31.4/rpc/lib/server/http_server.go:158 +0x317\nnet/http.HandlerFunc.ServeHTTP(0xc0009c5950, 0x143ce00, 0xc000d6a8c0, 0xc002afc600)\n\t/usr/local/go/src/net/http/server.go:1995 +0x44\nnet/http.serverHandler.ServeHTTP(0xc000bc8000, 0x143ce00, 0xc000d6a8c0, 0xc002afc600)\n\t/usr/local/go/src/net/http/server.go:2774 +0xa8\nnet/http.(*conn).serve(0xc002596a00, 0x1440900, 0xc002cae2c0)\n\t/usr/local/go/src/net/http/server.go:1878 +0x851\ncreated by net/http.(*Server).Serve\n\t/usr/local/go/src/net/http/server.go:2884 +0x2f4\n"
I[2019-04-24|11:27:30.856] Served RPC HTTP response                     module=rest-server method=POST url=/txs status=500 duration=1 remoteAddr=10.45.23.136:42554

@alexanderbez
Copy link
Contributor

alexanderbez commented Apr 24, 2019

Ohhh this issue is benign and already fixed in #4135. I'll add that to the wishlist.

@ssssssu12
Copy link
Author

@alexanderbez Thanks for your support.
This problem will fix on the release v0.34.2 ?

@alexanderbez
Copy link
Contributor

@ssssssu12 yes :)

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

3 participants