Open andreasbuhr opened 3 years ago
It seems that the crash occurs due to a stack overflow in startWaiter
lambda function. Coroutines awaiting on the async_auto_reset_event
are sometimes resumed inside a call to set()
, which is a documented behavior. There are multiple coroutines created by startWaiter
, so the chain of nested continuations may become too long. https://github.com/andreasbuhr/cppcoro/blob/b9c28b1fd2df2cd76601327964944883cbc85d67/test/async_auto_reset_event_tests.cpp#L100-L106
With a slightly modified startWaiter
it is possible to detect nested continuations.
Interestingly, when there is only one thread in the thread pool, the test completes successfully.
In: https://github.com/andreasbuhr/cppcoro/runs/1505811235?check_suite_focus=true
we see The following tests FAILED: 37 - async auto reset event tests-multi-threaded (SEGFAULT)
wich happens sometimes.