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

Crash with double-free, on response.end() in another thread, on v1.1, v.1.2, and master #843

Open
TheQue42 opened this issue Jun 24, 2024 · 6 comments
Labels
bug Something isn't working discussion The viability / implementation of the issue is up for debate feature Code based project improvement

Comments

@TheQue42
Copy link

Hi,

I'm trying to move from v.1.0+5, but it seems that my use of asynchronous responses will always crash. I know that async is still "in development", but from trying to follow: #258, it doesn't feel like this kind of crash is what should be happening.

In my ROUTE's, I am rarely able to return a valid HTTP response directly (but in the cases I can, no crashes at all).

If I instead, save a reference (not std::move) to the crow::response, and after my 3pp asynchronous API returns via another thread, I do:

  • set response.code,
  • set response.body,
  • finish with response.end()

It will crash every time. According to traces my m_response.is_alive() == true, but then it crashes. Below trace is when compiled with -fsanitize=address, but I just used that to get more detailed crash info.

10:57:32.934 - NW_LOG[Ecmi/Obnoxious] - WebServer::returnCrowResponse()                   :: { rspCode=409, body="Conference already exists", m_activeRequests.size()=1 }
10:57:32.934 - NW_LOG[Ecmi/Info    ] - EcmiServer                                        :Response: 0x5220000ff110 /api/v1/conferences 409 0: {  }
=================================================================
==9974==ERROR: AddressSanitizer: attempting double-free on 0x502000010450 in thread T3:
    #0 0x7f88580fd0d8 in operator delete(void*, unsigned long) (/lib64/libasan.so.8+0xfd0d8) (BuildId: 1827a4c72065a9f25ba519b25166029eebbf519f)
    #1 0x814c0b in std::_Function_base::_Base_manager<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_destroy(std::_Any_data&, std::integral_constant<bool, false>) /usr/include/c++/14/bits/std_function.h:175
    #2 0x81edff in std::_Function_base::_Base_manager<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) /usr/include/c++/14/bits/std_function.h:203
    #3 0x81ee6c in std::_Function_handler<void (), crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) /usr/include/c++/14/bits/std_function.h:282
    #4 0x7f61e5 in std::function<void ()>::operator=(decltype(nullptr)) /usr/include/c++/14/bits/std_function.h:505
    #5 0x83176c in crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::prepare_buffers() 3pp/CrowCpp/include/crow/http_connection.h:279
    #6 0x834bb9 in crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::complete_request() 3pp/CrowCpp/include/crow/http_connection.h:264
    #7 0x836790 in crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}::operator()() const 3pp/CrowCpp/include/crow/http_connection.h:188
    #8 0x836790 in void std::__invoke_impl<void, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}&>(std::__invoke_other, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}&) /usr/include/c++/14/bits/invoke.h:61
    #9 0x836790 in std::enable_if<is_invocable_r_v<void, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}&>, void>::type std::__invoke_r<void, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}&>(crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}&) /usr/include/c++/14/bits/invoke.h:111
    #10 0x836790 in std::_Function_handler<void (), crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_invoke(std::_Any_data const&) /usr/include/c++/14/bits/std_function.h:290
    #11 0x7636eb in std::function<void ()>::operator()() const /usr/include/c++/14/bits/std_function.h:591
    #12 0x765f89 in crow::response::end() 3pp/CrowCpp/include/crow/http_response.h:250
    #13 0x766a91 in WebServer::returnCrowResponse(crow::response&, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) include/ecmi/WebServer.hpp:133
    #14 0x75702d in ImmiHandler::gotImmiRsp(std::shared_ptr<ApiResponse>&) src/ecmi/ImmiHandler.cpp:244
    #15 0x87691f in RttMixer::responseQueueLoop() src/immi/RttMixer.cpp:675
    #16 0x898018 in void std::__invoke_impl<void, void (RttMixer::*)(), RttMixer*>(std::__invoke_memfun_deref, void (RttMixer::*&&)(), RttMixer*&&) /usr/include/c++/14/bits/invoke.h:74
    #17 0x898060 in std::__invoke_result<void (RttMixer::*)(), RttMixer*>::type std::__invoke<void (RttMixer::*)(), RttMixer*>(void (RttMixer::*&&)(), RttMixer*&&) /usr/include/c++/14/bits/invoke.h:96
    #18 0x898060 in void std::thread::_Invoker<std::tuple<void (RttMixer::*)(), RttMixer*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/include/c++/14/bits/std_thread.h:292
    #19 0x898060 in std::thread::_Invoker<std::tuple<void (RttMixer::*)(), RttMixer*> >::operator()() /usr/include/c++/14/bits/std_thread.h:299
    #20 0x898060 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (RttMixer::*)(), RttMixer*> > >::_M_run() /usr/include/c++/14/bits/std_thread.h:244
    #21 0x7f88576ec3c3 in execute_native_thread_routine ../../../../../libstdc++-v3/src/c++11/thread.cc:104
    #22 0x7f8858062975  (/lib64/libasan.so.8+0x62975) (BuildId: 1827a4c72065a9f25ba519b25166029eebbf519f)
    #23 0x7f8857292ba1 in start_thread /usr/src/debug/glibc-2.39/nptl/pthread_create.c:447
    #24 0x7f885731400b in clone3 ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

0x502000010450 is located 0 bytes inside of 16-byte region [0x502000010450,0x502000010460)
freed by thread T3 here:
    #0 0x7f88580fd0d8 in operator delete(void*, unsigned long) (/lib64/libasan.so.8+0xfd0d8) (BuildId: 1827a4c72065a9f25ba519b25166029eebbf519f)
    #1 0x814c0b in std::_Function_base::_Base_manager<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_destroy(std::_Any_data&, std::integral_constant<bool, false>) /usr/include/c++/14/bits/std_function.h:175
    #2 0x81edff in std::_Function_base::_Base_manager<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) /usr/include/c++/14/bits/std_function.h:203
    #3 0x81ee6c in std::_Function_handler<void (), crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) /usr/include/c++/14/bits/std_function.h:282
    #4 0x52c0d4 in std::_Function_base::~_Function_base() /usr/include/c++/14/bits/std_function.h:244
    #5 0x7bdf3a in std::function<void ()>::~function() /usr/include/c++/14/bits/std_function.h:334
    #6 0x7bdf3a in crow::response::~response() 3pp/CrowCpp/include/crow/http_response.h:33
    #7 0x83c84d in crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::~Connection() (/home/taisto/repos/rtt-focus/bin/ccm+0x83c84d) (BuildId: 6b6a44fba57f6c57286c94f68bbcc9f9d0f3a905)
    #8 0x83c8ac in std::_Sp_counted_ptr_inplace<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (/home/taisto/repos/rtt-focus/bin/ccm+0x83c8ac) (BuildId: 6b6a44fba57f6c57286c94f68bbcc9f9d0f3a905)
    #9 0x544536 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use() /usr/include/c++/14/bits/shared_ptr_base.h:175
    #10 0x54462c in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold() /usr/include/c++/14/bits/shared_ptr_base.h:199
    #11 0x5447b4 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() /usr/include/c++/14/bits/shared_ptr_base.h:353
    #12 0x814bfe in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /usr/include/c++/14/bits/shared_ptr_base.h:1069
    #13 0x814bfe in std::__shared_ptr<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /usr/include/c++/14/bits/shared_ptr_base.h:1525
    #14 0x814bfe in std::shared_ptr<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler> >::~shared_ptr() /usr/include/c++/14/bits/shared_ptr.h:175
    #15 0x814bfe in crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}::~handle() 3pp/CrowCpp/include/crow/http_connection.h:187
    #16 0x814bfe in std::_Function_base::_Base_manager<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_destroy(std::_Any_data&, std::integral_constant<bool, false>) /usr/include/c++/14/bits/std_function.h:175
    #17 0x81edff in std::_Function_base::_Base_manager<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) /usr/include/c++/14/bits/std_function.h:203
    #18 0x81ee6c in std::_Function_handler<void (), crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) /usr/include/c++/14/bits/std_function.h:282
    #19 0x7f61e5 in std::function<void ()>::operator=(decltype(nullptr)) /usr/include/c++/14/bits/std_function.h:505
    #20 0x83176c in crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::prepare_buffers() 3pp/CrowCpp/include/crow/http_connection.h:279
    #21 0x834bb9 in crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::complete_request() 3pp/CrowCpp/include/crow/http_connection.h:264
    #22 0x836790 in crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}::operator()() const 3pp/CrowCpp/include/crow/http_connection.h:188
    #23 0x836790 in void std::__invoke_impl<void, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}&>(std::__invoke_other, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}&) /usr/include/c++/14/bits/invoke.h:61
    #24 0x836790 in std::enable_if<is_invocable_r_v<void, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}&>, void>::type std::__invoke_r<void, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}&>(crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}&) /usr/include/c++/14/bits/invoke.h:111
    #25 0x836790 in std::_Function_handler<void (), crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_invoke(std::_Any_data const&) /usr/include/c++/14/bits/std_function.h:290
    #26 0x7636eb in std::function<void ()>::operator()() const /usr/include/c++/14/bits/std_function.h:591
    #27 0x765f89 in crow::response::end() 3pp/CrowCpp/include/crow/http_response.h:250
    #28 0x766a91 in WebServer::returnCrowResponse(crow::response&, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) include/ecmi/WebServer.hpp:133
    #29 0x75702d in ImmiHandler::gotImmiRsp(std::shared_ptr<ApiResponse>&) src/ecmi/ImmiHandler.cpp:244
    #30 0x87691f in RttMixer::responseQueueLoop() src/immi/RttMixer.cpp:675
    #31 0x898018 in void std::__invoke_impl<void, void (RttMixer::*)(), RttMixer*>(std::__invoke_memfun_deref, void (RttMixer::*&&)(), RttMixer*&&) /usr/include/c++/14/bits/invoke.h:74
    #32 0x898060 in std::__invoke_result<void (RttMixer::*)(), RttMixer*>::type std::__invoke<void (RttMixer::*)(), RttMixer*>(void (RttMixer::*&&)(), RttMixer*&&) /usr/include/c++/14/bits/invoke.h:96
    #33 0x898060 in void std::thread::_Invoker<std::tuple<void (RttMixer::*)(), RttMixer*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/include/c++/14/bits/std_thread.h:292
    #34 0x898060 in std::thread::_Invoker<std::tuple<void (RttMixer::*)(), RttMixer*> >::operator()() /usr/include/c++/14/bits/std_thread.h:299
    #35 0x898060 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (RttMixer::*)(), RttMixer*> > >::_M_run() /usr/include/c++/14/bits/std_thread.h:244
    #36 0x7f88576ec3c3 in execute_native_thread_routine ../../../../../libstdc++-v3/src/c++11/thread.cc:104

previously allocated by thread T7 here:
    #0 0x7f88580fc1d8 in operator new(unsigned long) (/lib64/libasan.so.8+0xfc1d8) (BuildId: 1827a4c72065a9f25ba519b25166029eebbf519f)
    #1 0x8106ce in void std::_Function_base::_Base_manager<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_create<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>(std::_Any_data&, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}&&, std::integral_constant<bool, false>) /usr/include/c++/14/bits/std_function.h:161
    #2 0x810806 in void std::_Function_base::_Base_manager<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_init_functor<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>(std::_Any_data&, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}&&) /usr/include/c++/14/bits/std_function.h:215
    #3 0x810806 in std::function<void ()>::function<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}, void>(crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}&&) /usr/include/c++/14/bits/std_function.h:449
    #4 0x810910 in std::enable_if<std::function<void ()>::_Callable<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}, std::enable_if<!std::is_same<std::remove_cv<std::remove_reference<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::type>::type, std::function<void ()> >::value, std::decay<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}> >::type::type, std::__invoke_result<std::enable_if<!std::is_same<std::remove_cv<std::remove_reference<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::type>::type, std::function<void ()> >::value, std::decay<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}> >::type::type&> >::value, std::function<void ()>&>::type std::function<void ()>::operator=<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>(crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}&&) /usr/include/c++/14/bits/std_function.h:534
    #5 0x8360ad in crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle() 3pp/CrowCpp/include/crow/http_connection.h:187
    #6 0x836746 in crow::HTTPParser<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler> >::process_message() 3pp/CrowCpp/include/crow/parser.h:162
    #7 0x836746 in crow::HTTPParser<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler> >::on_message_complete(crow::http_parser*) 3pp/CrowCpp/include/crow/parser.h:99
    #8 0x7828fb in crow::http_parser_execute(crow::http_parser*, crow::http_parser_settings const*, char const*, unsigned long) 3pp/CrowCpp/include/crow/http_parser_merged.h:1767
    #9 0x7d02fc in crow::HTTPParser<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler> >::feed(char const*, int) 3pp/CrowCpp/include/crow/parser.h:126
    #10 0x804468 in crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::{lambda(std::error_code const&, unsigned long)#1}::operator()(std::error_code const&, unsigned long) const 3pp/CrowCpp/include/crow/http_connection.h:480
    #11 0x82c740 in asio::detail::binder2<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>::operator()() /usr/include/asio/detail/bind_handler.hpp:288
    #12 0x82c740 in void asio::asio_handler_invoke<asio::detail::binder2<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long> >(asio::detail::binder2<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>&, ...) /usr/include/asio/handler_invoke_hook.hpp:87
    #13 0x82c740 in void asio_handler_invoke_helpers::invoke<asio::detail::binder2<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::{lambda(std::error_code const&, unsigned long)#1}>(asio::detail::binder2<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>&, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::{lambda(std::error_code const&, unsigned long)#1}&) /usr/include/asio/detail/handler_invoke_helpers.hpp:54
    #14 0x82c740 in void asio::detail::handler_work<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::{lambda(std::error_code const&, unsigned long)#1}, asio::any_io_executor, void>::complete<asio::detail::binder2<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long> >(asio::detail::binder2<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>&, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::{lambda(std::error_code const&, unsigned long)#1}&) /usr/include/asio/detail/handler_work.hpp:523
    #15 0x82cb7b in asio::detail::reactive_socket_recv_op<asio::mutable_buffers_1, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::{lambda(std::error_code const&, unsigned long)#1}, asio::any_io_executor>::do_complete(void*, asio::detail::scheduler_operation*, std::error_code const&, unsigned long) /usr/include/asio/detail/reactive_socket_recv_op.hpp:151
    #16 0x791b25 in asio::detail::scheduler_operation::complete(void*, std::error_code const&, unsigned long) /usr/include/asio/detail/scheduler_operation.hpp:39
    #17 0x791b25 in asio::detail::scheduler::do_run_one(asio::detail::conditionally_enabled_mutex::scoped_lock&, asio::detail::scheduler_thread_info&, std::error_code const&) /usr/include/asio/detail/impl/scheduler.ipp:492
    #18 0x793c24 in asio::detail::scheduler::run(std::error_code&) /usr/include/asio/detail/impl/scheduler.ipp:209
    #19 0x7940ee in asio::io_context::run() /usr/include/asio/impl/io_context.ipp:63
    #20 0x808aae in crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}::operator()() const 3pp/CrowCpp/include/crow/http_server.h:114
    #21 0x823b37 in void std::__invoke_impl<void, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}>(std::__invoke_other, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}&&) /usr/include/c++/14/bits/invoke.h:61
    #22 0x823b37 in std::__invoke_result<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}>::type std::__invoke<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}>(crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}&&) /usr/include/c++/14/bits/invoke.h:96
    #23 0x823b37 in void std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/14/bits/std_thread.h:292
    #24 0x823b37 in std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >::operator()() /usr/include/c++/14/bits/std_thread.h:299
    #25 0x823b37 in std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>::operator()() const /usr/include/c++/14/future:1439
    #26 0x823dc0 in std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter> 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::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>&>(std::__invoke_other, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>&) /usr/include/c++/14/bits/invoke.h:61
    #27 0x823dc0 in std::enable_if<is_invocable_r_v<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::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>&>, std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> >::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::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>&>(std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>&) /usr/include/c++/14/bits/invoke.h:114
    #28 0x823ea0 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::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void> >::_M_invoke(std::_Any_data const&) /usr/include/c++/14/bits/std_function.h:291
    #29 0x52f79f in std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const /usr/include/c++/14/bits/std_function.h:591
    #30 0x52f8b5 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/include/c++/14/future:596
    #31 0x548359 in void std::__invoke_impl<void, 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::__invoke_memfun_deref, 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/include/c++/14/bits/invoke.h:74
    #32 0x548403 in std::__invoke_result<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*>::type std::__invoke<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*>(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/include/c++/14/bits/invoke.h:96
    #33 0x548403 in 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*&&)::{lambda()#1}::operator()() const /usr/include/c++/14/mutex:909
    #34 0x54843a in std::once_flag::_Prepare_execution::_Prepare_execution<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*&&)::{lambda()#1}>(void (std::__future_base::_State_baseV2::*&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*))::{lambda()#1}::operator()() const /usr/include/c++/14/mutex:845
    #35 0x54843a in std::once_flag::_Prepare_execution::_Prepare_execution<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*&&)::{lambda()#1}>(void (std::__future_base::_State_baseV2::*&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*))::{lambda()#1}::_FUN() /usr/include/c++/14/mutex:845
    #36 0x7f8857297e7e in __pthread_once_slow /usr/src/debug/glibc-2.39/nptl/pthread_once.c:116

Thread T3 created by T0 here:
    #0 0x7f88580f3601 in pthread_create (/lib64/libasan.so.8+0xf3601) (BuildId: 1827a4c72065a9f25ba519b25166029eebbf519f)
    #1 0x7f88576ec498 in __gthread_create /usr/src/debug/gcc-14.1.0+git10173/obj-x86_64-suse-linux/x86_64-suse-linux/libstdc++-v3/include/x86_64-suse-linux/bits/gthr-default.h:676
    #2 0x7f88576ec498 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) ../../../../../libstdc++-v3/src/c++11/thread.cc:172
    #3 0x88b614 in std::thread std::jthread::_S_create<void (RttMixer::*)(), RttMixer*>(std::stop_source&, void (RttMixer::*&&)(), RttMixer*&&) /usr/include/c++/14/thread:269
    #4 0x88b614 in std::jthread::jthread<void (RttMixer::*)(), RttMixer*, void>(void (RttMixer::*&&)(), RttMixer*&&) /usr/include/c++/14/thread:157
    #5 0x86cc62 in RttMixer::init() src/immi/RttMixer.cpp:113
    #6 0x527c1b in main src/main.cpp:63
    #7 0x7f885722a1ef in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Thread T7 created by T6 here:
    #0 0x7f88580f3601 in pthread_create (/lib64/libasan.so.8+0xf3601) (BuildId: 1827a4c72065a9f25ba519b25166029eebbf519f)
    #1 0x7f88576ec498 in __gthread_create /usr/src/debug/gcc-14.1.0+git10173/obj-x86_64-suse-linux/x86_64-suse-linux/libstdc++-v3/include/x86_64-suse-linux/bits/gthr-default.h:676
    #2 0x7f88576ec498 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) ../../../../../libstdc++-v3/src/c++11/thread.cc:172
    #3 0x809748 in std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>::_Async_state_impl<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}>(crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}&&) /usr/include/c++/14/future:1763
    #4 0x809935 in void std::_Construct<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}>(std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>*, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}&&) /usr/include/c++/14/bits/stl_construct.h:119
    #5 0x809935 in void std::allocator_traits<std::allocator<void> >::construct<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}>(std::allocator<void>&, std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>*, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}&&) /usr/include/c++/14/bits/alloc_traits.h:657
    #6 0x809935 in std::_Sp_counted_ptr_inplace<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}>(std::allocator<void>, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}&&) /usr/include/c++/14/bits/shared_ptr_base.h:607
    #7 0x809a7e in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>, std::allocator<void>, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}>(std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>*&, std::_Sp_alloc_shared_tag<std::allocator<void> >, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}&&) /usr/include/c++/14/bits/shared_ptr_base.h:969
    #8 0x809be3 in std::__shared_ptr<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}>(std::_Sp_alloc_shared_tag<std::allocator<void> >, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}&&) /usr/include/c++/14/bits/shared_ptr_base.h:1713
    #9 0x809be3 in std::shared_ptr<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void> >::shared_ptr<std::allocator<void>, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}>(std::_Sp_alloc_shared_tag<std::allocator<void> >, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}&&) /usr/include/c++/14/bits/shared_ptr.h:463
    #10 0x809c74 in std::shared_ptr<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void> > std::make_shared<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}> >, void>, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}>(crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}&&) /usr/include/c++/14/bits/shared_ptr.h:1008
    #11 0x809e2f in std::future<std::__invoke_result<std::decay<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}>::type>::type> std::async<crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}>(std::launch, crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run()::{lambda()#1}&&) /usr/include/c++/14/future:1812
    #12 0x812abe in crow::Server<crow::Crow<crow::CORSHandler>, crow::SocketAdaptor, crow::CORSHandler>::run() 3pp/CrowCpp/include/crow/http_server.h:74
    #13 0x813c05 in crow::Crow<crow::CORSHandler>::run() 3pp/CrowCpp/include/crow/app.h:376
    #14 0x774d72 in WebServer::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned short) src/ecmi/WebServer.cpp:340
    #15 0x525dc4 in operator() src/main.cpp:72
    #16 0x526031 in __invoke_impl<void, main(int, char const**)::<lambda()> > /usr/include/c++/14/bits/invoke.h:61
    #17 0x526031 in __invoke<main(int, char const**)::<lambda()> > /usr/include/c++/14/bits/invoke.h:96
    #18 0x526031 in _M_invoke<0> /usr/include/c++/14/bits/std_thread.h:292
    #19 0x526031 in operator() /usr/include/c++/14/bits/std_thread.h:299
    #20 0x526031 in operator() /usr/include/c++/14/future:1439
    #21 0x5262b6 in __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::thread::_Invoker<std::tuple<main(int, char const**)::<lambda()> > >, void>&> /usr/include/c++/14/bits/invoke.h:61
    #22 0x5262b6 in __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::thread::_Invoker<std::tuple<main(int, char const**)::<lambda()> > >, void>&> /usr/include/c++/14/bits/invoke.h:114
    #23 0x526396 in _M_invoke /usr/include/c++/14/bits/std_function.h:291
    #24 0x52f79f in std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const /usr/include/c++/14/bits/std_function.h:591
    #25 0x52f8b5 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/include/c++/14/future:596
    #26 0x548359 in void std::__invoke_impl<void, 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::__invoke_memfun_deref, 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/include/c++/14/bits/invoke.h:74
    #27 0x548403 in std::__invoke_result<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*>::type std::__invoke<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*>(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/include/c++/14/bits/invoke.h:96
    #28 0x548403 in 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*&&)::{lambda()#1}::operator()() const /usr/include/c++/14/mutex:909
    #29 0x54843a in std::once_flag::_Prepare_execution::_Prepare_execution<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*&&)::{lambda()#1}>(void (std::__future_base::_State_baseV2::*&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*))::{lambda()#1}::operator()() const /usr/include/c++/14/mutex:845
    #30 0x54843a in std::once_flag::_Prepare_execution::_Prepare_execution<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*&&)::{lambda()#1}>(void (std::__future_base::_State_baseV2::*&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*))::{lambda()#1}::_FUN() /usr/include/c++/14/mutex:845
    #31 0x7f8857297e7e in __pthread_once_slow /usr/src/debug/glibc-2.39/nptl/pthread_once.c:116

Thread T6 created by T0 here:
    #0 0x7f88580f3601 in pthread_create (/lib64/libasan.so.8+0xf3601) (BuildId: 1827a4c72065a9f25ba519b25166029eebbf519f)
    #1 0x7f88576ec498 in __gthread_create /usr/src/debug/gcc-14.1.0+git10173/obj-x86_64-suse-linux/x86_64-suse-linux/libstdc++-v3/include/x86_64-suse-linux/bits/gthr-default.h:676
    #2 0x7f88576ec498 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) ../../../../../libstdc++-v3/src/c++11/thread.cc:172
    #3 0x5269a3 in _Async_state_impl<main(int, char const**)::<lambda()> > /usr/include/c++/14/future:1763
    #4 0x526b69 in _Construct<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<main(int, char const**)::<lambda()> > >, void>, main(int, char const**)::<lambda()> > /usr/include/c++/14/bits/stl_construct.h:119
    #5 0x526b69 in construct<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<main(int, char const**)::<lambda()> > >, void>, main(int, char const**)::<lambda()> > /usr/include/c++/14/bits/alloc_traits.h:657
    #6 0x526b69 in _Sp_counted_ptr_inplace<main(int, char const**)::<lambda()> > /usr/include/c++/14/bits/shared_ptr_base.h:607
    #7 0x526cae in __shared_count<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<main(int, char const**)::<lambda()> > >, void>, std::allocator<void>, main(int, char const**)::<lambda()> > /usr/include/c++/14/bits/shared_ptr_base.h:969
    #8 0x526e0f in __shared_ptr<std::allocator<void>, main(int, char const**)::<lambda()> > /usr/include/c++/14/bits/shared_ptr_base.h:1713
    #9 0x526e0f in shared_ptr<std::allocator<void>, main(int, char const**)::<lambda()> > /usr/include/c++/14/bits/shared_ptr.h:463
    #10 0x526e9c in make_shared<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<main(int, char const**)::<lambda()> > >, void>, main(int, char const**)::<lambda()> > /usr/include/c++/14/bits/shared_ptr.h:1008
    #11 0x527053 in async<main(int, char const**)::<lambda()> > /usr/include/c++/14/future:1812
    #12 0x528035 in main src/main.cpp:74
    #13 0x7f885722a1ef in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

SUMMARY: AddressSanitizer: double-free (/lib64/libasan.so.8+0xfd0d8) (BuildId: 1827a4c72065a9f25ba519b25166029eebbf519f) in operator delete(
@gittiver
Copy link
Member

If I remenber correctly, async calls are not supported in the current version, but I have to look up, where I found that.

@gittiver gittiver added feature Code based project improvement discussion The viability / implementation of the issue is up for debate labels Jun 24, 2024
@TheQue42
Copy link
Author

TheQue42 commented Jun 25, 2024

I know its not fully supported, but trying to understand #258, it sounds like the main problem has been that I'd the handling of the incoming HTTP request might block, but even that seems to have been solved. (And even if it hasnt, I can live with that for now, since my HTTP server is fairly low volume, for now). But a 100% crash scenario, that's a different story.

Even more strange, this works fine (as far as I can see, that is), in v1.0+5. Its the later versions, where afaik the standalone asio is used instead of full boost, that the problem starts....(?)

@gittiver
Copy link
Member

I don't think that's the asio version is the problem, I fear there was a change in the order of closing things which may have caused that.

@gittiver gittiver added the bug Something isn't working label Jul 19, 2024
@TheQue42
Copy link
Author

TheQue42 commented Sep 9, 2024

Any progress on this? I've been trying to use -DCROW_USE_BOOST=ON in the meantime, but that gives me all sorts of compilation errors on opensuse, so I am a bit stuck.

@TheQue42
Copy link
Author

Just as a note that I have tried this on later versions in master, with the same problems.

@gittiver
Copy link
Member

gittiver commented Nov 18, 2024

async calls are not supported in versions > 1.0.5.
Currently it is not clear when this feature will be reimplemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discussion The viability / implementation of the issue is up for debate feature Code based project improvement
Projects
None yet
Development

No branches or pull requests

2 participants