'exec' mem leak on NT 
Author Message
 'exec' mem leak on NT

Using TCL 8.2.3.

I narrowed the mem-leak to repeatedly calling exec on NT. Other posts in
this group indicated that this is a known problem fixed in 8.3/8.4.
Actually I verified that the mem-leak does not happen with 8.3.3.
But upgrading is not an option for me as I have systems already live on
this. Can somebody tell me the list of steps I need to do to back-port
the leak fix to 8.2.3.

Your help is much appreciated.

Thanks,
Vishwa

----------------------------
Vishwanath Nukal

Ph: (650) 633 6349



Sun, 14 Dec 2003 04:04:49 GMT  
 'exec' mem leak on NT

Quote:

> Using TCL 8.2.3.

> I narrowed the mem-leak to repeatedly calling exec on NT. Other posts in
> this group indicated that this is a known problem fixed in 8.3/8.4.
> Actually I verified that the mem-leak does not happen with 8.3.3.
> But upgrading is not an option for me as I have systems already live on
> this. Can somebody tell me the list of steps I need to do to back-port
> the leak fix to 8.2.3.

The are a couple of key changes, and good reasons to move to 8.3.3.
The I/O core was completely rewritten, meaning thousands of lines
of code were touched.  The difference to your scripts in such a move
is nil, and any extensions which were stub-enabled (which is
hopefully all of them) won't need recompilation.

Otherwise, you can always compare the code bases to get the
specific fixes that you need.  If you need help, I can always
provide you commercial support ;).

--
  Jeff Hobbs                     The Tcl Guy
  Senior Developer               http://www.ActiveState.com/
      Tcl Support and Productivity Solutions



Sun, 14 Dec 2003 04:16:47 GMT  
 'exec' mem leak on NT
Using TCL 8.2.3.

I narrowed the mem-leak to repeatedly calling exec on NT. Other posts in
this group indicated that this is a known problem fixed in 8.3/8.4.
Actually I verified that the mem-leak does not happen with 8.3.3.
But upgrading is not an option for me as I have systems already live on
this. Can somebody tell me the list of steps I need to do to back-port
the leak fix to 8.2.3.

Your help is much appreciated.

Thanks,
Vishwa



Sun, 14 Dec 2003 04:22:17 GMT  
 'exec' mem leak on NT

Quote:


> > Using TCL 8.2.3.

> > I narrowed the mem-leak to repeatedly calling exec on NT. Other posts in
> > this group indicated that this is a known problem fixed in 8.3/8.4.
> > Actually I verified that the mem-leak does not happen with 8.3.3.
> > But upgrading is not an option for me as I have systems already live on
> > this. Can somebody tell me the list of steps I need to do to back-port
> > the leak fix to 8.2.3.

> The are a couple of key changes, and good reasons to move to 8.3.3.
> The I/O core was completely rewritten, meaning thousands of lines
> of code were touched.  The difference to your scripts in such a move
> is nil, and any extensions which were stub-enabled (which is
> hopefully all of them) won't need recompilation.

> Otherwise, you can always compare the code bases to get the
> specific fixes that you need.  If you need help, I can always
> provide you commercial support ;).

:)

I have patched tclWinPipe.c to not terminate the thread(1.15 rev from
CVS), but that fix in isloation does not plug the leak.

Purify indicates the location of mem allocation below. Which is the
best place in Tcl 8.2.3 to free it ?

[W] MLK: Memory leak of 4098 bytes from 1 block allocated in TclpAlloc
        Distribution of leaked blocks
        Allocation location
            malloc         [dbgheap.c:129]
            TclpAlloc      [tclAlloc.c:666]
            Tcl_Alloc      [tclCkalloc.c:813]
            Tcl_CreateChannel [tclIO.c:1321]
            TclWinOpenConsoleChannel [tclWinConsole.c:1245]
            Tcl_MakeFileChannel [tclWinChan.c:917]
            TclpGetDefaultStdChannel [tclWinChan.c:1011]
            Tcl_GetStdChannel [tclIO.c:699]
            GetChannelTable [tclIO.c:851]
            Tcl_RegisterChannel [tclIO.c:1038]
            Tcl_OpenObjCmd [tclIOCmd.c:998]
            TclExecuteByteCode [tclExecute.c:844]
            Tcl_EvalObjEx  [tclBasic.c:2696]
            TclObjInterpProc [tclProc.c:996]
            TclExecuteByteCode [tclExecute.c:844]
            Tcl_EvalObjEx  [tclBasic.c:2696]
            TclObjInterpProc [tclProc.c:996]
            EvalObjv       [tclParse.c:932]
            Tcl_EvalEx     [tclParse.c:1393]
            Tcl_Eval       [tclParse.c:1512]
            snmitece       [snmite.c:917]

Regards,
Vishwa



Mon, 15 Dec 2003 06:35:51 GMT  
 'exec' mem leak on NT
        ...

Quote:
> > > Using TCL 8.2.3.

> > > I narrowed the mem-leak to repeatedly calling exec on NT. Other posts in
        ...
> I have patched tclWinPipe.c to not terminate the thread(1.15 rev from
> CVS), but that fix in isloation does not plug the leak.

> Purify indicates the location of mem allocation below. Which is the
> best place in Tcl 8.2.3 to free it ?

I would narrow your search to whatever is in the win/ directory.
It should be easy to make the comparative diff there to find
what code changed.

--
  Jeff Hobbs                     The Tcl Guy
  Senior Developer               http://www.ActiveState.com/
      Tcl Support and Productivity Solutions



Mon, 15 Dec 2003 13:06:09 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. memory leak and leak-fixing 'patterns'

2. Trouble with 'exec' in windows NT

3. 'exec' Problems under Win/NT

4. exec mem leak?

5. exec'ing a KornShell script under NT - repost

6. exec'ing a KornShell script under NT

7. What are 'Memory Leaks'?

8. Memory leak with 'fileevent' command

9. EXEC CICS DOCUMENT INSERT 'AT' parameter

10. g95: installation problem, cannot exec 'f951': No such file or directory

11. need exit from 'exec' execution

12. Bug in 'exec'

 

 
Powered by phpBB® Forum Software