Ticket #7211 (closed bug: invalid)

Opened 10 months ago

Last modified 9 months ago

Huge space leak on a program that shouldn't leak

Reported by: bartavelle Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.4.2
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Runtime performance bug Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I have a program that works in a small amount of memory on a computer (less than 50mb) and leaks until it takes all available memory on another (with 16GB RAM).

I am unsure if this is a compiler bug, or a bug in one of the packages I use. I am also unsure on how to diagnose it.

You will find attached the ghc-pkg list for both computers, the offending program, and the output of -hp and -hy for the offending case. To reproduce the test it should be used like that :

genstats-simplepatterns dictionary output

Where dictionary is a large text file with a word per line (such as the rockyou list). The program itself is a fold that compiles statistics for each input line.

The "good" program is built with GHC-7.4.1. The bad one used to be built with it. As I suspected a package problem, I cleaned all my installation and started with a fresh GHC-7.4.2 + latest Haskell platform, but the result was identical.

The space leak seems to occur in HashMap?, but converting all instances into Data.Map results in another leak.

Attachments

package.bad Download (1.6 KB) - added by bartavelle 10 months ago.
List of packages for the "bad" program.
package.good Download (1.9 KB) - added by bartavelle 10 months ago.
List of packages for the "good" program.
genstats-simplepatterns.hs Download (5.5 KB) - added by bartavelle 10 months ago.
Faulty program.
patternstats-simple.hr.hp Download (47.0 KB) - added by bartavelle 10 months ago.
output of -hr
patternstats-simple.hp Download (28.2 KB) - added by bartavelle 10 months ago.
output of -hy

Change History

Changed 10 months ago by bartavelle

List of packages for the "bad" program.

Changed 10 months ago by bartavelle

List of packages for the "good" program.

Changed 10 months ago by bartavelle

Faulty program.

Changed 10 months ago by bartavelle

output of -hr

Changed 10 months ago by bartavelle

output of -hy

Changed 9 months ago by bartavelle

  • status changed from new to closed
  • resolution set to invalid

I erased and rebuilt all my packages again, everything works right. Sorry for the noise.

Note: See TracTickets for help on using tickets.