Skip to content

timer: Move state check to before time check#479

Merged
chrissie-c merged 1 commit intoClusterLabs:mainfrom
chrissie-c:timer-exp-fix
Jan 5, 2023
Merged

timer: Move state check to before time check#479
chrissie-c merged 1 commit intoClusterLabs:mainfrom
chrissie-c:timer-exp-fix

Conversation

@chrissie-c
Copy link
Copy Markdown
Contributor

A timer in QB_POLL_ENTRY_JOBLIST doesn't necessarily have a t->timerlist_handle so that deref can segv. Also the comment assumes the timers are threaded - which as we have decided is definitely not true. So it's safe to move the check earlier.

In the tests, I've adjusted the timeouts so that they definitely happen at different times. On some architectures they can fire concurrently and in the wrong order.

A timer in QB_POLL_ENTRY_JOBLIST doesn't necessarily
have a t->timerlist_handle so that deref can segv. Also
the comment assumes the timers are threaded - which as we have
decided is definitely not true. So it's safe to move the check
earlier.

In the tests, I've adjusted the timeouts so that they definitely
happen at different times. On some architectures they can fire
concurrently and in the wrong order.
@chrissie-c chrissie-c merged commit fde729e into ClusterLabs:main Jan 5, 2023
@chrissie-c chrissie-c deleted the timer-exp-fix branch January 5, 2023 14:45
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Jun 21, 2023
https://build.opensuse.org/request/show/1093859
by user yan_gao + dimstar_suse
- Update to version 2.0.7+20230607.06c8641 (v2.0.7):
- blackbox: fix potential overlow/memory corruption (gh#ClusterLabs/libqb#486)
- tests: allow -j to work (gh#ClusterLabs/libqb#485)
- strlcpy: avoid compiler warning from strncpy (gh#ClusterLabs/libqb#473)
- timer: Move state check to before time check (gh#ClusterLabs/libqb#479)
- ipc: Retry receiving credentials if the the message is short (gh#ClusterLabs/libqb#476, rh#2111711)
- lib: Fix some small bugs spotted by newest covscan (gh#ClusterLabs/libqb#471)
- doxygen2man: Fix function parameter alignment (gh#ClusterLabs/libqb#468) (forwarded request 1093858 from yan_gao)
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

Successfully merging this pull request may close these issues.

2 participants