Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4c1a81275e270f19dd71b0288ee14aa3d88176f6
Ticket: 3611974fffffffffffffffffffffffffffffffff
InitSubsystems multiple thread issue
User & Date: dgp on 2013-04-26 18:55:49
Changes

  1. assignee changed to: "nijtmans"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    The mutex arrangement in TclInitSubsystems() seems
    to suffer from a significant flaw.  Consider two threads,
    A and B, calling the routine concurrently.  Thread A gets
    the lock first, sets subsystemsInitialized to 1 and starts
    calling the set of subsystem initializing routines.
    
    Meanwhile thread B makes the initial test 
    (subsystemsInitialized == 0) and since thread A
    has already set it to 1, thread B jumps straight
    to the bottom of TIS() and calls TclInitNotifier().
    
    The trouble is when B calls TclInitNotifier(), we
    have no idea how much of Tcl library initialization
    is actually done.  We just know it got started.
    
    
  4. foundin changed to: "current: 8.5.14"
  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: "dgp"
  10. subsystem changed to: "02. Event Loops"
  11. title changed to: "InitSubsystems multiple thread issue"
  12. type changed to: "Bug"