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

Test failure: asan block_unit_test_eos-vm-oc #737

Closed
heifner opened this issue Sep 10, 2024 · 2 comments · Fixed by #738, #744 or #755
Closed

Test failure: asan block_unit_test_eos-vm-oc #737

heifner opened this issue Sep 10, 2024 · 2 comments · Fixed by #738, #744 or #755
Assignees
Labels
👍 lgtm OCI Work exclusive to OCI team test-instability tag issues for flaky tests, high priority to address
Milestone

Comments

@heifner
Copy link
Member

heifner commented Sep 10, 2024

This is on branch verify-qc-thread-pool, but looks like an issue with a few of our tests. We move a block, but still use the old blocks QC that has been moved from.

Only an issue for tests.

Random number generator seeded to 1725981648
=================================================================
==24968==ERROR: AddressSanitizer: stack-use-after-return on address 0x782fa990f020 at pc 0x56b7dec8b9d4 bp 0x782fab1fee70 sp 0x782fab1fee68
READ of size 4 at 0x782fa990f020 thread T36
    #0 0x56b7dec8b9d3 in eosio::chain::controller_impl::verify_qc(std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_header_state const&, eosio::chain::qc_t const&) /__w/spring/spring/libraries/chain/controller.cpp:4081:68
    #1 0x56b7ded290dc in eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'()::operator()() const /__w/spring/spring/libraries/chain/controller.cpp:4101:16
    #2 0x56b7ded28cfe in eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>> std::__invoke_impl<void, eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'()&>(std::__invoke_other, eosio::chain::block_state&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61:14
    #3 0x56b7ded28cfe in std::enable_if<is_invocable_r_v<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>, eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>>::type std::__invoke_r<void, eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'()&>(eosio::chain::block_state&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:111:2
    #4 0x56b7ded28cfe in std::__future_base::_Task_state<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'(), std::allocator<int>, void ()>::_M_run()::'lambda'()::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/future:1468:13
    #5 0x56b7ded28cfe in std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'(), std::allocator<int>, void ()>::_M_run()::'lambda'(), void>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/future:1409:6
    #6 0x56b7ded28bad in eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>> std::__invoke_impl<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'(), std::allocator<int>, void ()>::_M_run()::'lambda'(), void>&>(std::__invoke_other, eosio::chain::block_state&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61:14
    #7 0x56b7ded28bad in std::enable_if<is_invocable_r_v<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>, eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>>::type std::__invoke_r<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'(), std::allocator<int>, void ()>::_M_run()::'lambda'(), void>&>(eosio::chain::block_state&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:114:9
    #8 0x56b7ded28bad in std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'(), std::allocator<int>, void ()>::_M_run()::'lambda'(), void>>::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:290:9
    #9 0x56b7dca14abe in std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:590:9
    #10 0x56b7dca14abe in std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/future:571:27
    #11 0x7831c3148ee7  (/lib/x86_64-linux-gnu/libc.so.6+0x99ee7) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
    #12 0x56b7dca1443e in __gthread_once(int*, void (*)()) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/x86_64-linux-gnu/c++/11/bits/gthr-default.h:700:12
    #13 0x56b7dca1443e in void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/mutex:783:21
    #14 0x56b7dca1443e in std::__future_base::_State_baseV2::_M_set_result(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>, bool) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/future:411:2
    #15 0x56b7ded28411 in std::__future_base::_Task_state<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'(), std::allocator<int>, void ()>::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/future:1471:8
    #16 0x56b7ded2b5ee in std::packaged_task<void ()>::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/future:1604:12
    #17 0x56b7ded2b5ee in auto eosio::chain::post_async_task<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'()>(boost::asio::io_context&, eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&&)::'lambda'()::operator()() const /__w/spring/spring/libraries/chain/include/eosio/chain/thread_utils.hpp:292:42
    #18 0x56b7ded2b5ee in boost::asio::detail::binder0<auto eosio::chain::post_async_task<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'()>(boost::asio::io_context&, eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&&)::'lambda'()>::operator()() /__w/spring/spring/libraries/boost/libs/asio/include/boost/asio/detail/bind_handler.hpp:60:5
    #19 0x56b7ded2b5ee in void boost::asio::asio_handler_invoke<boost::asio::detail::binder0<auto eosio::chain::post_async_task<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'()>(boost::asio::io_context&, eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&&)::'lambda'()>>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, ...) /__w/spring/spring/libraries/boost/libs/asio/include/boost/asio/handler_invoke_hook.hpp:88:3
    #20 0x56b7ded2b5ee in void boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder0<auto eosio::chain::post_async_task<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'()>(boost::asio::io_context&, eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&&)::'lambda'()>, auto eosio::chain::post_async_task<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'()>(boost::asio::io_context&, eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&&)::'lambda'()>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, eosio::chain::block_state&) /__w/spring/spring/libraries/boost/libs/asio/include/boost/asio/detail/handler_invoke_helpers.hpp:54:3
    #21 0x56b7ded2b5ee in void boost::asio::detail::asio_handler_invoke<boost::asio::detail::binder0<auto eosio::chain::post_async_task<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'()>(boost::asio::io_context&, eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&&)::'lambda'()>, auto eosio::chain::post_async_task<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'()>(boost::asio::io_context&, eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&&)::'lambda'()>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, boost::asio::detail::binder0<eosio::chain::block_state>*) /__w/spring/spring/libraries/boost/libs/asio/include/boost/asio/detail/bind_handler.hpp:111:3
    #22 0x56b7ded2b5ee in void boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder0<auto eosio::chain::post_async_task<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'()>(boost::asio::io_context&, eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&&)::'lambda'()>, boost::asio::detail::binder0<auto eosio::chain::post_async_task<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'()>(boost::asio::io_context&, eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&&)::'lambda'()>>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, eosio::chain::block_state&) /__w/spring/spring/libraries/boost/libs/asio/include/boost/asio/detail/handler_invoke_helpers.hpp:54:3
    #23 0x56b7ded2b5ee in boost::asio::detail::executor_op<boost::asio::detail::binder0<auto eosio::chain::post_async_task<eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&)::'lambda'()>(boost::asio::io_context&, eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&&)::'lambda'()>, std::allocator<void>, boost::asio::detail::scheduler_operation>::do_complete(void*, boost::asio::detail::scheduler_operation*, boost::system::error_code const&, unsigned long) /__w/spring/spring/libraries/boost/libs/asio/include/boost/asio/detail/executor_op.hpp:71:7
    #24 0x56b7dd1ab7cd in boost::asio::detail::scheduler_operation::complete(void*, boost::system::error_code const&, unsigned long) /__w/spring/spring/libraries/boost/libs/asio/include/boost/asio/detail/scheduler_operation.hpp:40:5
    #25 0x56b7dd1ab7cd in boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&) /__w/spring/spring/libraries/boost/libs/asio/include/boost/asio/detail/impl/scheduler.ipp:493:12
    #26 0x56b7dd1aa891 in boost::asio::detail::scheduler::run(boost::system::error_code&) /__w/spring/spring/libraries/boost/libs/asio/include/boost/asio/detail/impl/scheduler.ipp:210:10
    #27 0x56b7dd2be835 in boost::asio::io_context::run() /__w/spring/spring/libraries/boost/libs/asio/include/boost/asio/impl/io_context.ipp:64:24
    #28 0x56b7de75ffb7 in eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>::run_thread(unsigned long, std::function<void (fc::exception const&)> const&, std::function<void ()> const&, std::promise<void>&, std::atomic<unsigned int>&, std::__exception_ptr::exception_ptr&, std::mutex&) /__w/spring/spring/libraries/chain/include/eosio/chain/thread_utils.hpp:202:18
    #29 0x56b7de76306f in void std::__invoke_impl<void, void (eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>::*)(unsigned long, std::function<void (fc::exception const&)> const&, std::function<void ()> const&, std::promise<void>&, std::atomic<unsigned int>&, std::__exception_ptr::exception_ptr&, std::mutex&), eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>*, unsigned long, std::function<void (fc::exception const&)>, std::function<void ()>, std::reference_wrapper<std::promise<void>>, std::reference_wrapper<std::atomic<unsigned int>>, std::reference_wrapper<std::__exception_ptr::exception_ptr>, std::reference_wrapper<std::mutex>>(std::__invoke_memfun_deref, void (eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>::*&&)(unsigned long, std::function<void (fc::exception const&)> const&, std::function<void ()> const&, std::promise<void>&, std::atomic<unsigned int>&, std::__exception_ptr::exception_ptr&, std::mutex&), eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>*&&, unsigned long&&, std::function<void (fc::exception const&)>&&, std::function<void ()>&&, std::reference_wrapper<std::promise<void>>&&, std::reference_wrapper<std::atomic<unsigned int>>&&, std::reference_wrapper<std::__exception_ptr::exception_ptr>&&, std::reference_wrapper<std::mutex>&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:74:14
    #30 0x56b7de76306f in std::__invoke_result<void (eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>::*)(unsigned long, std::function<void (fc::exception const&)> const&, std::function<void ()> const&, std::promise<void>&, std::atomic<unsigned int>&, std::__exception_ptr::exception_ptr&, std::mutex&), eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>*, unsigned long, std::function<void (fc::exception const&)>, std::function<void ()>, std::reference_wrapper<std::promise<void>>, std::reference_wrapper<std::atomic<unsigned int>>, std::reference_wrapper<std::__exception_ptr::exception_ptr>, std::reference_wrapper<std::mutex>>::type std::__invoke<void (eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>::*)(unsigned long, std::function<void (fc::exception const&)> const&, std::function<void ()> const&, std::promise<void>&, std::atomic<unsigned int>&, std::__exception_ptr::exception_ptr&, std::mutex&), eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>*, unsigned long, std::function<void (fc::exception const&)>, std::function<void ()>, std::reference_wrapper<std::promise<void>>, std::reference_wrapper<std::atomic<unsigned int>>, std::reference_wrapper<std::__exception_ptr::exception_ptr>, std::reference_wrapper<std::mutex>>(void (eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>::*&&)(unsigned long, std::function<void (fc::exception const&)> const&, std::function<void ()> const&, std::promise<void>&, std::atomic<unsigned int>&, std::__exception_ptr::exception_ptr&, std::mutex&), eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>*&&, unsigned long&&, std::function<void (fc::exception const&)>&&, std::function<void ()>&&, std::reference_wrapper<std::promise<void>>&&, std::reference_wrapper<std::atomic<unsigned int>>&&, std::reference_wrapper<std::__exception_ptr::exception_ptr>&&, std::reference_wrapper<std::mutex>&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:96:14
    #31 0x56b7de76306f in void std::thread::_Invoker<std::tuple<void (eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>::*)(unsigned long, std::function<void (fc::exception const&)> const&, std::function<void ()> const&, std::promise<void>&, std::atomic<unsigned int>&, std::__exception_ptr::exception_ptr&, std::mutex&), eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>*, unsigned long, std::function<void (fc::exception const&)>, std::function<void ()>, std::reference_wrapper<std::promise<void>>, std::reference_wrapper<std::atomic<unsigned int>>, std::reference_wrapper<std::__exception_ptr::exception_ptr>, std::reference_wrapper<std::mutex>>>::_M_invoke<0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_thread.h:259:13
    #32 0x56b7de76306f in std::thread::_Invoker<std::tuple<void (eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>::*)(unsigned long, std::function<void (fc::exception const&)> const&, std::function<void ()> const&, std::promise<void>&, std::atomic<unsigned int>&, std::__exception_ptr::exception_ptr&, std::mutex&), eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>*, unsigned long, std::function<void (fc::exception const&)>, std::function<void ()>, std::reference_wrapper<std::promise<void>>, std::reference_wrapper<std::atomic<unsigned int>>, std::reference_wrapper<std::__exception_ptr::exception_ptr>, std::reference_wrapper<std::mutex>>>::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_thread.h:266:11
    #33 0x56b7de76306f in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>::*)(unsigned long, std::function<void (fc::exception const&)> const&, std::function<void ()> const&, std::promise<void>&, std::atomic<unsigned int>&, std::__exception_ptr::exception_ptr&, std::mutex&), eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>*, unsigned long, std::function<void (fc::exception const&)>, std::function<void ()>, std::reference_wrapper<std::promise<void>>, std::reference_wrapper<std::atomic<unsigned int>>, std::reference_wrapper<std::__exception_ptr::exception_ptr>, std::reference_wrapper<std::mutex>>>>::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_thread.h:211:13
    #34 0x7831c33ea252  (/lib/x86_64-linux-gnu/libstdc++.so.6+0xdc252) (BuildId: e37fe1a879783838de78cbc8c80621fa685d58a2)
    #35 0x56b7dbfd9658 in asan_thread_start(void*) asan_interceptors.cpp.o
    #36 0x7831c3143ac2  (/lib/x86_64-linux-gnu/libc.so.6+0x94ac2) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
    #37 0x7831c31d584f  (/lib/x86_64-linux-gnu/libc.so.6+0x12684f) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)

Address 0x782fa990f020 is located in stack of thread T36 at offset 32 in frame
    #0 0x56b7ded2191f in eosio::chain::block_handle eosio::chain::controller_impl::create_block_state_i<eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>, eosio::chain::block_state>(eosio::chain::fork_database_t<std::shared_ptr<eosio::chain::block_state>>&, fc::sha256 const&, std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_state const&) /__w/spring/spring/libraries/chain/controller.cpp:4091

  This frame has 22 object(s):
    [32, 792) 'qc' (line 4095) <== Memory access at offset 32 is inside this variable
    [928, 944) 'verify_qc_future' (line 4096)
    [960, 992) 'trx_mroot' (line 4110)
    [1024, 1040) 'ref.tmp15' (line 4111)
    [1056, 1072) 'agg.tmp'
    [1088, 1120) 'agg.tmp20'
    [1152, 1168) 'agg.tmp24'
    [1184, 1192) 'ref.tmp25' (line 4111)
    [1216, 1224) 'ref.tmp26' (line 4111)
    [1248, 1256) 'ref.tmp27' (line 4111)
    [1280, 1312) 'agg.tmp30'
    [1344, 1376) 'agg.tmp38'
    [1408, 1424) 'bsp' (line 4116)
    [1440, 1456) 'ref.tmp87' (line 4127)
    [1472, 1488) 'agg.tmp88'
    [1504, 1536) 'agg.tmp94'
    [[156](https://github.com/AntelopeIO/spring/actions/runs/10795299501/job/29942467673?pr=736#step:5:157)8, 1584) 'agg.tmp98'
    [1600, 1608) 'ref.tmp99' (line 4127)
    [1632, 1640) 'ref.tmp100' (line 4127)
    [1664, 1672) 'ref.tmp101' (line 4127)
    [1696, 1728) 'agg.tmp104'
    [1760, 1792) 'agg.tmp110'
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
Thread T36 created by T0 here:
    #0 0x56b7dbfc[159](https://github.com/AntelopeIO/spring/actions/runs/10795299501/job/29942467673?pr=736#step:5:160)1 in pthread_create (/__w/spring/spring/build/unittests/unit_test+0x5a5591) (BuildId: 646238d1c2c890a1f8487319b3e674274e6209a3)
    #1 0x7831c33ea328 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State>>, void (*)()) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xdc328) (BuildId: e37fe1a879783838de78cbc8c80621fa685d58a2)
    #2 0x56b7de755c70 in eosio::chain::named_thread_pool<eosio::chain::controller_impl::chain>::start(unsigned long, std::function<void (fc::exception const&)>, std::function<void ()>) /__w/spring/spring/libraries/chain/include/eosio/chain/thread_utils.hpp:144:43
    #3 0x56b7de72f220 in eosio::chain::controller_impl::controller_impl(eosio::chain::controller::config const&, eosio::chain::controller&, eosio::chain::protocol_feature_set&&, eosio::chain::chain_id_type const&) /__w/spring/spring/libraries/chain/controller.cpp:1233:19
    #4 0x56b7de70a77a in eosio::chain::controller::controller(eosio::chain::controller::config const&, eosio::chain::protocol_feature_set&&, eosio::chain::chain_id_type const&) /__w/spring/spring/libraries/chain/controller.cpp:5076:10
    #5 0x56b7de35435e in eosio::testing::base_tester::open(eosio::chain::protocol_feature_set&&, std::optional<eosio::chain::chain_id_type>, std::function<void ()> const&) /__w/spring/spring/libraries/testing/tester.cpp:370:26
    #6 0x56b7de3510a5 in eosio::testing::base_tester::open(eosio::chain::protocol_feature_set&&, eosio::chain::genesis_state const&, eosio::testing::call_startup_t) /__w/spring/spring/libraries/testing/tester.cpp:430:10
    #7 0x56b7de34ebb5 in eosio::testing::base_tester::open(eosio::chain::genesis_state const&, eosio::testing::call_startup_t) /__w/spring/spring/libraries/testing/tester.cpp:319:7
    #8 0x56b7de34e8ff in eosio::testing::base_tester::init(eosio::testing::setup_policy, eosio::chain::db_read_mode, std::optional<unsigned int>) /__w/spring/spring/libraries/testing/tester.cpp:193:7
    #9 0x56b7dca1f516 in eosio::testing::tester::tester(eosio::testing::setup_policy, eosio::chain::db_read_mode, std::optional<unsigned int>) /__w/spring/spring/libraries/testing/include/eosio/testing/tester.hpp:613:10
    #10 0x56b7dca1f516 in block_tests::block_with_invalid_tx_mroot_test<eosio::testing::tester>::test_method() /__w/spring/spring/unittests/block_tests.cpp:98:6
    #11 0x56b7dca1db05 in void block_tests::block_with_invalid_tx_mroot_test_invoker::run<eosio::testing::tester>(boost::type<eosio::testing::tester>*) /__w/spring/spring/unittests/block_tests.cpp:66:1
    #12 0x56b7dd100dce in boost::function0<void>::operator()() const /__w/spring/spring/libraries/boost/libs/function/include/boost/function/function_template.hpp:771:14
    #13 0x56b7dd100dce in boost::detail::forward::operator()() /__w/spring/spring/libraries/boost/libs/test/include/boost/test/impl/execution_monitor.ipp:1395:32
    #14 0x56b7dd100dce in boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) /__w/spring/spring/libraries/boost/libs/function/include/boost/function/function_template.hpp:137:18
    #15 0x56b7dd108c67 in boost::function0<int>::operator()() const /__w/spring/spring/libraries/boost/libs/function/include/boost/function/function_template.hpp:771:14
    #16 0x56b7dd108c67 in boost::detail::translator_holder<fc::exception, void (*)(fc::exception const&)>::operator()(boost::function<int ()> const&) /__w/spring/spring/libraries/boost/libs/test/include/boost/test/execution_monitor.hpp:448:46
    #17 0x56b7dd0502bc in int boost::detail::do_invoke<boost::shared_ptr<boost::detail::translator_holder_base>, boost::function<int ()>>(boost::shared_ptr<boost::detail::translator_holder_base> const&, boost::function<int ()> const&) /__w/spring/spring/libraries/boost/libs/test/include/boost/test/impl/execution_monitor.ipp:308:17
    #18 0x56b7dd0502bc in boost::execution_monitor::catch_signals(boost::function<int ()> const&) /__w/spring/spring/libraries/boost/libs/test/include/boost/test/impl/execution_monitor.ipp:910:16
    #19 0x56b7dd0508cc in boost::execution_monitor::execute(boost::function<int ()> const&) /__w/spring/spring/libraries/boost/libs/test/include/boost/test/impl/execution_monitor.ipp:1308:16
    #20 0x56b7dd04b68b in boost::execution_monitor::vexecute(boost::function<void ()> const&) /__w/spring/spring/libraries/boost/libs/test/include/boost/test/impl/execution_monitor.ipp:1404:5
    #21 0x56b7dd04b68b in boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned long) /__w/spring/spring/libraries/boost/libs/test/include/boost/test/impl/unit_test_monitor.ipp:49:9
    #22 0x56b7dd096085 in boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /__w/spring/spring/libraries/boost/libs/test/include/boost/test/impl/framework.ipp:815:44
    #23 0x56b7dd0962d6 in boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /__w/spring/spring/libraries/boost/libs/test/include/boost/test/impl/framework.ipp:740:54
    #24 0x56b7dd0962d6 in boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /__w/spring/spring/libraries/boost/libs/test/include/boost/test/impl/framework.ipp:740:54
    #25 0x56b7dd04a0f2 in boost::unit_test::framework::run(unsigned long, bool) /__w/spring/spring/libraries/boost/libs/test/include/boost/test/impl/framework.ipp:1722:29
    #26 0x56b7dd072081 in boost::unit_test::unit_test_main(boost::unit_test::test_suite* (*)(int, char**), int, char**) /__w/spring/spring/libraries/boost/libs/test/include/boost/test/impl/unit_test_main.ipp:250:9
    #27 0x56b7df2c50d4 in __wrap_main /__w/spring/spring/libraries/chain/webassembly/runtimes/eos-vm-oc/compile_monitor.cpp:309:11
    #28 0x7831c30d8d8f  (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)

SUMMARY: AddressSanitizer: stack-use-after-return /__w/spring/spring/libraries/chain/controller.cpp:4081:68 in eosio::chain::controller_impl::verify_qc(std::shared_ptr<eosio::chain::signed_block> const&, eosio::chain::block_header_state const&, eosio::chain::qc_t const&)
Shadow bytes around the buggy address:
  0x782fa990ed80: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x782fa990ee00: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x782fa990ee80: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x782fa990ef00: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x782fa990ef80: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
=>0x782fa990f000: f5 f5 f5 f5[f5]f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x782fa990f080: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x782fa990f100: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x782fa990f180: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x782fa990f200: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x782fa990f280: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==24968==ABORTING
@heifner heifner added this to the Spring v1.0.1 milestone Sep 10, 2024
@heifner heifner self-assigned this Sep 10, 2024
@heifner heifner added the OCI Work exclusive to OCI team label Sep 10, 2024
@spoonincode
Copy link
Member

the failure on eos-vm is a little more descriptive,
https://github.com/AntelopeIO/spring/actions/runs/10795299501/job/29942467673?pr=736#step:5:157

@heifner
Copy link
Member Author

heifner commented Sep 10, 2024

the failure on eos-vm is a little more descriptive, https://github.com/AntelopeIO/spring/actions/runs/10795299501/job/29942467673?pr=736#step:5:157

Thanks. That is better, wish I had seen that one first. I'll update the issue description with that one.

@heifner heifner added the test-instability tag issues for flaky tests, high priority to address label Sep 10, 2024
heifner added a commit that referenced this issue Sep 10, 2024
… still might be in use. For example if still in the forkdb. Would have preferred to `delete` the move constructor/operator= but unfortunately those are needed for our unused http push_block.
@heifner heifner linked a pull request Sep 10, 2024 that will close this issue
@arhag arhag added 👍 lgtm and removed triage labels Sep 10, 2024
heifner added a commit that referenced this issue Sep 11, 2024
@heifner heifner linked a pull request Sep 11, 2024 that will close this issue
heifner added a commit that referenced this issue Sep 11, 2024
[1.0.1] Should never move from a signed_block in a shared_ptr
heifner added a commit that referenced this issue Sep 12, 2024
heifner added a commit that referenced this issue Sep 12, 2024
[1.0.1 -> main] Should never move from a signed_block in a shared_ptr
heifner added a commit that referenced this issue Sep 12, 2024
heifner added a commit that referenced this issue Sep 12, 2024
heifner added a commit that referenced this issue Sep 12, 2024
heifner added a commit that referenced this issue Sep 12, 2024
heifner added a commit that referenced this issue Sep 12, 2024
[1.0.1 -> main] Make signed_block_ptr const
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👍 lgtm OCI Work exclusive to OCI team test-instability tag issues for flaky tests, high priority to address
Projects
Archived in project
4 participants