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

Market history crash #185

Closed
vikramrajkumar opened this issue Jan 18, 2017 · 6 comments
Closed

Market history crash #185

vikramrajkumar opened this issue Jan 18, 2017 · 6 comments

Comments

@vikramrajkumar
Copy link
Contributor

From @theoreticalbts on February 29, 2016 15:40

@valzav reports the following crash:

#0  0x0000000000c0f723 in void boost::multi_index::detail::hashed_index_node_alg<boost::multi_index::detail::hashed_index_node_impl<std::allocator<char> >, boost::multi_index::detail::hashed_unique_tag>::unlink<boost::multi_index::detail::default_assigner>(boost::multi_index::detail::hashed_index_node_impl<std::allocator<char> >*, boost::multi_index::detail::default_assigner&) ()
#1  0x0000000000c16b6d in boost::multi_index::detail::hashed_index<boost::multi_index::member<graphene::db::object, graphene::db::object_id_type, &graphene::db::object::id>, boost::hash<graphene::db::object_id_type>, std::equal_to<graphene::db::object_id_type>, boost::multi_index::detail::nth_layer<1, graphene::market_history::order_history_object, boost::multi_index::indexed_by<boost::multi_index::hashed_unique<boost::multi_index::tag<graphene::chain::by_id, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::member<graphene::db::object, graphene::db::object_id_type, &graphene::db::object::id>, mpl_::na, mpl_::na>, boost::multi_index::ordered_unique<boost::multi_index::tag<graphene::market_history::by_key, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::member<graphene::market_history::order_history_object, graphene::market_history::history_key, &graphene::market_history::order_history_object::key>, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<graphene::market_history::order_history_object> >, boost::mpl::v_item<graphene::chain::by_id, boost::mpl::vector0<mpl_::na>, 0>, boost::multi_index::detail::hashed_unique_tag>::modify_(boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::index_node_base<graphene::market_history::order_history_object, std::allocator<graphene::market_history::order_history_object> > >, boost::multi_index::detail::hashed_unique_tag>*) ()
#2  0x0000000000c16ce9 in graphene::chain::generic_index<graphene::market_history::order_history_object, boost::multi_index::multi_index_container<graphene::market_history::order_history_object, boost::multi_index::indexed_by<boost::multi_index::hashed_unique<boost::multi_index::tag<graphene::chain::by_id, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::member<graphene::db::object, graphene::db::object_id_type, &graphene::db::object::id>, mpl_::na, mpl_::na>, boost::multi_index::ordered_unique<boost::multi_index::tag<graphene::market_history::by_key, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::member<graphene::market_history::order_history_object, graphene::market_history::history_key, &graphene::market_history::order_history_object::key>, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<graphene::market_history::order_history_object> > >::modify(graphene::db::object const&, std::function<void (graphene::db::object&)> const&) ()
#3  0x0000000000c16f4e in graphene::db::primary_index<graphene::chain::generic_index<graphene::market_history::order_history_object, boost::multi_index::multi_index_container<graphene::market_history::order_history_object, boost::multi_index::indexed_by<boost::multi_index::hashed_unique<boost::multi_index::tag<graphene::chain::by_id, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::member<graphene::db::object, graphene::db::object_id_type, &graphene::db::object::id>, mpl_::na, mpl_::na>, boost::multi_index::ordered_unique<boost::multi_index::tag<graphene::market_history::by_key, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::member<graphene::market_history::order_history_object, graphene::market_history::history_key, &graphene::market_history::order_history_object::key>, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<graphene::market_history::order_history_object> > > >::modify(graphene::db::object const&, std::function<void (graphene::db::object&)> const&) ()
#4  0x0000000000c5a45e in graphene::chain::database::perform_chain_maintenance(graphene::chain::signed_block const&, graphene::chain::global_property_object const&) ()
#5  0x0000000000c62a91 in graphene::chain::database::_apply_block(graphene::chain::signed_block const&) ()
#6  0x0000000000c63542 in graphene::chain::database::apply_block(graphene::chain::signed_block const&, unsigned int) ()
#7  0x0000000000c63a02 in graphene::chain::database::_push_block(graphene::chain::signed_block const&) ()
#8  0x0000000000c65743 in graphene::chain::database::push_block(graphene::chain::signed_block const&, unsigned int) ()
#9  0x0000000000a95266 in graphene::app::detail::application_impl::handle_block(graphene::net::block_message const&, bool, std::vector<fc::ripemd160, std::allocator<fc::ripemd160> >&) ()
#10 0x0000000000fad057 in fc::detail::functor_run<graphene::net::detail::statistics_gathering_node_delegate_wrapper::handle_block(graphene::net::block_message const&, bool, std::vector<fc::ripemd160, std::allocator<fc::ripemd160> >&)::{lambda()#1}>::run(void*, fc::detail::functor_run<graphene::net::detail::statistics_gathering_node_delegate_wrapper::handle_block(graphene::net::block_message const&, bool, std::vector<fc::ripemd160, std::allocator<fc::ripemd160> >&)::{lambda()#1}>) ()
#11 0x0000000000e5faa5 in fc::task_base::run_impl() ()
#12 0x0000000000e5d69f in fc::thread_d::process_tasks() ()
#13 0x0000000000e5d901 in fc::thread_d::start_process_tasks(long) ()
#14 0x00000000010d3d21 in make_fcontext ()

This does not happen on reindex.

A hashed_unique index needs to be replaced with ordered_unique in market_history_plugin.hpp, it might fix the problem.

Copied from original issue: cryptonomex/graphene#602

@oxarbitrage
Copy link
Member

anyone have idea on how to reproduce ?

@abitmore
Copy link
Member

There was a commit: cryptonomex/graphene@18ff76b made 2 year ago, which meant to fix this issue but has never been merged. Without new report, I'm not sure if it's still needed. @pmconrad thoughts?

@abitmore
Copy link
Member

Other commits in that branch (https://github.com/cryptonomex/graphene/compare/604-bugfix-p2p-close) are perhaps useful as well.

abitmore pushed a commit to abitmore/bitshares-core that referenced this issue Nov 13, 2017
@pmconrad
Copy link
Contributor

IMO close this - we'd have heard about it if this was a persisting problem.

@theoreticalbts did you have a specific reason to propose replacing hashed_unique or was this more of general suspicion?

@abitmore
Copy link
Member

@pmconrad FYI I've cherry-picked the fix to my develop branch and added it to the PR #478. I think it won't harm since I didn't find anywhere else in the code uses hashed_unique for object_id_type fields. object_id_type is actually uint64_t and has auto-increment behavior, so naturally fits ordered_unique index type.

@abitmore
Copy link
Member

Fix merged. Closing.

@abitmore abitmore added this to the Next Non-Consensus-Changing Release - 201712 milestone Nov 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants