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

z_bytes_from_buf cause FastCDR deserialization error #40

Open
YuanYuYuan opened this issue Nov 19, 2024 · 1 comment
Open

z_bytes_from_buf cause FastCDR deserialization error #40

YuanYuYuan opened this issue Nov 19, 2024 · 1 comment

Comments

@YuanYuYuan
Copy link
Collaborator

The changes in 6f50175 can cause the following error. That's why we still use z_bytes_copy_from_buf.

colcon test --event-handlers console_cohesion+ console_direct+ --packages-select rclcpp --ctest-args -R test_parameter_client
Starting >>> rclcpp
[0.488s] WARNING:colcon.colcon_core.shell:The following packages are in the workspace but haven't been built:
- rcl_yaml_param_parser
- rosidl_typesupport_interface
- rosidl_runtime_c
- rosidl_runtime_cpp
- rcl
They are being used from the following locations instead:
- /opt/ros/rolling
- /opt/ros/rolling
- /opt/ros/rolling
- /opt/ros/rolling
- /opt/ros/rolling
To suppress this warning ignore these packages in the workspace:
--packages-ignore rcl_yaml_param_parser rosidl_typesupport_interface rosidl_runtime_c rosidl_runtime_cpp rcl
UpdateCTestConfiguration  from :/workspace/build/rclcpp/CTestConfiguration.ini
Parse Config file:/workspace/build/rclcpp/CTestConfiguration.ini
   Site: ZenS13
   Build name: (empty)
 Add coverage exclude regular expressions.
Create new tag: 20241119-0920 - Experimental
UpdateCTestConfiguration  from :/workspace/build/rclcpp/CTestConfiguration.ini
Parse Config file:/workspace/build/rclcpp/CTestConfiguration.ini
Test project /workspace/build/rclcpp
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 56
    Start 56: test_parameter_client

56: Test command: /usr/bin/python3 "-u" "/opt/ros/rolling/share/ament_cmake_test/cmake/run_test.py" "/workspace/build/rclcpp/test_results/rclcpp/test_parameter_client.gtest.xml" "--package-name" "rclcpp" "--output-file" "/workspace/build/rclcpp/ament_cmake_gmock/test_parameter_client.txt" "--command" "/workspace/build/rclcpp/test/rclcpp/test_parameter_client" "--gtest_output=xml:/workspace/build/rclcpp/test_results/rclcpp/test_parameter_client.gtest.xml"
56: Working Directory: /workspace/build/rclcpp/test/rclcpp
56: Test timeout computed to be: 60
56: -- run_test.py: invoking following command in '/workspace/build/rclcpp/test/rclcpp':
56:  - /workspace/build/rclcpp/test/rclcpp/test_parameter_client --gtest_output=xml:/workspace/build/rclcpp/test_results/rclcpp/test_parameter_client.gtest.xml
56: Running main() from gmock_main.cc
56: [==========] Running 28 tests from 1 test suite.
56: [----------] Global test environment set-up.
56: [----------] 28 tests from TestParameterClient
56: 2024-11-19T09:20:41.527393Z  INFO ThreadId(02) zenoh::net::runtime: Using ZID: a9d23a2e7ce00ac2791f4489c503d2a9
56: 2024-11-19T09:20:41.527939Z  INFO ThreadId(02) zenoh::net::runtime::orchestrator: Zenoh can be reached at: tcp/[::1]:41771
56: [INFO] [1732008041.529772091] [rmw_zenoh_cpp]: Successfully connected to a Zenoh router with id b36e252bd2e259ba09a71191e4ac16d8.
56: [ RUN      ] TestParameterClient.async_construction_and_destruction
56: [WARN] [1732008041.637138464] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [WARN] [1732008041.638442336] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [       OK ] TestParameterClient.async_construction_and_destruction (6 ms)
56: [ RUN      ] TestParameterClient.sync_construction_and_destruction
56: [WARN] [1732008041.641346435] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [WARN] [1732008041.642707914] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [       OK ] TestParameterClient.sync_construction_and_destruction (7 ms)
56: [ RUN      ] TestParameterClient.async_parameter_event_subscription
56: [WARN] [1732008041.649653020] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [WARN] [1732008041.651753143] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [WARN] [1732008041.653131845] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [WARN] [1732008041.653563664] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [WARN] [1732008041.653818200] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [       OK ] TestParameterClient.async_parameter_event_subscription (7 ms)
56: [ RUN      ] TestParameterClient.sync_parameter_event_subscription
56: [WARN] [1732008041.656703413] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [WARN] [1732008041.659152440] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [WARN] [1732008041.660844108] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [WARN] [1732008041.661284362] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [WARN] [1732008041.661586007] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [       OK ] TestParameterClient.sync_parameter_event_subscription (7 ms)
56: [ RUN      ] TestParameterClient.sync_parameter_get_parameter
56: [WARN] [1732008041.665374953] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56: [WARN] [1732008041.669218220] [rmw_zenoh_cpp]: `reliability` no longer supported on subscriber. Ignoring...
56:
56: >>> [rcutils|error_handling.c:108] rcutils_set_error_state()
56: This error state is being overwritten:
56:
56:   'Fast CDR exception deserializing message of type rcl_interfaces::srv::dds_::GetParameters_Response_., at /workspace/src/rmw_zenoh/rmw_zenoh_cpp/src/detail/type_support.cpp:133'
56:
56: with this new error message:
56:
56:   'could not deserialize ROS response, at /workspace/src/rmw_zenoh/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp:349'
56:
56: rcutils_reset_error() should be called after error handling to avoid this.
56: <<<
56: [ERROR] [1732008041.863891782] [rclcpp]: executor taking a service client response from service '/ns/test_parameter_client/get_parameters' unexpectedly failed: could not deserialize ROS response, at /
@YuanYuYuan
Copy link
Collaborator Author

YuanYuYuan commented Nov 20, 2024

This could be fixed by #42. The root cause is we need to hold the buffer for a while, otherwise, it would be freed instantly after exiting the function scope.

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

No branches or pull requests

1 participant