Open tripleslash opened 2 years ago
Did you use the latest commit of the master branch?
I've used v1.7.5 Release bundle
An Tao @.***> schrieb am Do., 16. Juni 2022, 03:56:
Did you use the latest commit of the master branch?
— Reply to this email directly, view it on GitHub https://github.com/drogonframework/drogon/issues/1286#issuecomment-1157146204, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABATEP63SIZBZEJ7RRPC46LVPKCS5ANCNFSM5Y5DBCBA . You are receiving this because you authored the thread.Message ID: @.***>
We made some patches to fix the crash on exit, please use the last commit or wait for the 1.7.6 release.
I've just tried it with the latest master and the crash is gone but the shutdown issue is not:
On Windows the Ctrl+C interrupt is not handled by drogon. It just eats up the Ctrl+C signal and continues to run. And if I try to manually call drogon::app().quit()
from somewhere then drogon will hang in a spinlock in Event Loop and never return from the run method. Is this a known problem?
This is where it hangs:
Did you call "app().run()" in another thread than the main thread?
No I did not. I've only called it once directly from main. The minimal reproducible example above still applies to this bug. I am using MSVC 2022 and todays drogon master.
An Tao @.***> schrieb am Fr., 17. Juni 2022, 03:43:
Did you call "app().run()" in another thread than the main thread?
— Reply to this email directly, view it on GitHub https://github.com/drogonframework/drogon/issues/1286#issuecomment-1158383222, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABATEPYCMC6MUD6B63JIXFLVPPJ3HANCNFSM5Y5DBCBA . You are receiving this because you authored the thread.Message ID: @.***>
Where did you call the app().quit()
method?
Would you please make a complete minimal example to reproduce this problem?
Just a though, could this be related to my issue https://github.com/drogonframework/drogon/issues/1157 ?
The following code causes the issue:
int main(int argc, char* argv[])
{
drogon::app()
.registerBeginningAdvice([]
{
drogon::app().quit();
})
.run();
// Never reached...
return 0;
}
I'm getting a crash on application exit on Visual Studio 2022 compiler because drogon::HttpAppFrameworkImpl destructor is not properly cleaning up objects. It is using something that relies on EventLoop after it was already destroyed when the destructors of static objects got invoked.
The minimal reconstructible example that I could make is this:
Here is the call stack right before the crash happens:
If i step over this line I get: