-
Notifications
You must be signed in to change notification settings - Fork 163
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
Avoid timer period being set to 0 #359
Conversation
The concerning thing with this patch is I don't know why the server wasn't always using 100% CPU as soon as a goal canceled. It's possible there is another bug elsewhere that's not starting the expire timer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, but
The concerning thing with this patch is I don't know why the server wasn't always using 100% CPU as soon as a goal canceled. It's possible there is another bug elsewhere that's not starting the expire timer.
Also concerns me...
* update docs about possibility of rcl_take no taking (ros2#356) * update rcl_wait doc with respect to subs and possibility of failing takes * add a note about possible failing takes in rcl_take docs * 0.6.2 * Set rmw_wait timeout using ros timers too (ros2#357) * 0.6.3 * Avoid timer period being set to 0 (ros2#359) * Fix logic that moves goal handles when one expires (ros2#360) * Fix error from uncrustify v0.68 (ros2#364) * Ensure that context instance id storage is aligned correctly (ros2#365) * Ensure that context instance id storage is aligned correctly * Make alignment compatible with MSVC * Namespace alignment macro with RCL_ * [rcl] Guard against bad allocation calling rcl_arguments_copy() (ros2#367) * [rcl] Add test for copying arguments struct with no arguments * Override allocate function in test to reveal bug * [rcl] Only allocate arrays if there are things to copy in rcl_argument_copy() Also guard against freeing invalid pointers if rcl_argument_copy() fails. * Remove uncessary guard against NULL pointer * linter, styles, uncrustify fixes
* update docs about possibility of rcl_take no taking (ros2#356) * update rcl_wait doc with respect to subs and possibility of failing takes * add a note about possible failing takes in rcl_take docs * 0.6.2 * Set rmw_wait timeout using ros timers too (ros2#357) * 0.6.3 * Avoid timer period being set to 0 (ros2#359) * Fix logic that moves goal handles when one expires (ros2#360) * Fix error from uncrustify v0.68 (ros2#364) * Ensure that context instance id storage is aligned correctly (ros2#365) * Ensure that context instance id storage is aligned correctly * Make alignment compatible with MSVC * Namespace alignment macro with RCL_ * [rcl] Guard against bad allocation calling rcl_arguments_copy() (ros2#367) * [rcl] Add test for copying arguments struct with no arguments * Override allocate function in test to reveal bug * [rcl] Only allocate arrays if there are things to copy in rcl_argument_copy() Also guard against freeing invalid pointers if rcl_argument_copy() fails. * Remove uncessary guard against NULL pointer * linter, styles, uncrustify fixes
* Changing security directory lookup to a prefix match rather than exact match. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Changing security directory lookup to a prefix match rather than exact match. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Changing security directory lookup to a prefix match rather than exact match. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Changing security directory lookup to a prefix match rather than exact match. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Adding security_directory module and moving rcl_get_secure_root function to it. Adding tests. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Adding security_directory module and moving rcl_get_secure_root function to it. Adding tests. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Adding security_directory module and moving rcl_get_secure_root function to it. Adding tests. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Adding security_directory module and moving rcl_get_secure_root function to it. Adding tests. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Adding security_directory module and moving rcl_get_secure_root function to it. Adding tests. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Changing security directory prefix matching to be optional. Improving error messages around security directory lookup. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Fixing get_best_matching_directory so that it always fetches the next file inside the loop. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * make pr ready for ros2cli security feature (#1) * update docs about possibility of rcl_take no taking (#356) * update rcl_wait doc with respect to subs and possibility of failing takes * add a note about possible failing takes in rcl_take docs * 0.6.2 * Set rmw_wait timeout using ros timers too (#357) * 0.6.3 * Avoid timer period being set to 0 (#359) * Fix logic that moves goal handles when one expires (#360) * Fix error from uncrustify v0.68 (#364) * Ensure that context instance id storage is aligned correctly (#365) * Ensure that context instance id storage is aligned correctly * Make alignment compatible with MSVC * Namespace alignment macro with RCL_ * [rcl] Guard against bad allocation calling rcl_arguments_copy() (#367) * [rcl] Add test for copying arguments struct with no arguments * Override allocate function in test to reveal bug * [rcl] Only allocate arrays if there are things to copy in rcl_argument_copy() Also guard against freeing invalid pointers if rcl_argument_copy() fails. * Remove uncessary guard against NULL pointer * linter, styles, uncrustify fixes Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Update rcl/include/rcl/security_directory.h Co-Authored-By: AAlon <avishayalon@gmail.com> Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Adding line break in docstring Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Removing duplicate doc string Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Removing tinydir from the source tree, instead using the ROS package tinydir_vendor. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Removing tinydir Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Reformatting license notice as per linter template. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Update test_security_directory.cpp Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Changing input to putenv to be a global, statically allocated buffer. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * test_security_directory - Using a larger buffer for env string manipulations. Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Copy environment variable to allocated string so it is not clobbered by next lookup Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Address review comments fix security directory exact match comment and unset env vars before tests Signed-off-by: Emerson Knapp <eknapp@amazon.com> * Remove strncpy Signed-off-by: Emerson Knapp <eknapp@amazon.com>
Fixes ros2/examples#221
_recalculate_expire_timer()
checks the time left on each of the goal handles and is supposed to set the timer period to the smallest one. The bug is it currently starts the minimum_period at 0, so the timer period is always set to 0 causing 100% CPU usage.This starts the minimum period at the goal expiration timeout since that's the maximum time the server might have to wait to expire a goal.
connects to ros2/examples#221