commercialhaskell / commercialhaskell/stack

Provide option to treat SIGKILL as out of memory

Open
#3,399 0 comments 1 reaction 0 assignees View on GitHub
component: build type: enhancement
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

This was discussed a while ago as default behavior, and (rightfully) determined to be a bad idea. I'm opening this now as a command line option.

Problem: when running builds on Travis CI in particular, often times parallel builds will result in large packages (haskell-src-exts or store, for instance) failing due to out of memory. On Linux, OOM is indistinguishable from SIGKILL. The current solution is to modify the Travis config to build those packages first so they have enough memory to complete, and _then_ build everything else.

Solution: as a flag, e.g. `--sigkill-as-oom`, which has the following behavior: if a `Setup build` step fails because the process exits with SIGKILL, reschedule the build to happen again, but block all other jobs from happening at the same time. In other words, all current work will complete, and then `Setup build` will be tried again. If _that_ fails, then we give up.

This will allow Travis builds (which will never have an intentional SIGKILL sent) to automatically retry large packages, and local users will still be able to kill their jobs.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.