Troubleshooting
This guide helps you diagnose and fix common issues when using Cerulion RCL Hooks. If you encounter problems, start here before diving into deeper debugging.Verifying Library Loading
The first step in troubleshooting is confirming that the hooks library is actually being loaded by your ROS process.1
Check with lsof
Use You should see a line showing the library file is open. If you don’t see it, the library isn’t loading.
lsof to see if the library is loaded in your process:2
Use LD_DEBUG (advanced)
For detailed library loading information:This shows all library loading activity, which can help identify loading issues.
3
Verify file path
Make sure the path in If the file doesn’t exist, you need to build it first (see Installation Guide).
LD_PRELOAD is correct:4
Check file permissions
Ensure the library file is readable:
Common Issues and Solutions
No hook messages in output
No hook messages in output
Symptoms: ROS node runs, but you don’t see any
[Cerulion Hook] messages.Possible causes:- Library not loading
- Wrong path in
LD_PRELOAD - Library built incorrectly
- Verify the library path is absolute and correct
- Check that the library file exists and is readable
- Try rebuilding the library:
cargo build -p cerulion_rcl_hooks - Use
lsofto confirm the library is loaded
Schema processing failed messages
Schema processing failed messages
Symptoms: You see
[Cerulion Hook] Serialization failed... in the logs (note: this refers to schema processing, not actual serialization since Cerulion doesn’t serialize).Possible causes:- Missing schema for the message type
- Schema doesn’t match message structure
- Incompatible field types
- Check if a schema exists in
schemas_ros2/for your message type - Verify the schema matches your ROS message definition
- Check the error message for specific field that failed
- Create or update the schema file if needed
When processing fails, messages are hijacked and do not continue to ROS subscribers. Make sure you have the correct schema configured for your message type to ensure messages are properly published to Cerulion.
Library not found errors
Library not found errors
Symptoms: Error messages about missing libraries or symbols.Possible causes:
- ROS 2 libraries not in library path
- Missing dependencies
- Architecture mismatch (32-bit vs 64-bit)
- Source your ROS environment:
source /opt/ros/<distro>/setup.bash - Check library dependencies:
ldd libcerulion_rcl_hooks.so - Ensure ROS 2 development packages are installed
- Verify you’re using the correct architecture build
Topics not appearing in Cerulion
Topics not appearing in Cerulion
Symptoms: Hook messages appear, but topics don’t show up in Cerulion.Possible causes:
- Cerulion transport not running
- Network connectivity issues
- Topic filtering in hooks
- Schema issues preventing publication
- Verify Cerulion transport is running and accessible
- Check network connectivity between ROS node and Cerulion
- Review hook logs for schema processing errors
- Confirm the topic has a matching schema
- Check Cerulion logs for connection or reception errors
Performance issues or slowdowns
Performance issues or slowdowns
Symptoms: ROS node runs slower with hooks enabled.Possible causes:
- Using debug build in production
- Large message sizes
- Network latency to Cerulion
- Note: Cerulion doesn’t serialize (unlike ROS 2 which continues to serialize locally), so serialization overhead is not a factor
- Use release build:
target/release/libcerulion_rcl_hooks.so - Check network latency to Cerulion endpoint
- Monitor system resources (CPU, memory, network)
- Consider filtering topics if you don’t need all of them
Process crashes or segfaults
Process crashes or segfaults
Symptoms: ROS node crashes when hooks are enabled.Possible causes:
- Library version mismatch
- Incompatible ROS version
- Memory corruption
- Stack overflow
- Verify ROS 2 version compatibility
- Rebuild hooks library from clean state:
cargo clean && cargo build - Check for core dumps:
dmesg | tailorjournalctl -xe - Try with a different ROS node to isolate the issue
- Report the issue with stack traces if possible
Debugging Techniques
Enable Verbose Logging
The hooks useeprintln! for all diagnostics, which goes to stderr. To capture everything:
debug.log for detailed information.
Verify Library SHA
To confirm you’re using the correct library version:Test with Simple Node
If you’re having issues, test with a simple ROS node first:Check ROS Environment
Ensure your ROS environment is properly set up:Understanding Error Messages
Schema Processing Errors
When you see processing failures (the log message says “Serialization failed” but Cerulion doesn’t actually serialize), the message usually indicates:- Missing field: A field in the schema doesn’t exist in the message
- Type mismatch: Field type doesn’t match between schema and message
- Nested message issue: Problem with a nested message structure
Library Loading Errors
Common library loading issues:- “cannot open shared object file”: File path is wrong or file doesn’t exist
- “undefined symbol”: Missing dependency or version mismatch
- “wrong ELF class”: Architecture mismatch (32-bit vs 64-bit)
Network Errors
If Cerulion can’t be reached:- Check Cerulion transport is running
- Verify network connectivity
- Check firewall rules
- Confirm endpoint configuration
Getting Help
If you’ve tried the solutions above and still have issues:-
Collect information:
- Full error messages
- Hook log output
- ROS version and distribution
- Library build information
- Steps to reproduce
- Check existing issues: Look for similar problems in issue trackers or forums
- Report the issue: Include all collected information when reporting
Prevention Tips
Use Release Builds
Always use release builds in production for better performance
Test First
Test with simple nodes before using with complex applications
Monitor Logs
Regularly check hook logs to catch issues early
Keep Updated
Rebuild hooks when updating ROS or Cerulion versions
Next Steps
If you’ve resolved your issue or want to learn more:- Review the Overview for conceptual understanding
- Check the Usage Guide for best practices
- Learn about adding custom schemas for your message types