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

cli_wallet crashes on quit #1690

Closed
1 of 17 tasks
abitmore opened this issue Apr 1, 2019 · 12 comments
Closed
1 of 17 tasks

cli_wallet crashes on quit #1690

abitmore opened this issue Apr 1, 2019 · 12 comments
Assignees
Labels
1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 2d Developing Status indicating currently designing and developing a solution 3d Bug Classification indicating the existing implementation does not match the intention of the design 4b Normal Priority Priority indicating the moderate impact to system/user -OR- existing workaround is costly to perform 6 CLI Impact flag identifying the command line interface (CLI) wallet application 9c Large Effort estimation indicating TBD

Comments

@abitmore
Copy link
Member

abitmore commented Apr 1, 2019

Bug Description
cli_wallet crashes when quitting.

  • press ctrl+D
locked >>> 
1990572ms th_a       wallet.cpp:845                save_wallet_file     ] saving wallet to file wallet.json
1990580ms th_a       wallet.cpp:864                save_wallet_file     ] saved successfully wallet to tmp file wallet.json.tmp
1990580ms th_a       wallet.cpp:870                save_wallet_file     ] validated successfully tmp wallet file wallet.json.tmp
1990580ms th_a       wallet.cpp:874                save_wallet_file     ] renamed successfully tmp wallet file wallet.json.tmp
1990580ms th_a       wallet.cpp:881                save_wallet_file     ] successfully saved wallet to file wallet.json
pure virtual method called
terminate called without an active exception
Aborted (core dumped)
  • try command "quit"
locked >>> quit
2028889ms th_a       wallet.cpp:826                quit                 ] Quitting Cli Wallet ...
9 canceled_exception: Canceled

2028889ms th_a       wallet.cpp:845                save_wallet_file     ] saving wallet to file wallet.json
2028897ms th_a       wallet.cpp:864                save_wallet_file     ] saved successfully wallet to tmp file wallet.json.tmp
2028900ms th_a       wallet.cpp:870                save_wallet_file     ] validated successfully tmp wallet file wallet.json.tmp
2028903ms th_a       wallet.cpp:874                save_wallet_file     ] renamed successfully tmp wallet file wallet.json.tmp
2028903ms th_a       wallet.cpp:881                save_wallet_file     ] successfully saved wallet to file wallet.json
pure virtual method called
terminate called without an active exception
Aborted (core dumped)
(gdb) bt
#0  0x00007ffff6b78428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff6b7a02a in __GI_abort () at abort.c:89
#2  0x00007ffff74bb84d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff74b96b6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff74b9701 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff74ba23f in __cxa_pure_virtual () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x0000000000de2b6b in fc::rpc::websocket_api_connection::send_call(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<fc::variant, std::allocator<fc::variant> >) ()
#7  0x000000000090246f in std::_Function_handler<void (), void fc::api_connection::api_visitor::operator()<>(char const*, std::function<void ()>&) const::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#8  0x0000000000cf8312 in graphene::wallet::detail::wallet_api_impl::~wallet_api_impl() ()
#9  0x0000000000cf8741 in std::_Sp_counted_ptr<graphene::wallet::detail::wallet_api_impl*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
#10 0x0000000000c2987a in graphene::wallet::wallet_api::~wallet_api() ()
#11 0x00000000008d23e1 in boost::any::holder<std::shared_ptr<graphene::wallet::wallet_api> >::~holder() ()
#12 0x00000000008d1f0a in boost::any::holder<fc::api<graphene::wallet::wallet_api, fc::identity_member> >::~holder() ()
#13 0x0000000000dd2ec5 in fc::rpc::cli::~cli() ()
#14 0x00000000008db1b6 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() ()
#15 0x00000000008cf62e in boost::detail::sp_counted_impl_p<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()> >, boost::signals2::mutex> >::dispose() ()
#16 0x00000000008e58c3 in boost::detail::sp_counted_impl_p<boost::signals2::detail::grouped_list<int, std::less<int>, boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()> >, boost::signals2::mutex> > > >::dispose() ()
#17 0x00000000008af3aa in boost::detail::sp_counted_base::release() [clone .part.890] [clone .constprop.8535] ()
#18 0x00000000008ce3c5 in boost::detail::sp_counted_impl_p<boost::signals2::detail::signal_impl<void (), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void ()>, boost::function<void (boost::signals2::connection const&)>, boost::signals2::mutex>::invocation_state>::dispose() ()
#19 0x00000000008af3aa in boost::detail::sp_counted_base::release() [clone .part.890] [clone .constprop.8535] ()
#20 0x00000000008ce325 in boost::detail::sp_counted_impl_p<boost::signals2::detail::signal_impl<void (), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void ()>, boost::function<void (boost::signals2::connection const&)>, boost::signals2::mutex> >::dispose() ()
#21 0x0000000000e1957a in boost::detail::sp_counted_base::release() [clone .part.45] [clone .constprop.2336] ()
#22 0x00000000008db1b6 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() ()
#23 0x0000000000e1a49c in fc::http::websocket_client::~websocket_client() ()
#24 0x00000000008a5849 in main ()

Impacts
Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Travis, etc.)
  • DEX (the Decentralized EXchange, market engine, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Other (please add below)

Steps To Reproduce
Steps to reproduce the behavior (example outlined below):

  1. Execute cli_wallet
  2. press ctrl+d
  3. crash.

Expected Behavior
cli_wallet should exit cleanly.

Screenshots (optional)
If applicable, add screenshots to help explain process flow and behavior.

Host Environment
Please provide details about the host environment. Much of this information can be found running: witness_node --version.

  • Host OS: Ubuntu 16.04 LTS
  • Host Physical RAM: 16G
  • BitShares Version: 3.0.0
  • OpenSSL Version: 1.0.2g
  • Boost Version: 1.58

Additional Context (optional)
Add any other context about the problem here.

CORE TEAM TASK LIST

  • Evaluate / Prioritize Bug Report
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation
@clockworkgr
Copy link
Member

wasnt that fixed?

@abitmore abitmore self-assigned this Apr 1, 2019
@abitmore abitmore added this to the 3.1.0 - Feature Release milestone Apr 1, 2019
@abitmore
Copy link
Member Author

abitmore commented Apr 1, 2019

@clockworkgr you mean #177? That issue was closed but not fixed.

This issue is different. I've made a patch locally, will push soon.

@oxarbitrage
Copy link
Member

in what tag it is happening ? just tried a develop branch i have compiled but from before the hardfork code was merged into it and segfault is not happening.

@oxarbitrage
Copy link
Member

confirmed crash in testnet 3.0.1.

@abitmore
Copy link
Member Author

abitmore commented Apr 1, 2019

@oxarbitrage IIRC it always crashes. It's not a big deal, although a bit annoying. The reason is dereferencing after destruction.

A side effect with my (unpublished) patch: cli_wallet sometimes hang when pressing "ctrl+c", in this case, if press "enter" again, it will crash.

Another side effect with my patch: when server disconnected it, it would hang. IMHO this is serious and unacceptable.

By the way, no matter whether patched, cli_wallet always hangs when got external SIGINT or SIGTERM signal (kill -SIGINT [pid] or kill -SIGTERM [pid]).

@OpenLedgerApp
Copy link
Contributor

OpenLedgerApp commented Apr 1, 2019

@ryanRfox please assign this task to OpenLedger

@abitmore
Copy link
Member Author

abitmore commented Apr 1, 2019

I'm working on this.

@OpenLedgerApp
Copy link
Contributor

@abitmore Ok. NP! Please in the future - ask @ryanRfox to change status "In development"
image
@ryanRfox it is second case when we try to get the issue and core team says "we are working on it". Please don't forget to update statuses. Thanks!

@clockworkgr
Copy link
Member

@clockworkgr you mean #177? That issue was closed but not fixed.

This issue is different. I've made a patch locally, will push soon.

thought it was fixed in: #1104

But probably misunderstood

@ryanRfox
Copy link
Contributor

ryanRfox commented Apr 2, 2019

@OpenLedgerApp Typically we use the Assignees parameter to indicate who is working on it (sometimes we forget to add this, or are slow to assign for others).

image

By default the the Issue goes into the To do bucket. Please check the Comments within each Issue to determine if anyone is actively working on/discussing the Issue. Sometimes we discuss within To do prior to moving it forward into In development.

image

Please select Issues from To do lacking an Assignee and where discussion indicates no current action.

@OpenLedgerApp
Copy link
Contributor

@ryanRfox Thanks for the clarifications! We will do so.

@abitmore abitmore added 1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 2d Developing Status indicating currently designing and developing a solution 3d Bug Classification indicating the existing implementation does not match the intention of the design labels May 9, 2019
@abitmore abitmore added 4b Normal Priority Priority indicating the moderate impact to system/user -OR- existing workaround is costly to perform 6 CLI Impact flag identifying the command line interface (CLI) wallet application 9c Large Effort estimation indicating TBD labels May 9, 2019
abitmore added a commit that referenced this issue May 28, 2019
@abitmore
Copy link
Member Author

Closed by #1695.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 2d Developing Status indicating currently designing and developing a solution 3d Bug Classification indicating the existing implementation does not match the intention of the design 4b Normal Priority Priority indicating the moderate impact to system/user -OR- existing workaround is costly to perform 6 CLI Impact flag identifying the command line interface (CLI) wallet application 9c Large Effort estimation indicating TBD
Projects
None yet
Development

No branches or pull requests

5 participants