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

INSTALL_BUNDLE crashes the node on JSON syntax error #6169

Closed
dckc opened this issue Sep 9, 2022 · 1 comment · Fixed by #6238
Closed

INSTALL_BUNDLE crashes the node on JSON syntax error #6169

dckc opened this issue Sep 9, 2022 · 1 comment · Fixed by #6238
Assignees
Labels
bug Something isn't working cosmic-swingset package: cosmic-swingset
Milestone

Comments

@dckc
Copy link
Member

dckc commented Sep 9, 2022

To Reproduce

Steps to reproduce the behavior:

  1. make scenario2-run-chain-psm
  2. try to tx swingset install-bundle a .js file rather than .json
  3. ERR CONSENSUS FAILURE!!!

Expected behavior

something considerably less bad

Platform Environment

  • what OS are you using? what version of Node.js? linux. node v16.17.0
  • is there anything special/unusual about your platform? don't think so
  • what version of the Agoric-SDK are you using? (run git describe --tags --always)

agoricxnet-7-1009-g9c3208ebb

Additional context

I was testing ack publish bundle #5541

Additional context

I can share a more complete log file and I have a slog, though I don't think they're necessary to diagnose this.

Log Extract

crash log entry
2022-09-09T13:08:35.819Z block-manager: INSTALL_BUNDLE error: (SyntaxError#1)
SyntaxError#1: Unexpected token e in JSON at position 0

  at JSON.parse (<anonymous>)
  at packages/cosmic-swingset/src/block-manager.js:103:31
  at processAction (packages/cosmic-swingset/src/block-manager.js:122:11)
  at blockingSend (packages/cosmic-swingset/src/block-manager.js:264:19)
  at async portHandlers.<computed> (packages/cosmic-swingset/src/chain-main.js:235:16)

portHandler threw (SyntaxError#1)
8:08AM ERR CONSENSUS FAILURE!!! err="SyntaxError: Unexpected token e in JSON at position 0" module=consensus stack="goroutine 30 [running]:\nruntime/debug.Stack()\n\t/nix/store/21ms9x837mi5acwiq6qbk0wwnw3zmiqw-go-1.18.4/share/go/src/runtime/debug/stack.go:24 +0x65\ngithub.com/tendermint/tendermint/consensus.(*State).receiveRoutine.func2()\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/tendermint@v0.34.19-alpha.agoric.1/consensus/state.go:727 +0x4c\npanic({0x7f732af5f440, 0xc005182710})\n\t/nix/store/21ms9x837mi5acwiq6qbk0wwnw3zmiqw-go-1.18.4/share/go/src/runtime/panic.go:838 +0x207\ngithub.com/Agoric/agoric-sdk/golang/cosmos/x/swingset.EndBlock({{0x7f732b1ea4d8, 0xc00005a230}, {0x7f732b1f6a30, 0xc0021e4f40}, {{0xb, 0x0}, {0xc004560300, 0x6}, 0x19d2, {0x2cf8ceb0, ...}, ...}, ...}, ...)\n\t/home/connolly/projects/agoric-sdk/golang/cosmos/x/swingset/abci.go:69 +0x375\ngithub.com/Agoric/agoric-sdk/golang/cosmos/x/swingset.AppModule.EndBlock({{}, {{0x7f732b1d74e0, 0xc0005b3f20}, {0x7f732b1f7ea0, 0xc00016cf40}, {{0x7f732b1f51f8, 0xc00016cf40}, 0xc000172278, {0x7f732b1d74e0, 0xc0005b3d50}, ...}, ...}}, ...)\n\t/home/connolly/projects/agoric-sdk/golang/cosmos/x/swingset/module.go:130 +0x7d\ngithub.com/cosmos/cosmos-sdk/types/module.(*Manager).EndBlock(_, {{0x7f732b1ea4d8, 0xc00005a230}, {0x7f732b1f6a30, 0xc0021e4f40}, {{0xb, 0x0}, {0xc004560300, 0x6}, 0x19d2, ...}, ...}, ...)\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/cosmos-sdk@v0.45.4-alpha.agoric.1/types/module/module.go:499 +0x5bd\ngithub.com/Agoric/agoric-sdk/golang/cosmos/app.(*GaiaApp).EndBlocker(_, {{0x7f732b1ea4d8, 0xc00005a230}, {0x7f732b1f6a30, 0xc0021e4f40}, {{0xb, 0x0}, {0xc004560300, 0x6}, 0x19d2, ...}, ...}, ...)\n\t/home/connolly/projects/agoric-sdk/golang/cosmos/app/app.go:791 +0x98\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).EndBlock(0xc000554d00, {0x0?})\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/cosmos-sdk@v0.45.4-alpha.agoric.1/baseapp/abci.go:213 +0x2be\ngithub.com/tendermint/tendermint/abci/client.(*committingClient).EndBlockSync(0xc000de5860, {0xc000de5860?})\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/tendermint@v0.34.19-alpha.agoric.1/abci/client/committing_client.go:339 +0xe8\ngithub.com/tendermint/tendermint/proxy.(*appConnConsensus).EndBlockSync(0xc00a5302c0?, {0xc00f6e6000?})\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/tendermint@v0.34.19-alpha.agoric.1/proxy/app_conn.go:89 +0x24\ngithub.com/tendermint/tendermint/state.execBlockOnProxyApp({0x7f732b1eb2d8?, 0xc001005560}, {0x7f732b1f0498, 0xc000e2cea0}, 0xc001ea63c0, {0x7f732b1f5e38, 0xc000e2c880}, 0x19d1?)\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/tendermint@v0.34.19-alpha.agoric.1/state/execution.go:327 +0x54e\ngithub.com/tendermint/tendermint/state.(*BlockExecutor).ApplyBlock(_, {{{0xb, 0x0}, {0xc000163190, 0x7}}, {0xc000163198, 0x6}, 0x11, 0x19d1, {{0xc008c52000, ...}, ...}, ...}, ...)\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/tendermint@v0.34.19-alpha.agoric.1/state/execution.go:140 +0x171\ngithub.com/tendermint/tendermint/consensus.(*State).finalizeCommit(0xc00061fc00, 0x19d2)\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/tendermint@v0.34.19-alpha.agoric.1/consensus/state.go:1655 +0x9fd\ngithub.com/tendermint/tendermint/consensus.(*State).tryFinalizeCommit(0xc00061fc00, 0x19d2)\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/tendermint@v0.34.19-alpha.agoric.1/consensus/state.go:1564 +0x305\ngithub.com/tendermint/tendermint/consensus.(*State).enterCommit.func1()\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/tendermint@v0.34.19-alpha.agoric.1/consensus/state.go:1499 +0x87\ngithub.com/tendermint/tendermint/consensus.(*State).enterCommit(0xc00061fc00, 0x19d2, 0x0)\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/tendermint@v0.34.19-alpha.agoric.1/consensus/state.go:1537 +0xbea\ngithub.com/tendermint/tendermint/consensus.(*State).addVote(0xc00061fc00, 0xc0082f4640, {0x0, 0x0})\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/tendermint@v0.34.19-alpha.agoric.1/consensus/state.go:2151 +0xb7c\ngithub.com/tendermint/tendermint/consensus.(*State).tryAddVote(0xc00061fc00, 0xc0082f4640, {0x0?, 0x7f732915dc06?})\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/tendermint@v0.34.19-alpha.agoric.1/consensus/state.go:1949 +0x2c\ngithub.com/tendermint/tendermint/consensus.(*State).handleMsg(0xc00061fc00, {{0x7f732b1d2a48?, 0xc000278e20?}, {0x0?, 0x0?}})\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/tendermint@v0.34.19-alpha.agoric.1/consensus/state.go:856 +0x44b\ngithub.com/tendermint/tendermint/consensus.(*State).receiveRoutine(0xc00061fc00, 0x0)\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/tendermint@v0.34.19-alpha.agoric.1/consensus/state.go:783 +0x512\ncreated by github.com/tendermint/tendermint/consensus.(*State).OnStart\n\t/home/connolly/go/pkg/mod/github.com/agoric-labs/tendermint@v0.34.19-alpha.agoric.1/consensus/state.go:379 +0x12d\n"

cc @kriskowal @JimLarson

@dckc dckc added the bug Something isn't working label Sep 9, 2022
@dckc dckc changed the title INSTALL_BUNDLE crashes the chain on JSON syntax error INSTALL_BUNDLE crashes the node on JSON syntax error Sep 9, 2022
@dckc dckc added the cosmic-swingset package: cosmic-swingset label Sep 9, 2022
@kriskowal
Copy link
Member

kriskowal commented Sep 9, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cosmic-swingset package: cosmic-swingset
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants