-
Notifications
You must be signed in to change notification settings - Fork 42
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
Do not call AA.remove
from finalizer
#166
Comments
Even though it is supposed to be, eventcore is currently not fully |
How do we work around this? I don't think using |
Upstream fix: dlang/druntime#3301 |
Normally periodic tasks are resources, so you would store the timer somewhere, where you would be able to dispose it. Or self-dispose in the handler. |
We had the unpleasant experience of tracking down a bug to this backtrace:
As you can see, some random code somewhere triggers a GC allocate (
frame #27
, doesn't matter where the allocation comes from), which triggers a collection (frame #20
), which collects a timer (frame #15
) which callsLoopTimeoutTimerDriver.releaseRef
(we're on POSIX). Inside this function, there's a call toAA.remove
:eventcore/source/eventcore/drivers/timer.d
Line 200 in 5e060d2
Well, that's a bad idea, because it can allocate...
The text was updated successfully, but these errors were encountered: