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

Add pprof to runc-shim #10242

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Add pprof to runc-shim #10242

merged 1 commit into from
Jun 26, 2024

Conversation

henry118
Copy link
Member

Adding pprof capability to containerd-runc-shim-v2.

This makes the shim to expose an additional debugging endpoint when running in DEBUG mode. And users can capture pprof data via ctr:

NAME:
   ctr shim pprof - Provide golang pprof outputs for containerd-shim

USAGE:
   ctr shim pprof command [command options] 

COMMANDS:
   block         Goroutine blocking profile
   goroutines    Dump goroutine stack dump
   heap          Dump heap profile
   profile       CPU profile
   threadcreate  Goroutine thread creating profile
   trace         Collect execution trace
   help, h       Shows a list of commands or help for one command

OPTIONS:
   --help, -h  Show help (default: false)

e.g. To capture the heap profile for the shim hosting container "test":

ctr shim --id test pprof heap >heap.prof 

Copy link
Member

@mxpv mxpv left a comment

Choose a reason for hiding this comment

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

One minor nit, overall LGTM

pkg/shim/shim.go Show resolved Hide resolved
@ZhangShuaiyi
Copy link
Contributor

LGTM

@henry118
Copy link
Member Author

henry118 commented Jun 3, 2024

@mxpv @dmcgowan @estesp Mind taking another look? Feel free to let me know anything required to merge this. Thanks :)

pkg/shim/shim.go Show resolved Hide resolved
Copy link
Member

@dims dims left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Henry Wang <[email protected]>
@estesp
Copy link
Member

estesp commented Jun 26, 2024

/test pull-containerd-node-e2e

@estesp estesp enabled auto-merge June 26, 2024 18:16
@estesp estesp added this pull request to the merge queue Jun 26, 2024
Merged via the queue into containerd:main with commit 5ec7e10 Jun 26, 2024
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants