Skip to content
Tcl Source Code History Of Ticket 994838ffffffffff
Login

History Of Ticket 994838ffffffffff

Artifacts Associated With Ticket 994838ffffffffff

  1. Ticket change [2b4950c84e] (rid 118715) by kennykb on 2004-07-20 21:45:45:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Running the loop
      
      while 1 {
          interp create i
          interp delete i
      }
      
      results in process memory growing endlessly.
      
      Miguel Sofer and I have been discussing the bug
      at length in email and the Tcl'ers Chat and have
      reached the conclusion that the problem arises when
      a proc's bytecode representation lives until the interp
      is deleted (generally, because some shared literal
      has an internal representation of tclLocalVarType
      that designates a variable in the proc).
      
      I now suspect that the problem is ameliorated if
      internal representations of global literals are destroyed
      earlier in the process of taking down an interp.
      I'm developing a patch to test this hypothesis.
      
    4. foundin initialized to: "obsolete: 8.5a2"
    5. priority initialized to: "7 High"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "kennykb"
    9. subsystem initialized to: "47. Bytecode Compiler"
    10. title initialized to: "memory leak in interpreter creation/deletion loop"
    11. type initialized to: "Bug"
  2. Ticket change [4512b6fb9a] (rid 116819) by kennykb on 2004-07-21 04:57:26:

    1. icomment:
      Logged In: YES 
      user_id=99768
      
      The attached patch appears to correct the problem
      as described.  
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  3. Ticket change [90a5805edd] (rid 120486) by kennykb on 2004-07-21 04:57:27:

    1. icomment:
      
      
      File Added - 94620: litTable.patch
      
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  4. Add attachment "litTable.patch" [210b61f5a9] (rid 130515) by kennykb on 2004-07-21 04:57:27.

  5. Ticket change [88e356d7b5] (rid 131933) by msofer on 2004-07-21 17:35:20:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      The patch has been committed, ticket still open until I
      reach a full understanding of the issue and am satisfied of
      its correction and completeness. Issues:
      
      (0) I still do not see why the leak was only observable in
      windows. 
      
      (1) it frees the internal rep of every shared literal, but
      unshared literals are not covered. This will break any
      reference loop where a shared literal intervenes, but leaves
      the issue untouched for loops of unshared lits
      
      (2) it panics on a literal with no string rep; this can only
      occur with unshared literals created via TclAddLiteralObj(),
      so it is not really an issue while issue (1) remains untouched
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  6. Ticket change [258e88b4c8] (rid 88192) by msofer on 2004-07-24 01:40:27:

    1. closedate changed to: "2004-07-23T18:40:27"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      
      Committed a change in tclLocalVarnameType that removes the
      reference to the proc, and hence renders these circular
      references impossible.
      Closing the ticket, the bug is now fixed twice over ;)
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "msofer"
  7. Ticket change [1850962df5] (rid 122639) by dgp on 2011-04-26 03:26:00:

    1. icomment:
      
      Miguel, can you comment on what importance
      the call to TclCleanupLiteralTable() still has?
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [e03959d920] (rid 115149) by msofer on 2011-04-26 09:30:01:

    1. icomment:
      Chatlogs:
      
      dgpFor when I get back, I'm curious about the purpose of TclCleanupLiteralTable().
      kbkdgp - ISTR that the literal table is one case where it's possible that Tcl_Obj's' int-reps can hold references to each other, and that a bespoke cleanup was needed to break cycles and actually kill them, but I may 
      dgphere's my observations
      dgpTCLT() is called in only one place, DeleteInterpProc(.) in tclBasic.c
      dgpAbout 100 lines later in the same DIP(.) routine, TclDeleteLiteralTable() is called.
      dgpTCLT only removes intreps of literal values.
      dgpTDLT actually frees them, which would destroy intreps if any were still around.
      dgpThe value of the TCLT pass is not clear to me.
      dgpCommenting it out has no effect on the success of the test suite.
      dgphmmm, TCLT is not in Tcl 8.4, so the history of its origin ought to be findable....
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  9. Ticket change [38b8853181] (rid 112257) by msofer on 2011-05-08 22:34:17:

    1. icomment:
      kbk's fix for [Bug 994838]. See http://core.tcl.tk/tcl/info/460aa80311bfa1259a4562d35e5a40558e9a019d
      
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  10. Ticket change [d4d0c668fe] (rid 123510) by msofer on 2011-05-08 22:34:19:

    1. assignee changed to: "kennykb"
  11. Ticket change [82bace3962] (rid 117275) by dgp on 2011-05-11 00:54:37:

    1. icomment:
      
      Yes, kbk did that to fix (work around?) a leak tearing down interps.
      
      Then you fixed the underlying cause shortly afterward.
      
      http://core.tcl.tk/tcl/info/63de804c96
      
      After that, TclCleanupLiteralTable() can be
      removed.  I'd like to do so.  Why have code
      you don't need?  But I want to know what others
      think.  Are we keeping it around just as another
      layer of protection in case another similar bug
      pops up?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  12. Ticket change [fe2b874145] (rid 108532) by msofer on 2011-05-11 01:15:50:

    1. icomment:
      Agreed: remove
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  13. Ticket change [c3fe833c33] (rid 111769) by kennykb on 2011-05-11 11:16:15:

    1. icomment:
      Agreed. It was a hack to deal with circular Tcl_Obj references. Miguel fixed the circular references. It can go.
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"