Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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 4,838
    • Issues 4,838
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 452
    • Merge requests 452
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #18348

Closed
Open
Created Jun 17, 2020 by jberryman@trac-jberryman

Leak of stgMallocBytes when using +RTS -h -i0.0001 on non-profile build

On ghc 8.10.1

I noticed this much more dramatically in a large application. To reproduce:

repro.hs :

module Main where

import Control.Concurrent
import System.Mem
import Control.Monad

main :: IO ()
main = do
    forM_ [1..60] $ \_-> do
        performGC
        threadDelay (500*1000)
    putStrLn "performGC and pause"
    performGC
    threadDelay $ 10*1000*1000

Compile with

$ ghc -O1 -fforce-recomp -threaded -rtsopts repro

Run with

heaptrack ./repro +RTS -i0.0001 -h

I can observe RES reported by top increasing. heaptrack reports leaked allocations.

heaptrack_repro

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking