Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.5k
    • Issues 5.5k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 633
    • Merge requests 633
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Analytics
    • Analytics
    • 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
  • #18348

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