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
Node creation stalls when using asio library within node #176
Comments
Using Since it is unlikely that a fixed asio version will be released into the current and upcoming Ubuntu LTS, is there a chance that asio (with the bugfix in chriskohlhoff/asio#180 (comment)) will be relased as ament package in the ros2 repository? |
It looks like this fix is already in the version of asio used by eProsima to compile Fast-RTPS (https://github.com/michalsrb/android-ifaddrs/tree/7b1ce82817226e481d3cda0a5d06b66ebcc211f8). @ros2/team should we consider building asio provided by eProsima rather than using the system one ? |
I would say we can consider that but I would delay that decision / work until after the release. |
If What do you think about providing an asio version within the ros2 repos? |
Yeah, what I meant is that we do provide a way to get tinyxml2 (another Fast-RTPS dependency) in the entire workspace via a vendor package. Doing the same for asio would allow us to download and build it only if the version found on the system is older than the one we need. If the system version is recent enough we use the system one. It'll be worth checking if the one we packaged for windows a while back is recent enough too. |
Independent on what we choose to do for ROS 2 it would be important to make sure that a fix is being released into the |
👍 Looks like upstream didn't tag a release since this fix was merged. So we'll need to request a new release and then make sure that the last version gets packaged in Debian (Ubuntu will follow at that point) |
This issue seems to be fixed with the current ardent release.The serial_driver_node is showing the expected behaviour as mentioned in the Bug Report by @christianrauch |
Since it neither see a new release upstream nor an updated package in Ubuntu I am not sure how it got fixed. @christianrauch Can you confirm that the problem has been resolved? |
@sagniknitr Under which conditions did you build the example? I still have the mentioned issue (node stalls after For comparison can you try to run the compiled version serial_dummy_install.tar.gz? It is just the compressed install folder. You should be able to uncompress it, source the Can somebody else confirm my observed behaviour? |
Looks like the fix is in asio 1.10.9, but bionic still has 1.10.8. |
Actually, asio version 1.12.0 has been released (tagged): https://github.com/chriskohlhoff/asio/releases/tag/asio-1-12-0, which also includes this fix. I contacted the Debian package maintainer, to update the asio package, but haven't heard back from him. But since the bionic feature freeze has passed, it is very unlikely that asio 1.12.0 will make it into the next Ubuntu LTS. Given this, would it make sense to include asio 1.12.0 as cmake ( |
@sloretz To create SRU for Bionic. Create a vendor package in the meantime |
First step towards SRU: created bug on Bionic for the issue |
@sloretz to follow-up with debian maintainer to get a new version in debian and with Ubuntu bug team to get the fix from the SRU released in bionic. This bug now affects only Linux as a newer version is available for the other platforms. Removing the milestone as this is now de-correlated from the Bouncy release |
Asked debian maintainer what is needed to get the version in experimental migrated to unstable. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908169 |
debian sid has been updated to 1.12.2 https://packages.debian.org/sid/libasio-dev Since it's a bug in |
Bug report
When using
asio
as part of a driver (e.g. serial driver) within a node, the construction ofrclcpp::Node
blocks when using the FastRTPS rmw implementation.Required Info:
Steps to reproduce issue
./install/lib/serial_driver_node/serial_driver_node
Expected behavior
When creating the node the constructor of
SerialNode
should be called and printconstructing...
anddone...
.Actual behavior
The construction of
SerialNode
stalls and neither of the outputs in the contructor is printed.Additional information
gdb backtrace:
There seems to be a dead-lock in the asio event loop that is caused by having multiple
asio::io_service
(one from fastrtps, one from the driver library) in the same process.This issue does not occur when using a rmw_opensplice_cpp, e.g.:
The issue is probably related to asio issue chriskohlhoff/asio#180.
I am using asio version 1.10.6 (Ubuntu 16.04 repo) and have not yet tried to build ros2 from source using a newer asio version.The text was updated successfully, but these errors were encountered: