#1329 Memory leak execing perl from tclsh82, wish82

obsolete: 8.2.2
closed-fixed
nobody
5
2001-04-05
2000-10-26
Anonymous
No

OriginalBugID: 5848 Bug
Version: 8.2.2
SubmitDate: '2000-06-07'
LastModified: '2000-10-25'
Severity: SER
Status: UnAssn
Submitter: techsupp
OS: Windows NT
OSVersion: Windows NT 4.0
Machine: 300 MHz Pentium II
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'

Name:
Byron Biggs

Extensions:
no extensions

CustomShell:
none

ReproducibleScript:
If you source the following script from the tclsh82 prompt (or the wish82 prompt) you see the memory
usage by tclsh82 grow significantly if you monitor VM Size in the Windows NT task manager. If you loop about 1000 times, the process will eventually hang:

for {set i 0} {$i < 500} {incr i} {
exec perl -e \$x=1
}

If you change the exec line to:
exec perl -e \$x=1 >nul
there is no leak. Redirection of stdout either to a file or to nul prevents the leak.

For this particular test, I was running perl version 5.004.04 for win32. However, there doesn't seem to be anything special about perl. I was also able to reproduce the problem running a simple "echo.exe" program. It may occur with any console application.

ObservedBehavior:
Significant memory usage increase, and (eventually) complete lockup.

Discussion

    • labels: 104246 --> 104241
     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2000-11-20

    • status: open --> closed-fixed
     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2000-11-20

    This has nothing to do with exec'ing Perl in particular, but rather exec in general, and specifically it is (was) due to OS level leaks in how threads are handled. This was massaged in 8.4a2 to no longer leak (by Gravereaux).

     
  • Don Porter
    Don Porter
    2001-04-05

    • labels: 104241 --> 27. Channel Types