EventBase crash when destruction on windows
- Dominant language
- C++
- Stars
- 30.5k
- Forks
- 5.9k
- PR merge metrics
- No merged PRs in 30d
Description
EventBase may crash on windows(vs2019) when destruct. It happens both when delete EventBase pointer or using folly::ScopedEventBaseThread to hold the EventBase's life, the test of orgin ScopedEventBaseThreadTest.cpp may failed.
I tracked EventBase.cpp, line 225 cause the crash
````cpp // Call all destruction callbacks, before we start cleaning up our state.
while (!onDestructionCallbacks_.rlock()->empty()) {
OnDestructionCallback::List callbacks;
onDestructionCallbacks_.swap(callbacks);
while (!callbacks.empty()) {
auto& callback = callbacks.front();
callbacks.pop_front();
callback.runCallback(); # <--- this line crash
}
}
````





I had test this on windows 10/windows server 2019/linux, linux is ok, but both windows crashed.
thanks.
Contributor guide
Assessment
This issue has not been assessed yet.