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

(#1719364) Always use inactive_exit_timestamp if it is set #392

Conversation

dtardon
Copy link
Member

@dtardon dtardon commented May 30, 2023

Resolves: #1719364

@systemd-rhel-bot systemd-rhel-bot added the pr/needs-review Formerly needs-review label May 30, 2023
@mergify mergify bot added the pr/needs-ci Formerly needs-ci label May 30, 2023
@systemd-rhel-bot systemd-rhel-bot changed the title Always use inactive_exit_timestamp if it is set (#1719374) Always use inactive_exit_timestamp if it is set May 30, 2023
@systemd-rhel-bot systemd-rhel-bot added the tracker/unapproved Formerly needs-acks label May 30, 2023
@github-actions
Copy link

github-actions bot commented May 30, 2023

Tracker - 1719364

The following commits meet all requirements

commit upstream
d245ad8 - core/timer: Always use inactive_exit_timestamp if it is set systemd/systemd@6546045
systemd/systemd-stable@6546045
db767ab - timer: Use dual_timestamp_is_set() in one more place systemd/systemd@e21f75a
systemd/systemd-stable@e21f75a

@mergify mergify bot removed the pr/needs-ci Formerly needs-ci label May 30, 2023
If we're doing a daemon-reload, we'll be going from TIMER_DEAD => TIMER_WAITING,
so we won't use inactive_exit_timestamp because TIMER_DEAD != UNIT_ACTIVE, even
though inactive_exit_timestamp is serialized/deserialized and will be valid after
the daemon-reload.

This issue can lead to timers never firing as we'll always calculate the next
elapse based on the current realtime on daemon-reload, so if daemon-reload happens
often enough, the elapse interval will be moved into the future every time, which
means the timer will never trigger.

To fix the issue, let's always use inactive_exit_timestamp if it is set, and only
fall back to the current realtime if it is not set.

(cherry picked from commit 6546045fa0bf84737bd8b2e1e8bf7dd3941d8352)

Resolves: #1719364
(cherry picked from commit e21f75afcd95a46261a36a2614712eff6bc119f4)

Related: #1719364
@dtardon dtardon force-pushed the bz1719374-OnCalendar+RandomizedDelaySec branch from 483cf11 to db767ab Compare May 31, 2023 06:23
@dtardon dtardon changed the title (#1719374) Always use inactive_exit_timestamp if it is set Always use inactive_exit_timestamp if it is set May 31, 2023
@mergify mergify bot added the pr/needs-ci Formerly needs-ci label May 31, 2023
@systemd-rhel-bot systemd-rhel-bot changed the title Always use inactive_exit_timestamp if it is set (#1719364) Always use inactive_exit_timestamp if it is set May 31, 2023
@dtardon
Copy link
Member Author

dtardon commented May 31, 2023

Tracker - 1719364

@jamacku The action should ideally also perform some checking of the bug: as a minimum, that it is a bug for systemd. (I made a typo in bug number again...)

@mergify mergify bot removed the pr/needs-ci Formerly needs-ci label May 31, 2023
@jamacku
Copy link
Member

jamacku commented May 31, 2023

@dtardon, it's the next step to check Bugzilla/Jira and look for revert commits and possibly follow-ups. I hope to deliver such functionality soonish.

Copy link
Member

@msekletar msekletar left a comment

Choose a reason for hiding this comment

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

LGTM

@systemd-rhel-bot systemd-rhel-bot removed the pr/needs-review Formerly needs-review label Jun 14, 2023
@systemd-rhel-bot systemd-rhel-bot removed the tracker/unapproved Formerly needs-acks label Jul 13, 2023
@systemd-rhel-bot systemd-rhel-bot merged commit e7c06a1 into redhat-plumbers:main Jul 13, 2023
@dtardon dtardon deleted the bz1719374-OnCalendar+RandomizedDelaySec branch July 13, 2023 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants