Closed DL6ER closed 19 hours ago
vforks
are special and are probably unrelated to "real" TCP forks. They may be the consequence of pihole-FTL
calling arp
or any other CLI process - did you observe actual forks (can be seen in the log as 1234/F678
)?
Even with this PR, it is expected that other processes we are calling are considered forks - we don't want to debug, e.g., ip address show
did you observe actual forks
Not within the last 10 hours.
What does this implement/fix?
During #2112, it became an issue that
gdb
is only able to follow one process at a time. This can either be (a) the main process, causing any forks to run unsupervised, or (b) following the new fork, either (b.1) detaching from the main process or (b.2) freezing the main process while the fork is being traced. (a) is the default behavior.All three possibilities are not really what we want. This PR adds a mechanism to detect if the debugger is being attached and - if so - stops forking temporarily until the debugger is again detached. Even when this has a possible performance impact on TCP connections, it allows
gdb
to follow the program closely and will help us to debug crashes only becoming visible in TCP forks.Related issue or feature (if applicable): #2112
Pull request in docs with documentation (if applicable): N/A
By submitting this pull request, I confirm the following:
git rebase
)Checklist:
developmental
branch.