Git Product home page Git Product logo

Comments (8)

clalancette avatar clalancette commented on June 25, 2024

This may be related to #178, #192, and #215

from rclpy.

wjwwood avatar wjwwood commented on June 25, 2024

guard condition handle implementation '�[�'(0x7f553e777db0)

Ouch, that looks like either uninitialized memory or use after free...

from rclpy.

sloretz avatar sloretz commented on June 25, 2024

@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 avatar clalancette commented on June 25, 2024

@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.

ivanpauno avatar ivanpauno commented on June 25, 2024

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.

dirk-thomas avatar dirk-thomas commented on June 25, 2024

@ivanpauno Your posted snippet doesn't contain any exception byond the KeyboardInterrupt which is expected if you SIGINT the process.

from rclpy.

ivanpauno avatar ivanpauno commented on June 25, 2024

@ivanpauno Your posted snippet doesn't contain any exception byond the KeyboardInterrupt which is expected if you SIGINT the process.

Ok, I read badly the issue description. I expected a nicer message when you cntrl+c a node.

from rclpy.

dirk-thomas avatar dirk-thomas commented on June 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.