Skip to content

Crash during planning if goal is set for the second time #4138

@felixf4xu

Description

@felixf4xu

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I'm convinced that this is not my fault but a bug.

Description

Hi,

I had a crash during planning (using simple simulator) test. I debugged it for 2 days but had no clue, I'd like to seek any help if possible.

Screenshot from 2024-01-31 18-18-19

the route with color is the first route, which is ok.
Then I changed the goal position to the next lane (as show in the picture, just one lane upward), there is a crash.

Expected behavior

no crash

Actual behavior

[component_container_mt-28] *** Aborted at 1706696111 (unix time) try "date -d @1706696111" if you are using GNU date ***
[component_container_mt-28] PC: @                0x0 (unknown)
[component_container_mt-28] *** SIGSEGV (@0x0) received by PID 3051 (TID 0x7f5591ddf640) from PID 0; stack trace: ***
[component_container_mt-28]     @     0x7f554ff98046 (unknown)
[component_container_mt-28]     @     0x7f55adc42520 (unknown)
[component_container_mt-28]     @     0x7f55adc97ef4 pthread_mutex_lock
[component_container_mt-28]     @     0x7f55ad5d4014 eprosima::fastdds::dds::detail::ConditionNotifier::attach_to()
[component_container_mt-28]     @     0x7f55ad5d46ad eprosima::fastdds::dds::detail::WaitSetImpl::attach_condition()
[component_container_mt-28]     @     0x7f55adb11525 rmw_fastrtps_shared_cpp::__rmw_wait()
[component_container_mt-28]     @     0x7f55adb68707 rmw_wait
[component_container_mt-28]     @     0x7f55ae2a7848 rcl_wait
[component_container_mt-28]     @     0x7f55ae4266ac rclcpp::Executor::wait_for_work()
[component_container_mt-28]     @     0x7f55ae4293c3 rclcpp::Executor::get_next_executable()
[component_container_mt-28]     @     0x7f55ae430252 rclcpp::executors::MultiThreadedExecutor::run()
[component_container_mt-28]     @     0x7f55ae0e62b3 (unknown)
[component_container_mt-28]     @     0x7f55adc94ac3 (unknown)
[component_container_mt-28]     @     0x7f55add26850 (unknown)
[component_container_mt-28]     @                0x0 (unknown)

Steps to reproduce

  1. Create a route by setting pose and goal, there should be a planning route displayed.
  2. The "Auto" button is ready
  3. don't change pose, but change goal position
    -> the "Auto" button is disabled
    -> there is a crash log in the terminal, as showed above.

Versions

os: ubuntu 22
ros2: humber
autoware: main branch

Possible causes

From the crash log, it seems some pointer is access but it is not valid.
The call stack is all for ros/dds, I didn't see my code. I can attach GDB to the node, but from gdb/backtrace, I don't see my code in the stack.

If I comment out line 446 of behavior_path_planner_node.cpp

void BehaviorPathPlannerNode::run()

it will not crash but of course autoware will not enter autonomous state either.

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions