core-dump-handler icon indicating copy to clipboard operation
core-dump-handler copied to clipboard

Capture proc data to be able to generate minidump

Open swermin opened this issue 1 year ago • 4 comments

Let me start by saying that this project has helped me bring core dump related stuff out of process and I love it! The current setup we have is to generate a minidump from a core dump, which we use breakpads core2md

To be able to configure a proper minidump, some data from the /proc/$pid/ folder is needed. I have forked this project and added the changes needed for us to be able to support this flow. What it does is that it checks for a flag to see if needs to include proc info, if does then these steps are taken:

  • Grab the real pid out from the container with the crictl
  • Generate a folder inside the zip file
  • Add all files from proc that are needed

The process is repeated for every container in that pod.

I would love to contribute back this change into this project, is that something you all would be interested in having?

swermin avatar Mar 01 '24 20:03 swermin

That sounds like an excellent feature - thanks for offering to share it back. I need to resolve a side issue with the build system as we have disabled external actions but please open a PR when you are ready and we can start to land it.

No9 avatar Mar 02 '24 00:03 No9

The change is split in two repos, one for the libcrio and one for this repo. I've created a PR for the libcrio part, here is the link: https://github.com/IBM/core-dump-handler/issues/156#issuecomment-1974139747

Second PR, for the actual core dump handler, is coming soon

swermin avatar Mar 06 '24 14:03 swermin

Thanks - I've merged the PR with some additional house keeping around the workflows and released into crates.io as well as tagged in the repo - https://github.com/No9/libcrio/releases/tag/v2.1.0

No9 avatar Mar 06 '24 21:03 No9

Sorry for this taking more time than necessary. I had some trouble getting the whole feature tested well enough before I wanted to start a PR. I think I got a clean enough solution, so I have created this PR: https://github.com/IBM/core-dump-handler/pull/157

Please let me know if there is something that you want changed and I'll do that!

swermin avatar Apr 01 '24 10:04 swermin