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

Disable Linux core dumps #69

Merged
merged 1 commit into from
Oct 17, 2019
Merged

Conversation

rmpalomino
Copy link
Contributor

  • Add ulimit -c 0 command to prevent core dumps from being written to /tmp
  • Move setting of ERL_CRASH_DUMP (crash dump mitigation) to new block with core dump mitigation

This looks like it resolves #68, in the sense that core dumps don't accumulate and take up disk space. I'm not sure if there is a fix for the pthread issue.

* Add ulimit -c 0 command to prevent core dumps from being written to /tmp
* Move setting of ERL_CRASH_DUMP (crash dump mitigation) to new block with core dump mitigation
@motobob
Copy link
Contributor

motobob commented Oct 16, 2019

in some cases we need those, e.g. bunch of NIFs used. so need mean of configuring at build time.

@rmpalomino
Copy link
Contributor Author

@motobob I didn't make it configurable since I thought it fell into the same class as the Erlang crash dumps. Those are not configurable as far as I can tell. How would I make this configurable at build time? I think I see how I could make it configurable at run time, like the CODE_LOADING_MODE setting.

@motobob
Copy link
Contributor

motobob commented Oct 17, 2019

yes, like CODE_LOADING_MODE

@nalundgaard
Copy link

@motobob to be honest, I think you should merge this, but leave #68 open so that we can follow up with a feature to conditionally enable storage of core/crash dumps as a separate PR. It also should be documented that, as per this comment in leo-project/leofs#843, that Erlang/OTP appears to have some potential issues with being used in AWS Lambda—so that, independent of any features in an author's code, they may get crashes in the Erlang VM when thawing a running container.

@motobob
Copy link
Contributor

motobob commented Oct 17, 2019

@nalundgaard as you noted this has nothing to do with pthread issue but fixes only coredumps.

what is wrong with my ask to make this setting configurable? There are workloads which will benefit from having the core files nearby.

I'm still confused how AWS is not killing the container after a coredump and lets it handle more invokes but that's separate.

@motobob motobob merged commit eec4b0e into alertlogic:master Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Runtime issues: pthread and awk error writing to stdout
3 participants