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

Always coredump on crash if we're allowed to #1327

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

JakeSiFive
Copy link
Contributor

This change should just set the limit on the core size to what ever the maximum allowed is. When the size is 0 (often the default on various systems) no core dump will be produced.

tools/wake/main.cpp Outdated Show resolved Hide resolved
@JakeSiFive JakeSiFive merged commit f79c1d9 into master Jun 29, 2023
12 checks passed
@JakeSiFive JakeSiFive deleted the always_dump_core_if_possible branch June 29, 2023 16:14
// Make sure we always get core dumps but don't fail
// if that fails for some reason.
struct rlimit core_lim;
getrlimit(RLIMIT_CORE, &core_lim);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if we should restore the original limit after we next fork() (where ever that might be), as here we enable core dumps for all payload commands run inside wakebox

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not personally very apposed to getting core dumps for everything but if people want that I can make shim-wake reset the limit or reset it just before invoking shim wake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants