-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
foonathan memory crashes on osx with fastrtps #32
Comments
Hello @mrkbac ! Can you report the output of |
Here are the outputs, I'm using
|
Is this happening also if no other ROS2-program beside
|
Yes, it also happens when starting rviz2 or when trying to use the topic monitor in rqt. Probably a macos bug? |
I have a Mac mini in my lab, I will test with that tomorrow (CET time). |
I can locally reproduce, and the same happens for the osx-64 builds as well. No idea what the underlying problem is, though. |
So I was evil and built a foonathan-memory with the following modification: diff --git a/recipe/build.sh b/recipe/build.sh
index 3a2a806..e3440cc 100644
--- a/recipe/build.sh
+++ b/recipe/build.sh
@@ -11,7 +11,8 @@ cmake ${CMAKE_ARGS} .. \
-DFOONATHAN_MEMORY_BUILD_EXAMPLES=OFF \
-DFOONATHAN_MEMORY_BUILD_TESTS=OFF \
-DFOONATHAN_MEMORY_BUILD_TOOLS=ON \
- -DBUILD_SHARED_LIBS=ON
+ -DBUILD_SHARED_LIBS=ON \
+ -DFOONATHAN_MEMORY_CHECK_ALLOCATION_SIZE=OFF
cmake --build . --config Release -- -j$CPU_COUNT
cmake --build . --config Release --target install
diff --git a/recipe/meta.yaml b/recipe/meta.yaml
index 570a089..90158bd 100644
--- a/recipe/meta.yaml
+++ b/recipe/meta.yaml
@@ -16,7 +16,7 @@ source:
- fix-crosscompile.patch
build:
- number: 1
+ number: 2
run_exports:
- {{ pin_subpackage(name, max_pin='x.x.x') }}
Then running rviz2 works fine, but upon closing it, the following segfault occurs:
This might help in debugging.
|
In general, things seem to go wrong when calling import rclpy
from rclpy.node import Node
node_dummy = Node("_ros2cli_dummy_to_show_topic_list")
topic_list = node_dummy.get_topic_names_and_types()
node_dummy.destroy_node() # error occurs here |
Note that the issue is likely fast-rtps (or fast-dds, I'm still confused by all those middlewares). The following runs perfectly:
|
Perhaps as an quick fix we could set RMW_IMPLEMENTATION somewhere? |
I have recreated the ros-humble-ros-workspace package that now sets this env variable. I have overwritten the old package, so one needs to clear the cache. |
Yes, this works for me. Thanks, a lot! |
Should we file a bug report with |
Hello @Tobias-Fischer , Can you tell me what should I look at ? Thanks |
Hi @jordanlv - many thanks for getting in touch! I saw RoboStack/robostack.github.io#37 and I really doubt that the DDS is at fault for you not seeing the topic list. Have you confirmed that you can ping the other machine (in either direction)? Also, have you made sure that your router/VPN etc. does not block the ports required by ROS2? And did you set the correct For fixing Fast DDS: I think the best way is to dig deeper starting from #32 (comment) - it will probably be not much fun ;). The StackTrace might help. It might also be the case that a new version of Fast DDS has resolved the issues; probably worth trying the new packages that we've recently built here and see if they still have the same issue. |
Yes, I already check things like this. The problem is that I'm using a Turtlebot4 with discovery setup server. In this configuration, "every device in the system must use rmw_fastrtps_cpp as their DDS". WIth an Ubuntu PC I can also see this problem by switching between Cyclone DDS and Fast DDS. With Cyclone DDS, it cant work but with Fast DDS, I get all the nodes and the topics. I will try the new packages asap |
Interesting, I wasn’t aware of this. I guess switching to simple discovery is not an option for you? |
Yes, I would preferer to stay in discovery server. |
@xingruiyang @traversaro - FYI, I just updated the version of foonathan-memory on conda-forge (conda-forge/foonathan-memory-feedstock#8) which might contain some bugfixes. |
Great! However the abi compatibility of foonathan-memory is at the patch level (see https://github.com/conda-forge/foonathan-memory-feedstock/blob/13588d02ef478e94c60b7ce82a347385789c34d7/recipe/meta.yaml#L21), so maybe this requires a package rebuild? |
Yes, it does .. |
I also encountered this problem when using ros2 on osx. For some reason, I had to use |
@starlitxiling can you try to create a new environment? Three days ago we merged our rebuild (see #229), and the new uploaded packages should not be affected anymore ( |
hello, I am sorry reply you until now.I create a new environment try new uploaded. It work correctly!!! Thanks for yours help. |
No problem, 3 days with the weekend in the middle is a fast response. Happy that everything works, if you still have problems feel free to open a new issue, thanks! |
@Tobias-Fischer I guess we can close the issue? |
Hey, when doing anything related to topics, like
ros2 topic list
, startingrviz2
or playing a bag the application crashes. My platform isosx-arm64
.The text was updated successfully, but these errors were encountered: