Skip to content
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

debugging: adding a script and instructions for debugging the GO shim #9585

Merged
merged 1 commit into from May 14, 2024

Conversation

littlejawa
Copy link
Contributor

@littlejawa littlejawa commented May 2, 2024

This PR provides some developer's documentation and a helper script that makes it easier to use a debugger on the go shim.

NOTE: This PR doesn't address runtime-rs, it will come with a future commit.
Now the script provided here will probably be useful for runtime-rs too, as most of it is related to the shim's behavior, dictated by the shimv2 interface.
My expectation at this point is that the same script should be usable for both shims.

@littlejawa littlejawa requested a review from a team as a code owner May 2, 2024 13:22
@katacontainersbot katacontainersbot added the size/large Task of significant size label May 2, 2024
@littlejawa
Copy link
Contributor Author

@gkurz - FYI

Still WIP as I need to provide instructions for containerd, but comments are welcome at this point :-)

@littlejawa littlejawa changed the title [WIP] debugging: adding a script and instructions for debugging the GO shim debugging: adding a script and instructions for debugging the GO shim May 6, 2024
@littlejawa
Copy link
Contributor Author

Updated instructions. Now ready for review.

```

Note that we are providing a regular expression to filter the name of the binary.
This is to make sure that the deubgger attaches to the runtime shim, and not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/deubgger/debugger

Copy link
Member

@beraldoleal beraldoleal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @littlejawa this is really welcome. Thanks!

My only suggestion is to move it to its own file, something like DEBUG-GOSHIM.md and make reference to it in the Developer Guide. Otherwise the guide it will be really extensive.

@gkurz
Copy link
Member

gkurz commented May 13, 2024

Hi @littlejawa this is really welcome. Thanks!

My only suggestion is to move it to its own file, something like DEBUG-GOSHIM.md and make reference to it in the Developer Guide. Otherwise the guide it will be really extensive.

I like the idea as docs/Developer-Guide.md is big enough already.

@littlejawa can you do that please ?

@littlejawa
Copy link
Contributor Author

Hi @littlejawa this is really welcome. Thanks!
My only suggestion is to move it to its own file, something like DEBUG-GOSHIM.md and make reference to it in the Developer Guide. Otherwise the guide it will be really extensive.

I like the idea as docs/Developer-Guide.md is big enough already.

@littlejawa can you do that please ?

Sure. I actually hesitated when doing it, so I'm fine with it.
I think we shouldn't name it "goshim" though, as I expect the rust debugging setup to be pretty similar. Both will probably end up in the same doc, if and when we document the rust side.

docs/Debug-shim-guide.md Outdated Show resolved Hide resolved
docs/Debug-shim-guide.md Outdated Show resolved Hide resolved
@littlejawa littlejawa force-pushed the debugging_the_runtime branch 5 times, most recently from a43501d to 0e157c7 Compare May 14, 2024 09:02
Using a debugger with the kata runtime is complicated, but it can be done
and can be very useful.

This commits provides a helper script that simplifies it, and updates
the developper's documentation to explain how to use it.

Signed-off-by: Julien Ropé <jrope@redhat.com>
@littlejawa
Copy link
Contributor Author

Ok... Spell check is happy now :)

@gkurz
Copy link
Member

gkurz commented May 14, 2024

/test

Copy link
Member

@gkurz gkurz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @littlejawa !

@gkurz gkurz merged commit f14a133 into kata-containers:main May 14, 2024
293 of 303 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test size/large Task of significant size
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants