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

Debug feature: check for long running timer callbacks #1462

Open
kgiusti opened this issue Apr 11, 2024 · 0 comments
Open

Debug feature: check for long running timer callbacks #1462

kgiusti opened this issue Apr 11, 2024 · 0 comments

Comments

@kgiusti
Copy link
Contributor

kgiusti commented Apr 11, 2024

The qd_timer subsystem is the global timer callback module for the router. All router timer events depend on it. Timer callbacks are serialized in order to avoid race conditions between timed events. If a timer callback runs for too long (e.g. blocks) this will delay execution of all succeeding timer events. This will cause timers to miss deadlines which will result in undefined behavior and possible destabilization of the router network.

We should instrument the timer code to track the amount of time spent in a timer callback and assert if a callback takes "too much" time (value TBD). This code should be enabled only for Debug router builds due to the high runtime cost of monitoring.

The impetus for this feature comes from issue #1451

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

No branches or pull requests

1 participant