Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 472fdc281321ed76df0004f18f88c33ead43e09a
Ticket: 3111059fffffffffffffffffffffffffffffffff
coro+proc+ns deadlock
User & Date: msofer on 2010-11-18 05:19:53
Changes

  1. icomment:
    At least the namespace, proc and coro structs are all being leaked. This should not happen, the sequence going something like this when "namespace delete" is called:
      1. Tcl_DeleteNamespace calls Tcl_DeleteCommandFromToken on [coro]'s cmdPtr
      2. Tcl_DeleteCommandFromToken set cmdPtr->flags|=CMD_IS_DELETED and calls cmdPtr->deleteProc (== DeleteCoroutine)
      3. DeleteCoroutine sees that coroPtr is suspended and: (a) pushes a callback for RewindCoroutine, (b) runs all callbacks
      4. RewindCoroutine sets corPtr->eePtr->rewind=1 and resumes the coroutine
      5. on resuming, TEBC sees the rewind flag and returns an uncatchable error: the nre stack is wound down to the bottom of the coroutine
      6. the last callback on the coros execEnv is NRCoroutineExitCallback, coroutine deletion proceeds 
      7. ...
    
    Problem seems to be before or around step 5, as the proc should be freed when it returns.
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"