Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,322
    • Issues 4,322
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 356
    • Merge Requests 356
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #18623

Closed
Open
Opened 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
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#18623