Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#2785 closed bug (invalid)

Memory leakage with socket benchmark program

Reported by: felixmar Owned by: simonmar
Priority: normal Milestone: 6.10.2
Component: Runtime System Version: 6.10.1
Keywords: Cc:
Operating System: Windows Architecture: x86
Type of failure: Runtime performance bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Attached benchmark program is similar to the thread-ring benchmark of the language shootout, but in this benchmark threads use UDP messages to communicate. Memory use of the program is stable with GHC-6.8.3/Windows and GHC-6.8.2/Linux but the working set increases about 4K per second when it is compiled with GHC-6.10.1. The number of used threads does not seem to matter.

N.B. Benchmark must be compiled with -threaded on Windows otherwise it will block. Run with "threadring t n" where t is the number of threads and n the number of messages that are passed around.

Attachments (1)

threadring.hs (1.0 KB) - added by felixmar 11 years ago.

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by felixmar

Attachment: threadring.hs added

comment:1 Changed 11 years ago by igloo

difficulty: Unknown
Milestone: 6.10.2
Type: bugrun-time performance bug

comment:2 Changed 11 years ago by simonmar

Owner: set to simonmar

I think I may have fixed this, will check.

comment:3 Changed 11 years ago by simonmar

Resolution: invalid
Status: newclosed

I do see the process size growing in Windows, but not Linux. It still happens with the HEAD. However, I've verified that the leak is not in GHC's heap (the heap size is a constant 1MB), nor is it from calls to malloc(). So as far as I can tell, this must be happening in the Windows networking layer somewhere, hence I don't think there's anything we can do.

comment:4 Changed 10 years ago by simonmar

Type of failure: Runtime performance bug
Note: See TracTickets for help on using tickets.