Skip to content

Question regarding multiple node handles associates with the same timer handle #35

@mamariomiamo

Description

@mamariomiamo

When I was processing one of the collected trace using the example callback_duration.ipynb, I had following error:

Traceback (most recent call last):
  File "/workspace/build/tracetools_analysis/tracetools_analysis/utils/ros2.py", line 297, in get_callback_owner_info
    info = self.get_timer_handle_info(reference)
  File "/workspace/build/tracetools_analysis/tracetools_analysis/utils/ros2.py", line 330, in get_timer_handle_info
    node_handle_info = self.get_node_handle_info(node_handle)
  File "/workspace/build/tracetools_analysis/tracetools_analysis/utils/ros2.py", line 485, in get_node_handle_info
    if node_handle not in self.data.nodes.index:
  File "/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/base.py", line 5358, in __contains__
    hash(key)
TypeError: unhashable type: 'Series'

After some debugging, it seems like following line returns a Series object instead of an Int. When print out it looks like following (The second column is the actual node handle value):

node handle:
timer_handle
140715477875168    94228934197408
140715477875168    94228934197408
140715477875168    94228934197408
140715477875168    94228934197408
140715477875168    94228934197408
                        ...      
140715477875168    94228934197408
140715477875168    94228934197408
140715477875168    94228934197408
140715477875168    94228934197408
140715477875168    94228934197408
Name: node_handle, Length: 116, dtype: int64

https://github.com/ros-tracing/tracetools_analysis/blob/rolling/tracetools_analysis/tracetools_analysis/utils/ros2.py#L333
Question would be:

  1. Is it normal to have duplicates of node handles in the timer_node_links
  2. If yes, should this part of logic be handled better?
  3. If no, does this indicate something wrong with my current deployment?

Sorry if this question is too general/broad and I would try to provide more information if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions