I’m getting this error under very specific circumstances:
I have deployed a VM via docker-machine. I want to run a docker container with the stock starport project, it’s called launchpayloadcli/launchpayloadd inside it.
If I run docker-machine ssh machinename docker run --volume=/home/docker/nodeconfig:/payload/config -p 1317:1317 apeunit/launchpayload /payload/runlightclient.sh 192.168.99.100 drop-28b10d4eff415a7b0b2c
, or put the command in a .sh file in the VM, this error DOES NOT appear when I access a particular API endpoint (GET IP:1317/txs/TXHASH
)
If I write a Golang program to run this exact same command, including the docker-machine ssh part, it will give this error when I access that particular API endpoint:
E[2020-12-11|05:33:04.222] Panic in RPC HTTP handler module=rest-server err="runtime error: invalid memory address or nil pointer dereference" stack="goroutine 27 [running]:
runtime/debug.Stack(0xfe61a0, 0xfd93e0, 0x1ab62a0)
/usr/lib/go/src/runtime/debug/stack.go:24 +0x9f
github.com/tendermint/tendermint/rpc/jsonrpc/server.RecoverAndLogHandler.func1.2(0xc0012b5200, 0x1438060, 0xc001284260, 0xbfecdf040d1b3443, 0x481d37f73, 0x1ad6b40, 0xc000e1a900)
/home/shinichi/source/go/pkg/mod/github.com/tendermint/tendermint@v0.33.7/rpc/jsonrpc/server/http_server.go:191 +0x175
panic(0xfd93e0, 0x1ab62a0)
/usr/lib/go/src/runtime/panic.go:969 +0x1b9
github.com/tendermint/tendermint/lite.(*DynamicVerifier).Verify(0x0, 0xc00047b8c0, 0xc000dcce00, 0x0, 0x0)
/home/shinichi/source/go/pkg/mod/github.com/tendermint/tendermint@v0.33.7/lite/dynamic_verifier.go:76 +0x6c
github.com/tendermint/tendermint/lite/proxy.GetCertifiedCommit(0x3, 0x144a320, 0xc000e1c420, 0x1428560, 0x0, 0x0, 0x0, 0xe00, 0x1)
/home/shinichi/source/go/pkg/mod/github.com/tendermint/tendermint@v0.33.7/lite/proxy/query.go:143 +0x122
github.com/cosmos/cosmos-sdk/client/context.CLIContext.Verify(0x0, 0x0, 0x0, 0x144a320, 0xc000e1c420, 0x7fffc29cbf44, 0x19, 0x0, 0x0, 0x141b940, ...)
/home/shinichi/source/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.1/client/context/query.go:136 +0x75
github.com/cosmos/cosmos-sdk/x/auth/client/utils.ValidateTxResult(0x0, 0x0, 0x0, 0x144a320, 0xc000e1c420, 0x7fffc29cbf44, 0x19, 0x0, 0x0, 0x141b940, ...)
/home/shinichi/source/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.1/x/auth/client/utils/query.go:128 +0xa5
github.com/cosmos/cosmos-sdk/x/auth/client/utils.QueryTx(0x0, 0x0, 0x0, 0x144a320, 0xc000e1c420, 0x7fffc29cbf44, 0x19, 0x0, 0x0, 0x141b940, ...)
/home/shinichi/source/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.1/x/auth/client/utils/query.go:93 +0x3e7
github.com/cosmos/cosmos-sdk/x/auth/client/rest.QueryTxRequestHandlerFn.func1(0x14335e0, 0xc0012b5200, 0xc000e1ab00)
/home/shinichi/source/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.1/x/auth/client/rest/query.go:124 +0x1b8
net/http.HandlerFunc.ServeHTTP(0xc0012845c0, 0x14335e0, 0xc0012b5200, 0xc000e1ab00)
/usr/lib/go/src/net/http/server.go:2042 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0004bc3c0, 0x14335e0, 0xc0012b5200, 0xc000e1a900)
/home/shinichi/source/go/pkg/mod/github.com/gorilla/mux@v1.7.4/mux.go:210 +0xd3
github.com/gorilla/handlers.(*cors).ServeHTTP(0xc0012dc120, 0x14335e0, 0xc0012b5200, 0xc000e1a900)
/home/shinichi/source/go/pkg/mod/github.com/gorilla/handlers@v1.4.2/cors.go:54 +0x103e
github.com/tendermint/tendermint/rpc/jsonrpc/server.maxBytesHandler.ServeHTTP(0x141a6c0, 0xc0012dc120, 0xf4240, 0x14335e0, 0xc0012b5200, 0xc000e1a900)
/home/shinichi/source/go/pkg/mod/github.com/tendermint/tendermint@v0.33.7/rpc/jsonrpc/server/http_server.go:240 +0xd4
github.com/tendermint/tendermint/rpc/jsonrpc/server.RecoverAndLogHandler.func1(0x1433d60, 0xc0000d8a80, 0xc000e1a900)
/home/shinichi/source/go/pkg/mod/github.com/tendermint/tendermint@v0.33.7/rpc/jsonrpc/server/http_server.go:213 +0x39a
net/http.HandlerFunc.ServeHTTP(0xc0012cb290, 0x1433d60, 0xc0000d8a80, 0xc000e1a900)
/usr/lib/go/src/net/http/server.go:2042 +0x44
net/http.serverHandler.ServeHTTP(0xc0000d89a0, 0x1433d60, 0xc0000d8a80, 0xc000e1a900)
/usr/lib/go/src/net/http/server.go:2843 +0xa3
net/http.(*conn).serve(0xc0012c9ae0, 0x1437660, 0xc000e20fc0)
/usr/lib/go/src/net/http/server.go:1925 +0x8ad
created by net/http.(*Server).Serve
/usr/lib/go/src/net/http/server.go:2969 +0x36c
It has something to do with CLI’s config files --home ~/.launchpayloadcli/CHAIN_ID
, perhaps the .lite_verifier
, because if I don’t get the error, I can scp the files into the VM and I won’t get this error anymore.
It doesn’t seem to be a file permissions error because the files can be created. But what could cause that specific line /home/shinichi/source/go/pkg/mod/github.com/tendermint/tendermint@v0.33.7/lite/dynamic_verifier.go:76 +0x6c
to panic?