Skip to content

Commit 8e155e3

Browse files
committed
Add note about not being able to debug forks using gdb
Signed-off-by: DL6ER <[email protected]>
1 parent eb98c6c commit 8e155e3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/ftldns/debugging.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ This guide will show you how to use `gdb` to debug `pihole-FTL`.
55

66
Once you are used to it, you can skip most of the steps. Debugging *FTL*DNS is quite easy. `pihole-FTL` has been designed so that a debugger can be attached to an already running process. This will give you insights into how software (not limited to `pihole-FTL`) works.
77

8+
!!! note "Debugging parallelized applications"
9+
There is one fundamental drawback when it comes to using `gdb` for debugging parallelized applications: `pihole-FTL` uses both threads and forks. When DNS queries are processed on dedicated (long-lived) TCP connections, `pihole-FTL` forks a new process to handle the query but `gdb` does not follow the forked process. This means that you will not be able to capture crashes that occur in forked processes. However, most crashes occur in the main process, so this limitation is not as severe as it might sound.
10+
811
<!-- markdownlint-disable code-block-style -->
912
!!! info "When running Pi-hole in a Docker container"
1013
If you are running Pi-hole in a Docker container, you will need to perform all the steps described here *inside* the Docker container. You can use, e.g., `docker exec -it <container_name> /bin/bash` to get a shell inside the container.

0 commit comments

Comments
 (0)