Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,345
    • Issues 5,345
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 568
    • Merge requests 568
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #18623
Closed
Open
Issue created Aug 30, 2020 by Benjamin Maurer@cptwunderlichDeveloper

vmem limit causes GHC startup failure

Summary

When setting a virtual memory limit of <1.3GB, GHC wont start with the error:

ghc: failed to create OS thread: Cannot allocate memory

This has led to broken Haskell support in Compiler Explorer ("godbolt"):

https://github.com/compiler-explorer/compiler-explorer/issues/1412

This is probably due to #9706 (closed) "New block-structured heap organization for 64-bit" Other related issues:
#14193 (closed) "Add RTS flag to disable 1TB address space allocation"
#8604 "Some stack/vmem limits (ulimit) combinations causing GHC to fail" \

Steps to reproduce

In a new terminal:

ulimit -v 1258292

Then try to run ghc. In a different, new, terminal, try 1.3GB:

ulimit -v 1363148

Then run ghc which should work.

Or see failure in Compiler Explorer: https://gcc.godbolt.org/z/zKs4a6

Environment

  • GHC version used: 8.6.5, (8.8.3 through stack), Compiler Explorer uses 8.6.1 and 8.6.2

Optional:

  • Operating System: Ubuntu 20.04, Kernel 5.8.0-050800-generic
  • System Architecture: AMD64 (AMD Ryzen 7 4700U)
Edited Sep 11, 2020 by Benjamin Maurer
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking