Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b05f044e7a06293044ebeec71fbfe99b7b23c6f0
Ticket: 219136ffffffffffffffffffffffffffffffffff
Tcl8.1a2 thread config problems (use reentrant calls)
User & Date: nobody on 2000-10-26 05:02:12
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 607 Bug
    Version: 8.1a2
    SubmitDate: '1998-05-21'
    LastModified: '2000-03-31'
    Severity: SER
    Status: Assigned
    Submitter: hershey
    ChangedBy: hobbs
    RelatedBugIDs: 1653
    OS: AIX
    FixedDate: '2000-01-11'
    ClosedDate: '2000-10-25'
    
    
    I've had a quick look at the thread support in Tcl8.1a2, 
    >and I'm posting some observations and problems.
    >My platform is AIX 4.1.5 on a 4-processor RS/6000, compiling
    >with the cc_r compiler from IBM's C-Set++ package.
    >
    >I have been using Richard Hipp and Mike Cruse's PtTcl so far
    >and I recognise a lot of its code (updated and restructured)
    >in Tcl8.1a2.  This includes some of the problems which I
    >have previously found and reported to the PtTcl authors,
    >together with fixes.
    >
    >I don't have time for a very detailed report right now,
    >but here's a quick summary.
    >
    >1) Running configure for AIX needs CC=cc_r.  libpthread doesn't exist - 
    >libpthreads does exist but doesn't need to be specified when you use cc_r. 
    >   
    >2) the URL in the README for porting info:
    >   http://www.sunlabs.com/cgi-bin/tcl/info.8.1
    >   doesn't work.  The same with info.8.0 does exist.
    >
    >3) Running "make test" I get a hang in io.test but didn't have time to
    >   track down why yet.
    >
    >4) There seems to be no attempt to use thread-safe versions of unsafe
    >   library routines, eg. to use localtime_r instead of localtime.
    >   This is odd because PtTcl did try to do this, though there is a lack
    >   of standardisation of the *_r variants between different unixes.
    >
    >5) There is a race bug inherited from PtTcl which can cause deadlock
    >   in "testthread send".  Doing a lot of sends in succession will
    >   trigger this reliably on my platform - eg.
    >
    >$ ./tcltest
    >% testthread create
    >537107728
    >% testthread send 537107728 {set a A}
    >A
    >% testthread send 537107728 {set a}
    >A
    >% time {testthread send 537107728 {set a}} 10000
    >
    >- hangs.  I'll send more details next week but the basic problem is that
    >if the sending thread signals the receiving thread between the call to
    >Tcl_ServiceEvent in Tcl_DoOneEvent and the later call to TclpConditionWait
    >from Tcl_WaitForEvent the message gets lost.
    >
    >6) Code from PtTcl in tclCkalloc.c which I have found in the past to cause 
    >   a false error report when running multithreaded with TCL_MEM_DEBUG and 
    >   using "memory validate on" exists unchanged, but I haven't had time to
    >   retest it.
    >
    >
    >Thanks a lot to the Sun (or Scriptics) team for their efforts so far.
    >
    >Colin.
    >--
    ><<<<<<<<<<<^^^^^^^>>>>>>>>vvvvvvv<<<<<<<<<<<^^^^^^^>>>>>>>>vvvvvvv
    >Colin Macleod, software engineer, Intrasoft SA, Athens, Greece
    >email (remove added spaces to use) :  macleod @ intrasoft . gr
    
    items 3, 5, and 6 are fixed in 8.1a3
    the remainder are still outstanding
    --
    issues 1 && 2 were resolved by 8.2.3.  4 remains open.
    -- 01/11/2000 hobbs 
    -- 01/11/2000 hobbs
    
  4. foundin changed to: "obsolete: 8.1a2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "49. Threading"
  10. title changed to:
    Tcl8.1a2 thread config problems (use reentrant calls)
    
  11. type changed to: "Bug"