Ticket #2185 (reopened run-time performance bug)

Opened 1 year ago

Last modified 3 months ago

Memory leak with parMap

Reported by: igloo Assigned to: simonmar
Priority: normal Milestone: 6.12 branch
Component: Runtime System Version: 6.8.2
Severity: normal Keywords:
Cc: Difficulty: Unknown
Test Case: Operating System: Unknown/Multiple
Architecture: Unknown/Multiple

Description

With the attached All.hs, if you run the program without any arguments (so that it uses parMap rnf in gen_blocks_list) then its memory usage keeps going up, even though at the top level it's just running the same computation 5 times in a row. Memory usage goes up to over 100M.

If you give an argument (any argument, so that it uses map instead) then memory usage is constant and only a few megs.

Happens in 6.8.2 and the HEAD.

Attachments

All.hs (4.8 kB) - added by igloo on 03/29/08 06:42:06.

Change History

03/29/08 06:42:06 changed by igloo

  • attachment All.hs added.

03/29/08 06:44:51 changed by igloo

Forgot to say: Compiling with

ghc -Wall -fforce-recomp All.hs --make -fasm -O2 -threaded -fglasgow-exts -funbox-strict-fields -fbang-patterns -debug

I haven't experimented with other flags.

03/31/08 09:54:00 changed by simonmar

  • owner set to simonmar.
  • milestone changed from 6.8.3 to 6.10 branch.

I think sparks are currently treated as roots by the GC, which is wrong. I won't get around to fixing this in 6.8.3, but I'll do it in the new GC code in 6.10.

06/19/08 04:03:43 changed by simonmar

  • status changed from new to closed.
  • resolution set to fixed.

Now fixed, and I've added the program to our test suite.

07/28/08 01:12:21 changed by simonmar

  • status changed from closed to reopened.
  • component changed from Compiler to Runtime System.
  • resolution deleted.

unfixed. Sparks really should be treated as GC roots, because many uses of par rely on this behaviour (including most of the strategies library).

I don't have any ideas for how to fix this yet.

09/30/08 08:37:30 changed by simonmar

  • architecture changed from Unknown to Unknown/Multiple.

09/30/08 08:51:45 changed by simonmar

  • os changed from Unknown to Unknown/Multiple.

04/12/09 15:20:29 changed by igloo

  • milestone changed from 6.10 branch to 6.12 branch.