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

Changes between 1.15.8 and 1.15.9 for backporting to Melodic #2081

Merged
merged 17 commits into from
Oct 16, 2020

Conversation

jacobperron
Copy link
Contributor

The following list of changes has been integrated into ros_comm 1.15.9 (Noetic) since the last Melodic release (1.14.9)

Backported (in this PR):

Not backported:

bofetadas and others added 17 commits October 16, 2020 15:36
* Added skip_cache parameter to rosnode_ping() to give programmers the possibility to skip looking into the cache of nodes and instead force looking them up from master

* Fixed indentation and added keyword argument
* rosnode_cleanup() now also removes unavailable nodes from the local node cache _caller_apis. This prevents buggy behaviour when nodes become unvailable because they exit the ros network due to wifi issues but then reconnect to it later on.

* Fixed indentation
If one ROS node is setting and at the same time subscribing to the same
parameter the ROS master does not notify about a parameter change.
This change makes sure that the cache is updated after a
set_param call.
ParamServerCache was making problems when setting a param on '/' or on
the namespace ('').

Co-authored-by: Lars Lütjens <luetjens@magazino.eu>
This fixes a bug in ROSOutAppender that consists of waiting on the condition_variable `queue_condition_` without checking if the `log_queue_` is empty.

In this situation if the `log_queue_` had some messages that were inserted while `ROSOutAppender::logThread` was publishing other messages, the new messages in the queue won't be published, until another message eventually is added.

Note that the `notify_all` sent in the destructor would not cause the unpublished messages to get published, as when the `queue_condition_`  is awaken by this notification, `shutting_down_` would be true and would cause `ROSOutAppender::logThread`  to return immediately.

Co-authored-by: Adel Fakih <adel.fakih@avidbots.com>
As far as I can tell, not being able to ping itself does not *cause* the issue (at least if ping refers to using the `ping` program to check if a host can be reached). Not sure if this wording is the optimal.
* Fix log*_throttle with sim time

When log*_throttle is used with bags or a simulation, logging stops. Solved this problem with resetting logging_time_table when ros time moved backward

* fixed a bug where client loses a log message when rostime goes backward

removed paranthesis
fixed a bug where client loses a log message when rostime goes backward
* XmlRpcValue::_doubleFormat should be used during write.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* allocate buffer dynamically for XmlRpcValue::_doubleFormat if necessary.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* add test for XmlRpcValue::_doubleFormat.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* check return code from std::snprintf, save/restore DoubleFormat for test.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* add one time warning message for DoubleFormat.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* use XmlRpcUtil::error instead of ROS_ERROR.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* use static_cast and minor fixes.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* delete unrelated change and fix invalid format case.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* get rid of redundant condition from if statement.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
* Add SIGTERM and SIGINT handlers to rosbag record

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>

* Add unit test for rosbag record SIGINT handling
Add unit test for rosbag record SIGTERM handling

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>

* Address review comments
Fix sending SIGINT to main process

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>

* Revert added whitespace

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>

* Revert SIGINT handler addition: use default

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>

* Remove unnecessary wait

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>

* Use BSD License

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>

* Add test improvements

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>

* Move test helper function

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>

* Remove redundant test rosbag launch

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>

* Add Amazon to new python test copyright

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>

* Remove unrelated whitespace

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>

* Split record cleanup unit tests
Add record cleanup unit test helper

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>

* Revert whitespace change

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>

* revert white space change

Co-authored-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Co-authored-by: Stefan Kaiser <stefan.kaiser@tomtom.com>
Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
* Trap for overly large input to XmlRPCPP which could cause problems with int <-> size_t conversions.

 - In XmlRpcClient, XmlRpcServerConnection and XmlRpcSocket, recognize when incoming or outgoing data is too large, generate an error and discard the data when practical.
 - Use the safe strtol() rather than atoi() to decode an incoming content-length header, and generate an error if the length is invalid or too large.
 - In XmlRpcUtil, prevent attempts to parse overly large XML input.
 - Add tests where they can reasonably be inserted into existing test routines.

Although this fix could be cleaner the update is written to make the update ABI compatible.

This fix addresses CVE-2020-16124 / Integer overflow in ros_comm.

Signed-off-by: Sid Faber <sid.faber@canonical.com>

* Trap for memory allocation error in tests

Signed-off-by: Sid Faber <sid.faber@canonical.com>

* Revert earlier change

Signed-off-by: Sid Faber <sid.faber@canonical.com>

* Update tests

Replace call to GTEST_SKIP with output to stderr. Remove the
redResponseOversize test since out-of-memory errors during
testing cannot easily be handled within the existing test objects.

Signed-off-by: Sid Faber <sid.faber@canonical.com>

* Improve test error handling

Use GTEST_SKIP if available, otherwise print to stderr. Remove test
that's being killed because it takes too long to handle the oversize
test values
* add unsubscribeCachedParam.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* unsubscribe all the cached parameters.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* add const S_string::iterator.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* delete unnecessary if statement.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* unsubscribeCachedParam should be called when parameter is deleted.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* fix parenthesis location.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
* add split_with_single_quote_enclosed_fixup

* address feedback.

* revert the renaming.
Previous: @dirk-thomas
New: @jacobperron, @mjcarroll, @sloretz

Signed-off-by: Shane Loretz<sloretz@openrobotics.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
* Fix paramtest for empty values of a parameter (#2053)

* Fix paramtest for empty values of a parameter (#2053)
* set call_finished_ with true for each call inside callFinished

and also set current_call flags when failure happens

Signed-off-by: Chen Lihui <lihui.chen@sony.com>

* Update based on review

Co-authored-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>

* set the flag with true again even if it is true already

Signed-off-by: Chen Lihui <lihui.chen@sony.com>

Co-authored-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
@jacobperron jacobperron self-assigned this Oct 16, 2020
@jacobperron jacobperron merged commit 8e66056 into melodic-devel Oct 16, 2020
@jacobperron jacobperron deleted the jacob/backports_melodic branch October 16, 2020 23:58
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.