Crow icon indicating copy to clipboard operation
Crow copied to clipboard

Crash in chat example

Open hporten opened this issue 1 year ago • 5 comments

When running example_chat and sending any input via the served example_chat.html page, the server crashes:

$ ./example_chat
(2024-03-10 19:00:16) [INFO    ] Crow/master server is running at http://0.0.0.0:40080 using 2 threads
(2024-03-10 19:00:16) [INFO    ] Call `app.loglevel(crow::LogLevel::Warning)` to hide Info level logs.
(2024-03-10 19:00:29) [INFO    ] Request: 127.0.0.1:56458 0x55b6a76e2870 HTTP/1.1 GET /
(2024-03-10 19:00:29) [INFO    ] Response: 0x55b6a76e2870 / 200 0
(2024-03-10 19:00:29) [INFO    ] Request: 127.0.0.1:56458 0x55b6a76e2870 HTTP/1.1 GET /logs
(2024-03-10 19:00:29) [INFO    ] logs requested
(2024-03-10 19:00:29) [INFO    ] logs completed
(2024-03-10 19:00:29) [INFO    ] Response: 0x55b6a76e2870 /logs 200 0
(2024-03-10 19:00:29) [INFO    ] Request: 127.0.0.1:56458 0x55b6a76e2870 HTTP/1.1 GET /logs/0
(2024-03-10 19:00:29) [INFO    ] logs with last 0
(2024-03-10 19:00:35) [INFO    ] Request: 127.0.0.1:41598 0x7f8f6c000c30 HTTP/1.1 POST /send
(2024-03-10 19:00:35) [INFO    ] msg from client: Test
(2024-03-10 19:00:35) [INFO    ] Response: 0x55b6a76e2870 /logs/0 200 0
free(): double free detected in tcache 2
Aborted (core dumped)

Backtrace:

(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737345746496)
     at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140737345746496)
     at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140737345746496, signo=signo@entry=6)
    at ./nptl/pthread_kill.c:89
#3  0x00007ffff7842476 in __GI_raise (sig=sig@entry=6)
    at ../sysdeps/posix/raise.c:26
#4  0x00007ffff78287f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff7889676 in __libc_message (action=action@entry=do_abort,
    fmt=fmt@entry=0x7ffff79dbb77 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#6  0x00007ffff78a0cfc in malloc_printerr (
    str=str@entry=0x7ffff79de6f0 "free(): double free detected in tcache 2")
    at ./malloc/malloc.c:5664
#7  0x00007ffff78a30ab in _int_free (av=0x7ffff0000030, p=0x7ffff0002d20,
    have_lock=0) at ./malloc/malloc.c:4473
#8  0x00007ffff78a5453 in __GI___libc_free (mem=<optimized out>)
    at ./malloc/malloc.c:3391
#9  0x00005555555eda7d in std::_Function_base::_Base_manager<crow::Connection<crow::SocketAdaptor,
 crow::Crow<>>::handle()::{lambda()#2}>::_M_destroy(std::_Any_data&, std::integral_constant<bool, false>) (__victim=...)
    at /usr/include/c++/11/bits/std_function.h:175
#10 0x00005555555eb796 in std::_Function_base::_Base_manager<crow::Connection<crow::SocketAdaptor,
 crow::Crow<>>::handle()::{lambda()#2}>::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) (__dest=...,
    __source=..., __op=std::__destroy_functor)
    at /usr/include/c++/11/bits/std_function.h:203

This may be the same as #686. But just guessing as the reporter did not provide further info.

My build configuration:

  • Crow v1.0 as well as as master (c47540bb8c5adf96add972c240284f7d4e4e30b0).
  • gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
  • CMake version 3.22.1
  • libasio-dev 1:1.18.1-1 (tried a source package of asio 1.28.1 as well)

I can attach the Valgrind output if needed. It is a bit hard to decipher but points to an issue with the memory management of connection objects.

hporten avatar Mar 10 '24 21:03 hporten

I missed the fact that #686 was closed, so I'll just add that I get the same thing after updating from 1.0+5 to 1.1.0 (and in master).

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ffff7294a73 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007ffff7241176 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff7228917 in __GI_abort () at abort.c:79
#4  0x00007ffff72297e8 in __libc_message_impl (fmt=fmt@entry=0x7ffff73b3321 "%s\n") at ../sysdeps/posix/libc_fatal.c:132
#5  0x00007ffff729f3c7 in malloc_printerr (str=str@entry=0x7ffff73b6660 "free(): double free detected in tcache 2") at malloc.c:5772
#6  0x00007ffff72a19c9 in _int_free (av=0x7fffd0000030, p=<optimized out>, have_lock=have_lock@entry=0) at malloc.c:4541
#7  0x00007ffff72a4143 in __GI___libc_free (mem=<optimized out>) at malloc.c:3398
#8  0x000000000066da1d 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>) (__victim=...) at /usr/include/c++/12/bits/std_function.h:175
#9  0x0000000000673778 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) (__dest=..., __source=..., __op=<optimized out>)
    at /usr/include/c++/12/bits/std_function.h:203
#10 0x0000000000673815 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) (__dest=..., __source=..., __op=<optimized out>)
    at /usr/include/c++/12/bits/std_function.h:282
#11 0x000000000065dd25 in std::function<void ()>::operator=(decltype(nullptr)) (this=this@entry=0x7fff4c008938) at /usr/include/c++/12/bits/std_function.h:505
#12 0x0000000000679568 in crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::prepare_buffers (this=this@entry=0x7fff4c0076c0) at 3pp/CrowCpp/include/crow/http_connection.h:274
#13 0x000000000067c867 in crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::complete_request (this=0x7fff4c0076c0) at 3pp/CrowCpp/include/crow/http_connection.h:259
#14 0x000000000067cc79 in crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}::operator()() const (__closure=<optimized out>) at 3pp/CrowCpp/include/crow/http_connection.h:183
#15 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}&) (__f=...)
    at /usr/include/c++/12/bits/invoke.h:61
#16 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}&) (__fn=...) at /usr/include/c++/12/bits/invoke.h:111
#17 std::_Function_handler<void (), crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/include/c++/12/bits/std_function.h:290
#18 0x0000000000617f96 in std::function<void ()>::operator()() const (this=this@entry=0x7fff4c008938) at /usr/include/c++/12/bits/std_function.h:591
#19 0x000000000061928e in crow::response::end (this=this@entry=0x7fff4c0088d0) at 3pp/CrowCpp/include/crow/http_response.h:250

TheQue42 avatar Mar 27 '24 06:03 TheQue42

And, when running a single POST under valgrind:

06:40:25.348 - NW_LOG[Ecmi/Info    ] - EcmiServer                                        :Request: 127.0.0.1:35728 0x5707cf0 HTTP/1.1 POST /api/v1/conferences: {  }
06:40:25.454 - NW_LOG[Ecmi/Info    ] - EcmiServer                                        :Response: 0x5707cf0 /api/v1/conferences 200 0: {  }
==13219== Thread 5:
==13219== Invalid free() / delete / delete[] / realloc()
==13219==    at 0x4849499: operator delete(void*, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==13219==    by 0x66DA1C: 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>) (std_function.h:175)
==13219==    by 0x673777: 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) (std_function.h:203)
==13219==    by 0x673814: 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) (std_function.h:282)
==13219==    by 0x65DD24: std::function<void ()>::operator=(decltype(nullptr)) (std_function.h:505)
==13219==    by 0x679567: crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::prepare_buffers() (http_connection.h:274)
==13219==    by 0x67C866: crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::complete_request() (http_connection.h:259)
==13219==    by 0x67CC78: operator() (http_connection.h:183)
==13219==    by 0x67CC78: __invoke_impl<void, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::<lambda()>&> (invoke.h:61)
==13219==    by 0x67CC78: __invoke_r<void, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::<lambda()>&> (invoke.h:111)
==13219==    by 0x67CC78: std::_Function_handler<void (), crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::{lambda()#2}>::_M_invoke(std::_Any_data const&) (std_function.h:290)
==13219==    by 0x617F95: std::function<void ()>::operator()() const (std_function.h:591)
==13219==    by 0x61928D: crow::response::end() (http_response.h:250)
==13219==    by 0x6198FE: WebServer::returnCrowResponse(crow::response&, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) (WebServer.hpp:130)
==13219==    by 0x61394D: ImmiHandler::gotImmiRsp(std::shared_ptr<ApiResponse>&) (ImmiHandler.cpp:273)
==13219==  Address 0x570bda0 is 0 bytes inside a block of size 16 free'd
==13219==    at 0x4849499: operator delete(void*, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==13219==    by 0x66DA1C: 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>) (std_function.h:175)
==13219==    by 0x673777: 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) (std_function.h:203)
==13219==    by 0x673814: 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) (std_function.h:282)
==13219==    by 0x50BD70: std::_Function_base::~_Function_base() (std_function.h:244)
==13219==    by 0x64F9DA: ~function (std_function.h:334)
==13219==    by 0x64F9DA: crow::response::~response() (http_response.h:33)
==13219==    by 0x680EB1: crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::~Connection() (http_connection.h:73)
==13219==    by 0x680F70: destroy_at<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler> > (stl_construct.h:88)
==13219==    by 0x680F70: _Destroy<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler> > (stl_construct.h:149)
==13219==    by 0x680F70: destroy<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler> > (alloc_traits.h:648)
==13219==    by 0x680F70: 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() (shared_ptr_base.h:613)
==13219==    by 0x50EAEF: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use() (shared_ptr_base.h:175)
==13219==    by 0x50EB86: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold() (shared_ptr_base.h:199)
==13219==    by 0x50EC6F: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:353)
==13219==    by 0x66D9FD: ~__shared_count (shared_ptr_base.h:1071)
==13219==    by 0x66D9FD: ~__shared_ptr (shared_ptr_base.h:1524)
==13219==    by 0x66D9FD: ~shared_ptr (shared_ptr.h:175)
==13219==    by 0x66D9FD: ~<lambda> (http_connection.h:182)
==13219==    by 0x66D9FD: 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>) (std_function.h:175)
==13219==  Block was alloc'd at
==13219==    at 0x4845EFF: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==13219==    by 0x66B248: 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>) (std_function.h:161)
==13219==    by 0x66B2D1: _M_init_functor<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle()::<lambda()> > (std_function.h:215)
==13219==    by 0x66B2D1: 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}&&) (std_function.h:449)
==13219==    by 0x66B353: 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}&&) (std_function.h:534)
==13219==    by 0x67D892: crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::handle() (http_connection.h:182)
==13219==    by 0x67DD4F: process_message (parser.h:162)
==13219==    by 0x67DD4F: crow::HTTPParser<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler> >::on_message_complete(crow::http_parser*) (parser.h:99)
==13219==    by 0x62D100: crow::http_parser_execute(crow::http_parser*, crow::http_parser_settings const*, char const*, unsigned long) (http_parser_merged.h:1760)
==13219==    by 0x64AF06: crow::HTTPParser<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler> >::feed(char const*, int) (parser.h:126)
==13219==    by 0x664EEE: 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 (http_connection.h:475)
==13219==    by 0x678E89: operator() (bind_handler.hpp:288)
==13219==    by 0x678E89: asio_handler_invoke<asio::detail::binder2<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::<lambda(const asio::error_code&, std::size_t)>, std::error_code, long unsigned int> > (handler_invoke_hook.hpp:87)
==13219==    by 0x678E89: invoke<asio::detail::binder2<crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::<lambda(const asio::error_code&, std::size_t)>, std::error_code, long unsigned int>, crow::Connection<crow::SocketAdaptor, crow::Crow<crow::CORSHandler>, crow::CORSHandler>::do_read()::<lambda(const asio::error_code&, std::size_t)> > (handler_invoke_helpers.hpp:54)
==13219==    by 0x678E89: 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}&) (handler_work.hpp:523)
==13219==    by 0x678F87: 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) (reactive_socket_recv_op.hpp:151)
==13219==    by 0x632645: complete (scheduler_operation.hpp:39)
==13219==    by 0x632645: asio::detail::scheduler::do_run_one(asio::detail::conditionally_enabled_mutex::scoped_lock&, asio::detail::scheduler_thread_info&, std::error_code const&) (scheduler.ipp:492)

TheQue42 avatar Mar 27 '24 06:03 TheQue42

When accessing the /send endpoint after having accessed the /logs/<int> endpoint, and if the integer value is greater than or equal to the length of the msgs variable (triggering the else branch within the /logs/<int> endpoint), the program encounters a free(): double free detected in tcache 2 error.

In the first terminal window:

$ ./example_chat

In the second terminal window:

$ curl http://localhost:40080/logs/0

In the third terminal window:

$ curl http://localhost:40080/send --data hello

Log output:

(2024-04-10 08:14:20) [INFO    ] Crow/master server is running at http://0.0.0.0:40080 using 2 threads
(2024-04-10 08:14:20) [INFO    ] Call `app.loglevel(crow::LogLevel::Warning)` to hide Info level logs.
(2024-04-10 08:14:23) [INFO    ] Request: 127.0.0.1:35956 0x558df7bac300 HTTP/1.1 GET /logs/0
(2024-04-10 08:14:23) [INFO    ] logs with last 0
(2024-04-10 08:14:29) [INFO    ] Request: 127.0.0.1:35958 0x7f5928000c30 HTTP/1.1 POST /send
(2024-04-10 08:14:29) [INFO    ] msg from client: hello
(2024-04-10 08:14:29) [INFO    ] Response: 0x558df7bac300 /logs/0 200 0
free(): double free detected in tcache 2
[1]    27909 IOT instruction  ./example_chat

https://github.com/CrowCpp/Crow/issues/782#issue-2177922844 : Because the webpage automatically accesses the /logs/ endpoint upon opening, the same error occurs.

It might be an issue with resource management? 😢 I tried to debug but couldn't pinpoint the root cause. I hope the information provided above can be of some assistance.

My environment information:

  • crow version: ad337a8a
  • gcc/g++ version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
  • cmake version: 3.22.1
  • asio version: 1.29.0

o7si avatar Apr 10 '24 08:04 o7si

Suddenly ran into the same problem.

A very ugly crash can be avoided by adding res.end(); at the end of the lambda for "/logs/<int>".

The library seems ingenious, but the first run of the example pushed back hard.

romanlubimov avatar Apr 17 '24 19:04 romanlubimov