Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mrunalp
Copy link
Member

@mrunalp mrunalp commented Aug 12, 2021

This is to aid inspecting memory usage

Signed-off-by: Mrunal Patel [email protected]

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR adds support to get crio heap dumps for inspecting memory usage.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add support for gathering heap dumps

This is to aid inspecting memory usage

Signed-off-by: Mrunal Patel <[email protected]>
@mrunalp mrunalp requested a review from runcom as a code owner August 12, 2021 23:02
@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/feature Categorizes issue or PR as related to a new feature. labels Aug 12, 2021
@openshift-ci openshift-ci bot requested review from giuseppe and rhatdan August 12, 2021 23:02
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 12, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrunalp

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 12, 2021
@codecov
Copy link

codecov bot commented Aug 12, 2021

Codecov Report

Merging #5197 (e37c1f3) into main (78f06f2) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5197      +/-   ##
==========================================
- Coverage   44.27%   44.22%   -0.05%     
==========================================
  Files         112      112              
  Lines       11563    11576      +13     
==========================================
  Hits         5119     5119              
- Misses       5957     5969      +12     
- Partials      487      488       +1     


debug.WriteHeapDump(f.Fd())

if _, err := w.Write([]byte(fmt.Sprintf("Wrote crio heapdump to %q. Please move it to avoid using memory.\n", dumpFilePath))); err != nil {
Copy link

Choose a reason for hiding this comment

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

opt.semgrep.no-printf-in-responsewriter: Detected printf or similar in http.ResponseWriter.write().
This bypasses HTML escaping that prevents cross-site scripting
vulnerabilities. Instead, use the 'html/template' package
to render data to users.

(at-me in a reply with help or ignore)

if enableProfile {
mux.Get("/debug/dumpheap", http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
dumpFilePath := filepath.Join("/tmp", fmt.Sprintf(
"crio-heapdump-%s.out",
Copy link
Member

Choose a reason for hiding this comment

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

Idea: Add a subcommand to crio-status to dump to a specific file location.

@saschagrunert
Copy link
Member

A friendly reminder that this PR had no activity for 30 days.

@saschagrunert saschagrunert added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 28, 2022
@haircommander
Copy link
Member

do we still want this @mrunalp @saschagrunert

@saschagrunert
Copy link
Member

do we still want this @mrunalp @saschagrunert

Yep, I think so! 😊

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 6, 2023

@mrunalp: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/openshift-jenkins/e2e_crun_cgroupv2 e37c1f3 link /test e2e_cgroupv2
ci/prow/ci-rhel-integration e37c1f3 link true /test ci-rhel-integration
ci/prow/ci-cgroupv2-e2e e37c1f3 link true /test ci-cgroupv2-e2e
ci/prow/ci-fedora-integration e37c1f3 link true /test ci-fedora-integration
ci/prow/ci-rhel-critest e37c1f3 link true /test ci-rhel-critest
ci/prow/ci-fedora-critest e37c1f3 link true /test ci-fedora-critest
ci/prow/ci-crun-e2e e37c1f3 link true /test ci-crun-e2e
ci/prow/ci-rhel-e2e e37c1f3 link true /test ci-rhel-e2e
ci/prow/ci-cgroupv2-integration e37c1f3 link true /test ci-cgroupv2-integration
ci/prow/ci-cgroupv2-e2e-crun e37c1f3 link true /test ci-cgroupv2-e2e-crun
ci/prow/ci-e2e e37c1f3 link true /test ci-e2e
ci/prow/ci-e2e-conmonrs e37c1f3 link true /test ci-e2e-conmonrs
ci/prow/ci-cgroupv2-e2e-features e37c1f3 link true /test ci-cgroupv2-e2e-features
ci/prow/e2e-gcp-ovn e37c1f3 link true /test e2e-gcp-ovn

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@sohankunkerkar
Copy link
Member

@cri-o/cri-o-maintainers We still require this. Can we consider opening it as a "good-first-issue" to encourage external contributions?

@haircommander
Copy link
Member

good idea!

@sohankunkerkar
Copy link
Member

Closing this in favor of #7307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants