Skip to content

Commit

Permalink
docs: add simple guidance for locating died process with gdb tool (#420)
Browse files Browse the repository at this point in the history
* docs: add simple guidance to locate died process with gdb tool

Signed-off-by: Tier4Guan <[email protected]>

* docs: fix typos

Signed-off-by: Tier4Guan <[email protected]>

---------

Signed-off-by: Tier4Guan <[email protected]>
  • Loading branch information
Tier4Guan authored Dec 29, 2023
1 parent b08fccb commit 1cfd744
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docs/support/troubleshooting/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,41 @@ If you have any of these symptoms, please the [Performance Troubleshooting](perf
When running the Planning Simulator, the most common reason for the map not being displayed in RViz is because [the map path has not been specified correctly in the launch command](../../tutorials/ad-hoc-simulation/planning-simulation.md#how-to-run-a-planning-simulation). You can confirm if this is the case by searching for `Could not find lanelet map under {path-to-map-dir}/lanelet2_map.osm` errors in the log.

Another possible reason is that map loading is taking a long time due to poor DDS performance. For this, please visit the [Performance Troubleshooting](performance-troubleshooting.md) page.

### Died process issues

Some modules may not be launched properly at runtime, and you may see "process has died" in your terminal.
You can use the gdb tool to locate where the problem is occurring.

Debug build the module you wish to analyze under your autoware workspace

```bash
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Debug --packages-up-to <the modules you wish to analyze> --catkin-skip-building-tests --symlink-install
```

In this state, when a died process occurs when you run the autoware again, a core file will be created.
Remeber to remove the size limit of the core file.

```bash
ulimit -c unlimited
```

Rename the core file as `core.<PID>`.

```bash
echo core | sudo tee /proc/sys/kernel/core_pattern
echo -n 1 | sudo tee /proc/sys/kernel/core_uses_pid
```

Launch the autoware again. When a died process occurs, a core file will be created.
`ll -ht` helps you to check if it was created.

Invoke gdb tool.

```bash
gdb <executable file> <core file>
#You can find the `<executable file>` in the error message.
```

`bt` backtraces the stack of callbacks where a process dies.
`f <frame number>` shows you the detail of a frame, and `l` shows you the code.

0 comments on commit 1cfd744

Please sign in to comment.