-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syslog ng ctl attach debugger #327
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bazsi
force-pushed
the
syslog-ng-ctl-attach-debugger
branch
3 times, most recently
from
October 12, 2024 20:01
cd645a3
to
acc366e
Compare
bazsi
changed the title
WIP: Syslog ng ctl attach debugger
Syslog ng ctl attach debugger
Oct 13, 2024
bazsi
force-pushed
the
syslog-ng-ctl-attach-debugger
branch
2 times, most recently
from
October 27, 2024 11:40
ca8b036
to
e058b86
Compare
bazsi
force-pushed
the
syslog-ng-ctl-attach-debugger
branch
from
November 7, 2024 10:50
e058b86
to
17a2e2e
Compare
Merged
The tracer is responsible with the communication between the debugger thread and any worker threads. Up to this point this was not cancellable, e.g. once a breakpoint fired, the worker stopped with no way of cancelling this. With the addition to tracer_cancel() pending breakpoints are let go and at the same time tracer_wait_for_breakpoint() returns as well with a gboolean to indicate whether it was cancelled. Signed-off-by: Balazs Scheidler <[email protected]>
The new debugger_exit() can be called from any thread, triggers the cancellation of the tracer and then waits for the debugger thread to finish. Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
…manner The debugger installed the pipe_single_step_hook without locking, but that only works if we do that at startup. Since I want to be able to start the debugger on demand, this needs to sync with any workers that might be executing. On x86 it might be safe to just store the pointer, but other less forgiving architectures (e.g. ARM) may not like that. Let's do this properly. Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
…un from the main thread Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
The key ingredient to support multi-threaded debugger session is to allow the breakpoint sites to submit debugger_stop_on_breakpoint() calls in parallel so that these requests are queued and no variables are used for the different invocations. The solution is to introduce the BreakpointSite struct, this is where we store state that relates to each distinct breakpoint events. This struct contains both the state the debugger may want to inspect (e.g. msg, pipe) and also the state related to inter-thread communication (e.g. resume_requested). Each such site instances are queued in an internal queue which is then processed by the interactive debugger. Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
alltilla
force-pushed
the
syslog-ng-ctl-attach-debugger
branch
from
November 7, 2024 14:55
17a2e2e
to
6e93568
Compare
alltilla
reviewed
Nov 12, 2024
I have found a crash:
|
alltilla
approved these changes
Nov 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a continuation of #326 to add interactive debugger functionality over syslog-ng-ctl