Skip to content
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

Timer doesn't reliably stop on Interrupts #548

Open
CodingCanuck opened this issue Aug 16, 2022 · 1 comment
Open

Timer doesn't reliably stop on Interrupts #548

CodingCanuck opened this issue Aug 16, 2022 · 1 comment

Comments

@CodingCanuck
Copy link
Contributor

::eventuals::Timer() seems to occasionally miss Interrupts, e.g. when run as part of an ::eventuals::ControLoop().

Experimentally, the problem appears to be that Timers install interrupt handlers, but that handler installation may fail, and Timer doesn't check whether or not the installation succeeded. Sample non-checked handler installation:

handler_->Install();

When interrupts are missed, timers can't be cancelled (since interrupts are the cancellation mechanism).

I can't seem to create a minimal repro for this (when I try to use just timers in a loop, everything reliably passes). But this happens non-deterministically (e.g. ~5% failure rate) in reboot-dev/respect@4686216 (#790) . When this happened locally in a larger example, I verified handler installation failure by adding CHECK()s around handler_->Install(); calls in event-loop.h, and saw that those CHECKs sometimes failed.

@benh mentioned that @onelxj might already be working on a fix for this.

@CodingCanuck
Copy link
Contributor Author

I think #534 is a partial fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant