-
Notifications
You must be signed in to change notification settings - Fork 3.4k
bugtool: Fix pprof default ports #21497
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
bugtool: Fix pprof default ports #21497
Conversation
Forgot to update command reference, I'll fix it. |
gops and pprof do not use the same protocol to collect profile data. Thus, the default port for pprof debug endpoints in `cilium-bugtool` should not be the one used for gops, but the default one for pprof itself. Besides, clustermesh-apiserver does not support pprof yet, but only gops. Thus, the help message for the pprof port option in cilium-bugtool is fixed accordingly. Fixes: #416319b1cd (bugtool: Default to the agent's gops port) Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
d015a7f
to
9e1917d
Compare
/test |
/test-1.16-4.9 Job 'Cilium-PR-K8s-1.25-kernel-net-next' failed: Click to show.Test Name
Failure Output
If it is a flake and a GitHub issue doesn't already exist to track it, comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find. I always get confused between gops and pprof for some reason.
/test-1.25-net-next Job 'Cilium-PR-K8s-1.25-kernel-net-next' failed: Click to show.Test Name
Failure Output
If it is a flake and a GitHub issue doesn't already exist to track it, comment |
Test failures are unrelated, reviews are in, marking ready to merge. |
gops
andpprof
do not use neither the same protocol nor the same port to collect profile data.When
cilium-bugtool
queries the gops server embedded in the agent, it collects the data calling the gops cli from the shell, without passing any extra port argument: https://github.com/cilium/cilium/blob/master/bugtool/cmd/root.go#L499-L506Instead, when querying the
pprof
debug endpoints,cilium-bugtool
should use the proper agent default pprof port: https://github.com/cilium/cilium/blob/master/bugtool/cmd/root.go#L478-L497This PR changes the default port for pprof endpoints in
cilium-bugtool
to be the same default port set in the agent, even if pprof support is disabled by default in the agent.Besides, clustermesh-apiserver does not support pprof yet, but only gops. Thus, the help message for the pprof port option in cilium-bugtool is fixed accordingly.
Fixes: #17004