Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a3508b5c83a3719f361736ea0b4f953cd283aee2
Ticket: 2270477fffffffffffffffffffffffffffffffff
TclFinalizeIOSubsystem can loop endlessly
User & Date: nobody on 2008-11-12 16:34:46
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    TclFinalizeIOSubsystem contains a loop which runs until all channels in the linked list have the CHANNEL_DEAD flag set.
    
    If any channels are not referenced by interpreters, the loop calls Tcl_Close() to close the channel and, presumably, remove it from the linked list.  However, under some circumstances, Tcl_Close does not remove the channel from the list, and instead schedules it for removal at a later time.  If this happens, TclFinalizeIOSubsystem will spin forever.
    
    I have seen this happen when expect exits while running a test suite under dejagnu.  Unfortunately, I do not have a simple reproduction case.  But perhaps the loop should guard against this case by checking for CHANNEL_CLOSED as well as CHANNEL_DEAD?  I really don't understand the design well enough to be sure.
    
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "nobody"
  10. subsystem changed to: "None"
  11. title changed to: "TclFinalizeIOSubsystem can loop endlessly"
  12. type changed to: "Bug"