Ticket #2128 (closed bug: fixed)
Space leak with :trace
| Reported by: | mnislaih | Owned by: | igloo |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.8 branch |
| Component: | GHCi | Version: | 6.8.2 |
| Keywords: | Cc: | mnislaih@… | |
| Operating System: | MacOS X | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
There is some ugly space behaviour going on with :trace.
I noticed while during a long running debugging session. My program runs for about 30 seconds (under ghci) and then throws a stack overflow exception. It does run in around 64M constant space. While launched under :trace, the space usage grows constantly up to 3.5G, and at this point my system dies, never reaching the exception.
I have been able to replicate using a smaller example.
import Data.List loop x = if x == 0 then 0 : loop 1 else 0 : loop 0 main = print (foldl' (+) 0 (loop 1))
Under ghci 6.8.2, 1) :main runs in 30M constant space, 2) :trace main does not.
Launching ghci with a heap space limit, e.g. +RTS -M300M, makes 2) eventually crash.
Change History
Note: See
TracTickets for help on using
tickets.
