Comments (8)
This may be related to #178, #192, and #215
from rclpy.
guard condition handle implementation '�[�'(0x7f553e777db0)
Ouch, that looks like either uninitialized memory or use after free...
from rclpy.
@clalancette if you still have this workspace would you mind checking if this is still an issue now that #288 has been merged?
from rclpy.
@clalancette if you still have this workspace would you mind checking if this is still an issue now that #288 has been merged?
I've had to switch to an 18.04 workspace now. Also note that I built from the latest master. The result of the test is that I haven't seen the corruption again, but things still don't actually work with this test.
When I run ros2 launch topic_monitor depth_demo.launch.py
, things start off pretty well:
[INFO] [data_publisher-1]: process started with pid [23777]
[INFO] [data_publisher-2]: process started with pid [23778]
[INFO] [data_publisher-3]: process started with pid [23779]
[INFO] [data_publisher-4]: process started with pid [23780]
[data_publisher-1] [INFO] [small_depth_1_data_pub]: Reliability: reliable
[data_publisher-1] [INFO] [small_depth_1_data_pub]: History: keep last
[data_publisher-1] [INFO] [small_depth_1_data_pub]: Depth: 1
[data_publisher-1] [INFO] [small_depth_1_data_pub]: Durability: volatile
[data_publisher-1] [INFO] [small_depth_1_data_pub]: Publishing on topic: small_depth_1_data
[data_publisher-1] [INFO] [small_depth_1_data_pub]: Payload size: 0
[data_publisher-1] [INFO] [small_depth_1_data_pub]: Publishing: "0"
[data_publisher-2] [INFO] [small_depth_50_data_pub]: Reliability: reliable
[data_publisher-4] [INFO] [large_depth_50_data_pub]: Reliability: reliable
[data_publisher-2] [INFO] [small_depth_50_data_pub]: History: keep last
[data_publisher-4] [INFO] [large_depth_50_data_pub]: History: keep last
[data_publisher-2] [INFO] [small_depth_50_data_pub]: Depth: 50
[data_publisher-4] [INFO] [large_depth_50_data_pub]: Depth: 50
[data_publisher-2] [INFO] [small_depth_50_data_pub]: Durability: volatile
[data_publisher-4] [INFO] [large_depth_50_data_pub]: Durability: volatile
[data_publisher-2] [INFO] [small_depth_50_data_pub]: Publishing on topic: small_depth_50_data
[data_publisher-4] [INFO] [large_depth_50_data_pub]: Publishing on topic: large_depth_50_data
[data_publisher-4] [INFO] [large_depth_50_data_pub]: Payload size: 100000
[data_publisher-2] [INFO] [small_depth_50_data_pub]: Payload size: 0
[data_publisher-4] [INFO] [large_depth_50_data_pub]: Publishing: "0"
[data_publisher-2] [INFO] [small_depth_50_data_pub]: Publishing: "0"
[data_publisher-3] [INFO] [large_depth_1_data_pub]: Reliability: reliable
[data_publisher-3] [INFO] [large_depth_1_data_pub]: History: keep last
[data_publisher-3] [INFO] [large_depth_1_data_pub]: Depth: 1
[data_publisher-3] [INFO] [large_depth_1_data_pub]: Durability: volatile
[data_publisher-3] [INFO] [large_depth_1_data_pub]: Publishing on topic: large_depth_1_data
[data_publisher-3] [INFO] [large_depth_1_data_pub]: Payload size: 100000
[data_publisher-3] [INFO] [large_depth_1_data_pub]: Publishing: "0"
[data_publisher-1] [INFO] [small_depth_1_data_pub]: Publishing: "1"
[data_publisher-4] [INFO] [large_depth_50_data_pub]: Publishing: "1"
[data_publisher-2] [INFO] [small_depth_50_data_pub]: Publishing: "1"
[data_publisher-3] [INFO] [large_depth_1_data_pub]: Publishing: "1"
[data_publisher-1] [INFO] [small_depth_1_data_pub]: Publishing: "2"
[data_publisher-4] [INFO] [large_depth_50_data_pub]: Publishing: "2"
[data_publisher-2] [INFO] [small_depth_50_data_pub]: Publishing: "2"
[data_publisher-3] [INFO] [large_depth_1_data_pub]: Publishing: "2"
However, when I kill it with Ctrl-C, things get ugly:
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[data_publisher-3] [INFO] [large_depth_1_data_pub]: Publishing: "-1"
[data_publisher-3] Traceback (most recent call last):
[data_publisher-3] File "/home/ubuntu/ros2_ws/install/topic_monitor/lib/topic_monitor/data_publisher", line 11, in <module>
[data_publisher-3] load_entry_point('topic-monitor==0.6.2', 'console_scripts', 'data_publisher')()
[data_publisher-3] File "/home/ubuntu/ros2_ws/install/topic_monitor/lib/python3.6/site-packages/topic_monitor/scripts/data_publisher.py", line 117, in main
[data_publisher-3] sleep(args.period)
[data_publisher-3] KeyboardInterrupt
[ERROR] [data_publisher-1]: process has died [pid 23777, exit code 1, cmd '/home/ubuntu/ros2_ws/install/topic_monitor/lib/topic_monitor/data_publisher small_depth_1 --depth 1 --payload-size 0'].
[ERROR] [data_publisher-2]: process has died [pid 23778, exit code 1, cmd '/home/ubuntu/ros2_ws/install/topic_monitor/lib/topic_monitor/data_publisher small_depth_50 --depth 50 --payload-size 0'].
[ERROR] [data_publisher-3]: process has died [pid 23779, exit code 1, cmd '/home/ubuntu/ros2_ws/install/topic_monitor/lib/topic_monitor/data_publisher large_depth_1 --depth 1 --payload-size 100000'].
[ERROR] [data_publisher-4]: process has died [pid 23780, exit code 1, cmd '/home/ubuntu/ros2_ws/install/topic_monitor/lib/topic_monitor/data_publisher large_depth_50 --depth 50 --payload-size 100000'].
[data_publisher-2] [INFO] [small_depth_50_data_pub]: Publishing: "-1"
[data_publisher-2] Traceback (most recent call last):
[data_publisher-2] File "/home/ubuntu/ros2_ws/install/topic_monitor/lib/topic_monitor/data_publisher", line 11, in <module>
[data_publisher-2] load_entry_point('topic-monitor==0.6.2', 'console_scripts', 'data_publisher')()
[data_publisher-2] File "/home/ubuntu/ros2_ws/install/topic_monitor/lib/python3.6/site-packages/topic_monitor/scripts/data_publisher.py", line 117, in main
[data_publisher-2] sleep(args.period)
[data_publisher-2] KeyboardInterrupt
[data_publisher-1] [INFO] [small_depth_1_data_pub]: Publishing: "-1"
[data_publisher-1] Traceback (most recent call last):
[data_publisher-1] File "/home/ubuntu/ros2_ws/install/topic_monitor/lib/topic_monitor/data_publisher", line 11, in <module>
[data_publisher-1] load_entry_point('topic-monitor==0.6.2', 'console_scripts', 'data_publisher')()
[data_publisher-1] File "/home/ubuntu/ros2_ws/install/topic_monitor/lib/python3.6/site-packages/topic_monitor/scripts/data_publisher.py", line 117, in main
[data_publisher-1] sleep(args.period)
[data_publisher-1] KeyboardInterrupt
[data_publisher-4] [INFO] [large_depth_50_data_pub]: Publishing: "-1"
[data_publisher-4] Traceback (most recent call last):
[data_publisher-4] File "/home/ubuntu/ros2_ws/install/topic_monitor/lib/topic_monitor/data_publisher", line 11, in <module>
[data_publisher-4] load_entry_point('topic-monitor==0.6.2', 'console_scripts', 'data_publisher')()
[data_publisher-4] File "/home/ubuntu/ros2_ws/install/topic_monitor/lib/python3.6/site-packages/topic_monitor/scripts/data_publisher.py", line 117, in main
[data_publisher-4] sleep(args.period)
[data_publisher-4] KeyboardInterrupt
The topic monitor itself is much worse. I run ros2 run topic_monitor topic_monitor
(with the above demo already running), and it just seems to hang completely. When I hit Ctrl-C, I get this:
^CTraceback (most recent call last):
File "/home/ubuntu/ros2_ws/install/topic_monitor/lib/python3.6/site-packages/topic_monitor/scripts/topic_monitor.py", line 420, in main
while data_receiving_thread.isAlive():
File "/usr/lib/python3.6/threading.py", line 1115, in is_alive
self._wait_for_tstate_lock(False)
File "/usr/lib/python3.6/threading.py", line 1062, in _wait_for_tstate_lock
def _wait_for_tstate_lock(self, block=True, timeout=-1):
KeyboardInterrupt
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/ros2_ws/install/topic_monitor/lib/topic_monitor/topic_monitor", line 11, in <module>
load_entry_point('topic-monitor==0.6.2', 'console_scripts', 'topic_monitor')()
File "/home/ubuntu/ros2_ws/install/topic_monitor/lib/python3.6/site-packages/topic_monitor/scripts/topic_monitor.py", line 431, in main
data_receiving_thread.stop()
File "/home/ubuntu/ros2_ws/install/topic_monitor/lib/python3.6/site-packages/topic_monitor/scripts/topic_monitor.py", line 312, in stop
self.node.destroy_node()
AttributeError: 'DataReceivingThread' object has no attribute 'node'
[INFO] [topic_monitor]: Subscribing to topic: /large_depth_1_data
[INFO] [topic_monitor]: Publishing reception rate on topic: reception_rate/large_depth_1_data_
[INFO] [topic_monitor]: Subscribing to topic: /large_depth_50_data
[INFO] [topic_monitor]: Publishing reception rate on topic: reception_rate/large_depth_50_data_
[INFO] [topic_monitor]: Subscribing to topic: /small_depth_1_data
[INFO] [topic_monitor]: Publishing reception rate on topic: reception_rate/small_depth_1_data_
[INFO] [topic_monitor]: Subscribing to topic: /small_depth_50_data
[INFO] [topic_monitor]: Publishing reception rate on topic: reception_rate/small_depth_50_data_
[INFO] [topic_monitor]: /large_depth_50_data: 9
[INFO] [topic_monitor]: /small_depth_50_data: 9
[INFO] [topic_monitor]: /large_depth_1_data: 9
[INFO] [topic_monitor]: /small_depth_1_data: 9
[INFO] [topic_monitor]: /large_depth_50_data: 10
[INFO] [topic_monitor]: /small_depth_50_data: 10
[INFO] [topic_monitor]: /large_depth_1_data: 10
[INFO] [topic_monitor]: /small_depth_1_data: 10
[INFO] [topic_monitor]: /large_depth_50_data: 11
[INFO] [topic_monitor]: /small_depth_50_data: 11
[INFO] [topic_monitor]: /large_depth_1_data: 11
[INFO] [topic_monitor]: /small_depth_1_data: 11
[INFO] [topic_monitor]: /large_depth_50_data: 12
[INFO] [topic_monitor]: /small_depth_50_data: 12
[INFO] [topic_monitor]: /large_depth_1_data: 12
[INFO] [topic_monitor]: /small_depth_1_data: 12
That is, it looks like it doesn't actually start receiving data until I kill something off. At this point, topic_monitor
is unkillable with Ctrl-C; I have to manually kill it off with a signal.
from rclpy.
Same issue when doing cntrl+c
in action server example.
Traceback (most recent call last):
File "fibonacci_action_server.py", line 64, in <module>
main()
File "fibonacci_action_server.py", line 60, in main
rclpy.spin(fibonacci_action_server)
File "C:\dev\ros2\install\Lib\site-packages\rclpy\__init__.py", line 185, in spin
executor.spin_once()
File "C:\dev\ros2\install\Lib\site-packages\rclpy\executors.py", line 663, in spin_once
handler, entity, node = self.wait_for_ready_callbacks(timeout_sec=timeout_sec)
File "C:\dev\ros2\install\Lib\site-packages\rclpy\executors.py", line 649, in wait_for_ready_callbacks
return next(self._cb_iter)
File "C:\dev\ros2\install\Lib\site-packages\rclpy\executors.py", line 549, in _wait_for_ready_callbacks
_rclpy.rclpy_wait(wait_set, timeout_nsec)
KeyboardInterrupt
from rclpy.
@ivanpauno Your posted snippet doesn't contain any exception byond the KeyboardInterrupt
which is expected if you SIGINT
the process.
from rclpy.
@ivanpauno Your posted snippet doesn't contain any exception byond the
KeyboardInterrupt
which is expected if youSIGINT
the process.
Ok, I read badly the issue description. I expected a nicer message when you cntrl+c
a node.
from rclpy.
Since the reported crash seems to be fixed I will close this ticket.
@ivanpauno Please feel free to create a PR to catch the KeyboardInterrupt
in the specific executables to avoid showing it to the user.
from rclpy.
Related Issues (20)
- Humble has higher CPU usage compared to Foxy HOT 15
- Service Client wait_for_service incorrectly returns True HOT 4
- Ros2 Humble is installed on the Ubuntu 22.04 but I get error for no module named rclpy._rclpy_pybind11 while the package is installed (also rclpy is installed for Python 3.10 not Python 3.11) HOT 7
- Exception when instantiating ActionServer as part of ROS package tests HOT 2
- CMake Error (Non-existent Path) When Building From Source HOT 4
- Cannot log in ROS2 node after building with cython HOT 6
- ReadtheDocs page is missing a lot of documentation for API. HOT 5
- SIGINT signal on parent not terminated Turtlesim GUI application HOT 1
- ros2 topic HZ option is not predictable for report freq values when using default rmw_fastrtps_cpp rmw implementation HOT 3
- MultiThreadExecutor may throw exception after destroying subscription with non-default callback group
- Failed to send request: cannot publish data HOT 5
- Lifecycle node `Transition is not registered` exception kills node HOT 1
- debian12 humble source build: invalid use of incomplete type ‘PyFrameObject’
- failed to create domain error when spawning many python nodes at once from launch file with cyclonedds HOT 3
- Only hold weak internal reference to callbacks HOT 1
- Opinion: MultiThreadedExecutor should not raise exceptions if the Task's exception was retrieved HOT 3
- xmlrpc.client.Fault: <Fault 1: "<class 'RuntimeError'>:!rclpy.ok()"> HOT 5
- [design question] get_parameter exception choice HOT 5
- Timer hanging and high CPU load when using MultiThreadedExecutor HOT 18
- rclpy._rclpy_pybind11 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rclpy.