Tcl Source Code

View Ticket
Login
Ticket UUID: 217931
Title: Tcl 8.2 hangs sometime at exit
Type: Bug Created on: 2000-10-26 00:46:12
Submitter: nobody Assigned to: nobody
Subsystem: 49. Threading Severity:
Priority: 2 Last modified: 2000-10-26 08:10:54
Status: Closed Closed by: welch
Resolution: Fixed Closed on: 2000-10-26 01:10:54
Version: obsolete: 8.2
Description:
OriginalBugID: 3414 Bug
Version: 8.2
SubmitDate: '1999-11-05'
LastModified: '2000-01-11'
Severity: CRIT
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 3871
OS: Solaris
OSVersion: 2.5.1
FixedDate: '2000-10-25'
ClosedDate: '2000-01-11'


Name:
khivi

ReproducibleScript:
We have compiled 8.2 with threads enabled.
    We run  a C++  program which uses TCL and it hangs on exit.

ObservedBehavior:
The stack is:
    -----------------  lwp# 1 / thread# 1  --------------------
     ffffffff7d6a11ac lwp_sema_wait (100363fd8)
     ffffffff7d80d390 _park (100363fd8, 0, 100363ef0, ffffffff7d91f088, 1,
    ffffffff7d920bcc) + a8
     ffffffff7d80d170 _swtch (0, ffffffff7d91f088, 280, 100364218, 0, 0) +
    2bc
     ffffffff7d80bde0 cond_wait (4356, 100368c80, 10036aa80,
    ffffffff7d91f088, 100363ef0, 0) + d0
     ffffffff7d80bcec pthread_cond_wait (10036aa80, 100368c80, 0, 0, 0, 0) +
    8
     00000001001ba8b8 Tcl_ConditionWait (100368c80, 0, 10036aa80, 10035d2d8,
    10035d2d0, ffffffff7fffdde0) + 90
     00000001001bab4c Tcl_FinalizeNotifier (10034fb30, 10035d2d8, 100371a70,
    c000, 100331730, ffffffff7d7baf40) + b4
     0000000100197494 TclFinalizeNotifier (100331730, 100371a00, 0,
    1001a94f0, 0, 0) + 3c
     0000000100174054 Tcl_FinalizeThread (0, 10036a7e0, 0, 10038e630,
    ffffffff7fffd680, ffffffff7fffd678) + 7c
     0000000100173ec0 Tcl_Finalize (10035d088, 0, 10034b114, 100331730, 0,
    10038e630) + b8
     0000000100173ad4 Tcl_Exit (0, 100397d50, 100331730, 10037fd70,
    10039c2f0, 10038e630) + 4
     0000000100159174 Tcl_ExitObjCmd (0, 10037fd70, 2, ffffffff7fffdbd0,
    ffffffff7fffdde5, 100331730) + 94
     000000010019ab8c EvalObjv (0, ffffffff7fffdde0, 100380810,
    ffffffff7fffdde0, 100331730, ffffffff7fffdde0) + 3dc
     000000010019b33c Tcl_EvalEx (10037fd70, ffffffff7fffdbd0,
    ffffffffffffffff, 0, 6, ffffffff7fffdde0) + 164
     000000010019b590 Tcl_Eval (10037fd70, ffffffff7fffdde0, 0, 10037fd70,
    100331730, 0) + 10
     00000001001938f4 Tcl_Main (0, 10037fd70, 100065d60, 100357fb8,
    1003381dc, 100331730) + 574
     0000000100065d24 main (2, ffffffff7fffed98, ffffffff7fffedb0,
    ffffffff7d7ae3f8, 0, 100000000) + 29c
     000000010006592c _start (0, 0, 0, 0, 0, 0) + ec
    ---
     ffffffff7d69f558 poll     (ffffffff7cc05ae0, 1, ffffffffffffffff)
     ffffffff7d6570f4 select (ffffffff7d7ae3f8, ffffffff7cc05ae0,
    ffffffff7cc09c00, ffffffff7cc07c00, ffffffff7cc05c00, ffffffff7cc09bf8)
    + 2a4
     ffffffff7d81dd0c select (0, 100331730, 8, ffffffff7cc05bf8, 10035d2d8,
    4) + 54
     ffffffff7d81e370 _thread_start (0, 0, 0, 0, 0, 0) + 3c

DesiredBehavior:
Basically the Notifer thread is in the select in NotiferThreadProc
    
    The last thread has closed the (fd) in Tcl_FinalizeNotifier and
    in the Tcl_ConditionWait. Somehow the select of the NotigerThreadProc is
    not
    comign out because of the close?