Skip to content

Timer doesn't reliably stop on Interrupts #548

@CodingCanuck

Description

@CodingCanuck

::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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions