Skip to content

fix: Prevent short time endless loop in expire_timer (backport #1303)#1305

Open
mergify[bot] wants to merge 1 commit intojazzyfrom
mergify/bp/jazzy/pr-1303
Open

fix: Prevent short time endless loop in expire_timer (backport #1303)#1305
mergify[bot] wants to merge 1 commit intojazzyfrom
mergify/bp/jazzy/pr-1303

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify bot commented Mar 23, 2026

There were multiple bugs in this area:

  • The expire of goals and the re computation of the expire period had a < vs <= issue, leading to goals not expiring, while the period for the next expire was compute as 0 leading to a direct recall of the expire timer. In combination with sim time this lead to 100% CPU spikes.
  • The period of the expire timer was changed after the reset of the timer, leading to an incorrect next call time of the timer.
  • The timer was not canceled after the expire event was issued

This is an automatic backport of pull request #1303 done by [Mergify](https://mergify.com).

* fix: Prevent short time endless loop in expire_timer

There were multiple bugs in this area:
- The expire of goals and the re computation of the expire period
  had a < vs <= issue, leading to goals not expiring, while the
  period for the next expire was compute as 0 leading to a direct
  recall of the expire timer. In combination with sim time this lead
  to 100% CPU spikes.
- The period of the expire timer was changed after the reset of the timer,
  leading to an incorrect next call time of the timer.
- The timer was not canceled after the expire event was issued

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>

* chore: Removed unneeded line

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>

---------

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Co-authored-by: Janosch Machowinski <J.Machowinski@cellumation.com>
(cherry picked from commit 927a33e)

# Conflicts:
#	rcl_action/src/rcl_action/action_server.c
@mergify mergify bot added the conflicts label Mar 23, 2026
@mergify
Copy link
Copy Markdown
Author

mergify bot commented Mar 23, 2026

Cherry-pick of 927a33e has failed:

On branch mergify/bp/jazzy/pr-1303
Your branch is up to date with 'origin/jazzy'.

You are currently cherry-picking commit 927a33e.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   rcl_action/src/rcl_action/action_server.c

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

}
}

>>>>>>> 927a33e (fix: Prevent short time endless loop in expire_timer (#1303))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part of the PR is ABI breaking and different from how action goal expiration was handled in Jazzy. We can remove this part and backport the rest of the changes to Jazzy (and Kilted as well, in combination with the action goal expiration backport)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skyegalaxy or @jmachowinski: would one of you want to take care of this?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants