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

SIGSEGV when sync transaction doesn't complete before timeout #3585

Closed
4 tasks
mdyring opened this issue Feb 10, 2019 · 6 comments · Fixed by #3591 or #3624
Closed
4 tasks

SIGSEGV when sync transaction doesn't complete before timeout #3585

mdyring opened this issue Feb 10, 2019 · 6 comments · Fixed by #3591 or #3624

Comments

@mdyring
Copy link

mdyring commented Feb 10, 2019

Summary of Bug

gaiacli tx staking create-validator ...
without fees, behind sentry architecture w/ fees so that tx is not broadcast. As expected, the command times out as the TX is not included in a block.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x140 pc=0xb51189]

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/types.NewResponseFormatBroadcastTxCommit(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /root/gopath/src/github.com/cosmos/cosmos-sdk/types/result.go:75 +0x59
github.com/cosmos/cosmos-sdk/client/context.CLIContext.BroadcastTxAndAwaitCommit(0xc0001517a0, 0xc000186420, 0x1365420, 0xc000369340, 0x0, 0x0, 0x134ea80, 0xc00000c018, 0xebb1cb, 0x4, ...)
        /root/gopath/src/github.com/cosmos/cosmos-sdk/client/context/broadcast.go:38 +0x357
github.com/cosmos/cosmos-sdk/client/context.CLIContext.BroadcastTx(0xc0001517a0, 0xc000186420, 0x1365420, 0xc000369340, 0x0, 0x0, 0x134ea80, 0xc00000c018, 0xebb1cb, 0x4, ...)
        /root/gopath/src/github.com/cosmos/cosmos-sdk/client/context/broadcast.go:21 +0x200
github.com/cosmos/cosmos-sdk/client/utils.CompleteAndBroadcastTxCLI(0xc000c66590, 0x13628c0, 0xc000368c80, 0x327, 0x0, 0x30d40, 0x3ff0000000000000, 0x0, 0x7ffd19bbf676, 0xa, ...)
        /root/gopath/src/github.com/cosmos/cosmos-sdk/client/utils/utils.go:79 +0x4fe
github.com/cosmos/cosmos-sdk/client/utils.GenerateOrBroadcastMsgs(0xc0001517a0, 0xc000186420, 0x1365420, 0xc000369340, 0x0, 0x0, 0x134ea80, 0xc00000c018, 0xebb1cb, 0x4, ...)
        /root/gopath/src/github.com/cosmos/cosmos-sdk/client/utils/utils.go:35 +0x18e
github.com/cosmos/cosmos-sdk/x/staking/client/cli.GetCmdCreateValidator.func1(0xc000c6ca00, 0xc00010ef20, 0x0, 0x15, 0x0, 0x0)
        /root/gopath/src/github.com/cosmos/cosmos-sdk/x/staking/client/cli/tx.go:38 +0x39f
github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra.(*Command).execute(0xc000c6ca00, 0xc00010edc0, 0x15, 0x16, 0xc000c6ca00, 0xc00010edc0)
        /root/gopath/src/github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra/command.go:762 +0x473
github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc00014b900, 0x24, 0xc000c4ee38, 0xed397e)
        /root/gopath/src/github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra.(*Command).Execute(0xc00014b900, 0x1, 0xc000174af0)
        /root/gopath/src/github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra/command.go:800 +0x2b
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/libs/cli.Executor.Execute(0xc00014b900, 0x1280820, 0x2, 0xc000bb3f00)
        /root/gopath/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/libs/cli/setup.go:89 +0x4e
main.main()
        /root/gopath/src/github.com/cosmos/cosmos-sdk/cmd/gaia/cmd/gaiacli/main.go:103 +0x5a4

Steps to Reproduce

Haven't tested, but I'd think any sync TX that doesn't complete.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@jleni
Copy link
Member

jleni commented Feb 10, 2019

This happened to me a couple of times today...

@jleni
Copy link
Member

jleni commented Feb 10, 2019

Also when calling gaiacli tx send ...

@jleni
Copy link
Member

jleni commented Feb 10, 2019

Here is the panic. Hash is nil when things fail...

TxHash: res.Hash.String(),

@jleni
Copy link
Member

jleni commented Feb 12, 2019

I still have the crash, even with the fix. Now is crashing a bit earlier in the fix that was introduced

/snap/go/current/bin/go build -tags "cgo ledger" -o /tmp/___go_build_main_go /home/lenij/go/src/github.com/cosmos/cosmos-sdk/cmd/gaia/cmd/gaiacli/main.go #gosetup
/tmp/___go_build_main_go tx send cosmos1qumptahqxn7awk6urce7sp4yrr2fmcdnnh8fu0 20photino --from=nanotest --ledger --fees=20000photino --chain-id=gaia-11001 #gosetup
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x140 pc=0xb52809]

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/types.NewResponseFormatBroadcastTxCommit(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/home/lenij/go/src/github.com/cosmos/cosmos-sdk/types/result.go:74 +0x59
github.com/cosmos/cosmos-sdk/client/context.CLIContext.BroadcastTxAndAwaitCommit(0xc00017c1c0, 0xc0000b3c60, 0x1385840, 0xc000bf3700, 0x0, 0x0, 0x136ee60, 0xc0000c2008, 0xeda26b, 0x4, ...)
/home/lenij/go/src/github.com/cosmos/cosmos-sdk/client/context/broadcast.go:38 +0x357
github.com/cosmos/cosmos-sdk/client/context.CLIContext.BroadcastTx(0xc00017c1c0, 0xc0000b3c60, 0x1385840, 0xc000bf3700, 0x0, 0x0, 0x136ee60, 0xc0000c2008, 0xeda26b, 0x4, ...)
/home/lenij/go/src/github.com/cosmos/cosmos-sdk/client/context/broadcast.go:21 +0x200
github.com/cosmos/cosmos-sdk/client/utils.CompleteAndBroadcastTxCLI(0xc000c1c1a0, 0x1382ce0, 0xc000bf3440, 0x3de, 0x4, 0x30d40, 0x3ff0000000000000, 0x0, 0x7fffed22567b, 0xa, ...)
/home/lenij/go/src/github.com/cosmos/cosmos-sdk/client/utils/utils.go:79 +0x4fe
github.com/cosmos/cosmos-sdk/client/utils.GenerateOrBroadcastMsgs(0xc00017c1c0, 0xc0000b3c60, 0x1385840, 0xc000bf3700, 0x0, 0x0, 0x136ee60, 0xc0000c2008, 0xeda26b, 0x4, ...)
/home/lenij/go/src/github.com/cosmos/cosmos-sdk/client/utils/utils.go:35 +0x18e
github.com/cosmos/cosmos-sdk/x/bank/client/cli.SendTxCmd.func1(0xc000bfa500, 0xc00016de00, 0x2, 0x6, 0x0, 0x0)
/home/lenij/go/src/github.com/cosmos/cosmos-sdk/x/bank/client/cli/sendtx.go:62 +0x6fe
github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra.(*Command).execute(0xc000bfa500, 0xc00016dce0, 0x6, 0x6, 0xc000bfa500, 0xc00016dce0)
/home/lenij/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra/command.go:762 +0x473
github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc0000f5900, 0x24, 0xc000b85658, 0xef2c2b)
/home/lenij/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra.(*Command).Execute(0xc0000f5900, 0x1, 0xc00000e918)
/home/lenij/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra/command.go:800 +0x2b
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/libs/cli.Executor.Execute(0xc0000f5900, 0x129feb8, 0x2, 0xc000ae4c00)
/home/lenij/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/libs/cli/setup.go:89 +0x4e
main.main()
/home/lenij/go/src/github.com/cosmos/cosmos-sdk/cmd/gaia/cmd/gaiacli/main.go:103 +0x5a4

@jleni
Copy link
Member

jleni commented Feb 12, 2019

res is empty before that call

image

@alexanderbez
Copy link
Contributor

Not sure why the response is nil. In either case, will resolve this.

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