PR# 14472 System that creates one trivial thread at a time leaks memory

Problem Report Summary
Submitter: prestoat2000
Category: Runtime
Priority: Medium
Date: 2008/06/15
Class: Bug
Severity: Serious
Number: 14472
Release: 6.2.73753
Confidential: No
Status: Closed
Responsible: ted_eiffel
Environment: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.8.1.14) Gecko/20080421 Firefox/2.0.0.14 OpenSolaris 2008.05 snv_90 on x86
Synopsis: System that creates one trivial thread at a time leaks memory

Description
A system repeatedly creates one worker thread, where the worker thread `execute'
routine does not do anything, and then calls join_all to wait for that thread.
When the system is executed with a large number of iterations, it runs out of
memory, though MEM_INFO shows stable memory usage.

I believe part (perhaps all) of the problem is that `ex_string' is allocated
by `init_emnger' in except.c (per thread data), but is never freed when the
thread terminates.
To Reproduce
Finalize with attached classes and config file.
Execute system with argument 100000.  On my system, memory usage for the process
grows to about 800 MB before execution finishes, though MEM_INFO shows
total memory usage as 16785600 bytes.
Problem Report Interactions
From:ted_eiffel    Date:2008/06/17    Status: Closed    Download   
The memory leak has been fixed in rev#73858.
Thank you for reporting.

From:prestoat2000    Date:2008/06/15    Download   
Attachments for problem report #14472

Attachment: test.e     Size:772
Attachment: worker.e     Size:310
Attachment: test.ecf     Size:1237