eos icon indicating copy to clipboard operation
eos copied to clipboard

cleos undelegatebw with oversized bandwidth brings down nodeos

Open rbw3821 opened this issue 8 years ago • 1 comments

Passing a value to cleos undelegatebw larger than the available staked bandwidth brings down nodeos. Here is the cleos command:

cleos -u http://localhost:8002 --wallet-url http://localhost:6666 system undelegatebw testa5555543 testa5555543 "1000000000.0000 SYS" "1000000000.0000 SYS" -p testa5555543
2524986ms thread-0   main.cpp:419                  create_action        ] result: {"binargs":"304829a51493b1ca304829a51493b1ca00a0724e18090000045359530000000000a0724e180900000453595300000000"} arg: {"code":"eosio","action":"undelegatebw","args":{"from":"testa5555543","receiver":"testa5555543","unstake_net_quantity":"1000000000.0000 SYS","unstake_cpu_quantity":"1000000000.0000 SYS"}} 
2524995ms thread-0   main.cpp:2493                 main                 ] Failed with error: Bad Cast (7)
Invalid cast from type 'null_type' to Object

Here is the output from nodeos:

2243507ms thread-0   producer_plugin.cpp:215       on_incoming_block    ] Received block 000015964dfc3d06... #5526 @ 2018-05-22T15:37:23.500 signed by testxx555554 [trxs: 0, lib: 5190, confirmed: 0]
2243979ms thread-0   wasm_interface.cpp:909        eosio_assert         ] message: insufficient staked net bandwidth 
2243980ms thread-0   net_plugin.cpp:2954           plugin_shutdown      ] shutdown..
2243980ms thread-0   net_plugin.cpp:2957           plugin_shutdown      ] close acceptor
2243980ms thread-0   net_plugin.cpp:2960           plugin_shutdown      ] close 30 connections
2243982ms thread-0   net_plugin.cpp:2968           plugin_shutdown      ] exit shutdown
2243987ms thread-0   fork_database.cpp:94          close                ] states.size(): 570 
2243989ms thread-0   controller.cpp:261            ~controller_impl     ] db.revision(): 5526 head->block_num: 5526 blog.read_head()->block_num(): 4957 
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243995ms thread-0   net_plugin.cpp:706            ~connection          ] released connection from client
2243996ms thread-0   main.cpp:101                  main                 ] bad alloc

The original staking for the account was:

../../build/programs/cleos/cleos --wallet-url http://localhost:6666 --url http://localhost:8000 system newaccount eosio --transfer testa5555543 EOS8XNhhdcfzSJeBYgV9SxuW3PaUerKRwPzxYFb4fBnhVU793hW3j --stake-net "75367526.4854 SYS" --stake-cpu "75367526.4854 SYS"

rbw3821 avatar May 22 '18 17:05 rbw3821

Commit bbcd65187f3f09ff4ff5eea91c6e562d5784892c should have resolved this.

larryk85 avatar May 22 '18 18:05 larryk85