Tcl Source Code

View Ticket
Login
Ticket UUID: 1667213
Title: tcltest crashes during thread.test
Type: Bug Created on: 2007-02-23 15:41:32
Submitter: lvirden Assigned to: vasiljevic
Subsystem: 49. Threading Severity:
Priority: 5 Medium Last modified: 2007-06-30 21:42:59
Status: Closed Closed by: vasiljevic
Resolution: Fixed Closed on: 2007-06-30 14:42:59
Version: final: 8.1.1
Description:
This problem continues to exist. Here's the latest status.

Sun SPARC Solaris 9
$ cc -V
cc: Forte Developer 7 C 5.4 2002/03/09
usage: cc [ options] files.  Use 'cc -flags' for details


latest cvs head for tcl and thread

compiled with options \"'--prefix=/projects/sprs_lwv/tcl85' '--enable-shared' '--enable
-symbols' '--enable-stubs' '--enable-64bit' '--enable-threads' 'CC=cc'\"



Mainthread id is tid1
thread.test
gmake: *** [test] Bus Error (core dumped)
srv29 (3225) $ dbx /vol/tclsrcsol/tcl85/tcl/unix/tclsh core 
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.0' in your .dbxrc
Reading tclsh
core file header read successfully
Reading ld.so.1
Reading libtcl8.5.so
Reading libdl.so.1
Reading libsocket.so.1
Reading libnsl.so.1
Reading libpthread.so.1
Reading libm.so.1
Reading libc.so.1
Reading libmp.so.2
Reading libc_psr.so.1
Reading libthread.so.1
Reading libthread2.6.5.so
detected a multithreaded program
t@1 (l@1) terminated by signal BUS (invalid address alignment)
0xffffffff7dd0b7f4: _thrp_join+0x01ac:  stx     %l2, [%i2]
Current function is Tcl_JoinThread
  166       result = pthread_join((pthread_t) threadId, (void**) state);
(dbx 1) where   
current thread: t@1
  [1] _thrp_join(0x0, 0x0, 0xffffffff7fff1074, 0x1, 0xffffffff7fff0ed8, 0xffffffff7fff0ee0), at 0xffffffff7dd0b7f4
=>[2] Tcl_JoinThread(threadId = 0x7, state = 0xffffffff7fff1074), line 166 in "tclUnixThrd.c"
  [3] ThreadJoin(interp = 0x1000428c0, thrId = 0x7), line 2062 in "threadCmd.c"
  [4] ThreadJoinObjCmd(dummy = (nil), interp = 0x1000428c0, objc = 2, objv = 0xffffffff7fff1618), line 1172 in "threadCmd.c"
  [5] TclEvalObjvInternal(interp = 0x1000428c0, objc = 2, objv = 0xffffffff7fff1618, command = 0x1003c09fc "thread::join $tid]\n    ThreadReap\n    set c\n", length = 17, flags = 0), line 3659 in "tclBasic.c"
  [6] TclEvalEx(interp = 0x1000428c0, script = 0x1003c09fc "thread::join $tid]\n    ThreadReap\n    set c\n", numBytes = 17, flags = 0, line = 4), line 4263 in "tclBasic.c"
  [7] TclSubstTokens(interp = 0x1000428c0, tokenPtr = 0xffffffff7fff1ef0, count = 1, tokensLeftPtr = (nil), line = 4), line 2098 in "tclParse.c"
  [8] TclEvalEx(interp = 0x1000428c0, script = 0x1003c09b0 "\n    ThreadReap\n    set tid [thread::create -joinable {set x 5}]\n    set c [thread::join $tid]\n    ThreadReap\n    set c\n", numBytes = 120, flags = 262144, line = 4), line 4128 in "tclBasic.c"
  [9] Tcl_EvalEx(interp = 0x1000428c0, script = 0x1003c09b0 "\n    ThreadReap\n    set tid [thread::create -joinable {set x 5}]\n    set c [thread::join $tid]\n    ThreadReap\n    set c\n", numBytes = 120, flags = 262144), line 3934 in "tclBasic.c"
  [10] TclEvalObjEx(interp = 0x1000428c0, objPtr = 0x1003cf470, flags = 262144, invoker = (nil), word = 0), line 4652 in "tclBasic.c"
  [11] Tcl_EvalObjEx(interp = 0x1000428c0, objPtr = 0x1003cf470, flags = 262144), line 4516 in "tclBasic.c"
  [12] Tcl_UplevelObjCmd(dummy = (nil), interp = 0x1000428c0, objc = 1, objv = 0x100046ee8), line 889 in "tclProc.c"
  [13] TclEvalObjvInternal(interp = 0x1000428c0, objc = 3, objv = 0x100046ed8, command = (nil), length = 0, flags = 0), line 3659 in "tclBasic.c"
  [14] TclExecuteByteCode(interp = 0x1000428c0, codePtr = 0x1003fffd0), line 1832 in "tclExecute.c"
  [15] TclCompEvalObj(interp = 0x1000428c0, objPtr = 0x1000c4de0, invoker = (nil), word = 0), line 1014 in "tclExecute.c"
  [16] TclObjInterpProcCore(interp = 0x1000428c0, framePtr = 0x100046d58, procNameObj = 0x1003d2710, isLambda = 0, skip = 1, errorProc = 0xffffffff7f181e88 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1501 in "tclProc.c"
  [17] ObjInterpProcEx(clientData = 0x1001847b0, interp = 0x1000428c0, objc = 3, objv = 0x100401b60, isLambda = 0, errorProc = 0xffffffff7f181e88 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1254 in "tclProc.c"
  [18] TclObjInterpProc(clientData = 0x1001847b0, interp = 0x1000428c0, objc = 3, objv = 0x100401b60), line 1196 in "tclProc.c"
  [19] TclEvalObjvInternal(interp = 0x1000428c0, objc = 3, objv = 0x100401b60, command = 0xffffffff7f1d33c8 "", length = 0, flags = 262144), line 3659 in "tclBasic.c"
  [20] Tcl_EvalObjv(interp = 0x1000428c0, objc = 3, objv = 0x100401b60, flags = 262144), line 3779 in "tclBasic.c"
  [21] TclEvalObjEx(interp = 0x1000428c0, objPtr = 0x1003d2a70, flags = 262144, invoker = (nil), word = 0), line 4609 in "tclBasic.c"
  [22] Tcl_EvalObjEx(interp = 0x1000428c0, objPtr = 0x1003d2a70, flags = 262144), line 4516 in "tclBasic.c"
  [23] Tcl_UplevelObjCmd(dummy = (nil), interp = 0x1000428c0, objc = 1, objv = 0x100046d50), line 889 in "tclProc.c"
  [24] TclEvalObjvInternal(interp = 0x1000428c0, objc = 3, objv = 0x100046d40, command = (nil), length = 0, flags = 0), line 3659 in "tclBasic.c"
  [25] TclExecuteByteCode(interp = 0x1000428c0, codePtr = 0x1002b3c00), line 1832 in "tclExecute.c"
  [26] TclCompEvalObj(interp = 0x1000428c0, objPtr = 0x1000c4c60, invoker = (nil), word = 0), line 1014 in "tclExecute.c"
  [27] TclObjInterpProcCore(interp = 0x1000428c0, framePtr = 0x100046b88, procNameObj = 0x1003d2cb0, isLambda = 0, skip = 1, errorProc = 0xffffffff7f181e88 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1501 in "tclProc.c"
  [28] ObjInterpProcEx(clientData = 0x100183830, interp = 0x1000428c0, objc = 3, objv = 0x100401460, isLambda = 0, errorProc = 0xffffffff7f181e88 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1254 in "tclProc.c"
  [29] TclObjInterpProc(clientData = 0x100183830, interp = 0x1000428c0, objc = 3, objv = 0x100401460), line 1196 in "tclProc.c"
  [30] TclEvalObjvInternal(interp = 0x1000428c0, objc = 3, objv = 0x100401460, command = 0xffffffff7f1d33c8 "", length = 0, flags = 262144), line 3659 in "tclBasic.c"
  [31] Tcl_EvalObjv(interp = 0x1000428c0, objc = 3, objv = 0x100401460, flags = 262144), line 3779 in "tclBasic.c"
  [32] TclEvalObjEx(interp = 0x1000428c0, objPtr = 0x1003d2320, flags = 262144, invoker = (nil), word = 0), line 4609 in "tclBasic.c"
  [33] Tcl_EvalObjEx(interp = 0x1000428c0, objPtr = 0x1003d2320, flags = 262144), line 4516 in "tclBasic.c"
  [34] Tcl_UplevelObjCmd(dummy = (nil), interp = 0x1000428c0, objc = 1, objv = 0x100046b80), line 889 in "tclProc.c"
  [35] TclEvalObjvInternal(interp = 0x1000428c0, objc = 3, objv = 0x100046b70, command = (nil), length = 0, flags = 0), line 3659 in "tclBasic.c"
  [36] TclExecuteByteCode(interp = 0x1000428c0, codePtr = 0x100407d30), line 1832 in "tclExecute.c"
  [37] TclCompEvalObj(interp = 0x1000428c0, objPtr = 0x1000c6910, invoker = (nil), word = 0), line 1014 in "tclExecute.c"
  [38] TclObjInterpProcCore(interp = 0x1000428c0, framePtr = 0x100045930, procNameObj = 0x1003cf890, isLambda = 0, skip = 1, errorProc = 0xffffffff7f181e88 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1501 in "tclProc.c"
  [39] ObjInterpProcEx(clientData = 0x100184230, interp = 0x1000428c0, objc = 5, objv = 0xffffffff7fff87a8, isLambda = 0, errorProc = 0xffffffff7f181e88 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1254 in "tclProc.c"
  [40] TclObjInterpProc(clientData = 0x100184230, interp = 0x1000428c0, objc = 5, objv = 0xffffffff7fff87a8), line 1196 in "tclProc.c"
  [41] InvokeImportedCmd(clientData = 0x1001b6c20, interp = 0x1000428c0, objc = 5, objv = 0xffffffff7fff87a8), line 1892 in "tclNamesp.c"
  [42] TclEvalObjvInternal(interp = 0x1000428c0, objc = 5, objv = 0xffffffff7fff87a8, command = 0x1003ec933 "test thread-4.4 {thread::create - create joinable thread} {\n    ThreadReap\n    set tid [thread::create -joinable {set x 5}]\n    set c [thread::join $tid]\n    ThreadReap\n    set c\n} {0}\n\ntest thread-4.5 {thread::create - join detached thread} {\n    ThreadReap\n    set tid [thread::create]\n    thread::send -async $tid {after 1000 ; thread::release}\n    catch {set res [thread::join $tid]} msg\n    ThreadReap\n    lrange $msg 0 2\n} {cannot join thread}\n\ntest thread-5.0 {thread::release} {\n    ThreadReap\n    set ti" ..., length = 185, flags = 0), line 3659 in "tclBasic.c"

  [43] TclEvalEx(interp = 0x1000428c0, script = 0x1003ebdf0 "# Commands covered:  thread\n#\n# This file contains a collection of tests for one or more of the Tcl\n# built-in commands.  Sourcing this file into Tcl runs the tests and\n# generates output for errors.  No output means no errors were found.\n#\n# Copyright (c) 1996 Sun Microsystems, Inc.\n# Copyright (c) 1998-2000 Scriptics Corporation.\n# Copyright (c) 2002 ActiveState Corporation.\n#\n# See the file "license.terms" for information on usage and redistribution\n# of this file, and for a DISCLAIMER OF ALL WARRANTIES." ..., numBytes = 33216, flags = 0, line = 97), line 4263 in "tclBasic.c"
  [44] Tcl_EvalEx(interp = 0x1000428c0, script = 0x1003ebdf0 "# Commands covered:  thread\n#\n# This file contains a collection of tests for one or more of the Tcl\n# built-in commands.  Sourcing this file into Tcl runs the tests and\n# generates output for errors.  No output means no errors were found.\n#\n# Copyright (c) 1996 Sun Microsystems, Inc.\n# Copyright (c) 1998-2000 Scriptics Corporation.\n# Copyright (c) 2002 ActiveState Corporation.\n#\n# See the file "license.terms" for information on usage and redistribution\n# of this file, and for a DISCLAIMER OF ALL WARRANTIES." ..., numBytes = 33216, flags = 0), line 3934 in "tclBasic.c"
  [45] Tcl_FSEvalFileEx(interp = 0x1000428c0, pathPtr = 0x1003ced50, encodingName = (nil)), line 1813 in "tclIOUtil.c"
  [46] Tcl_SourceObjCmd(dummy = (nil), interp = 0x1000428c0, objc = 2, objv = 0x100045920), line 953 in "tclCmdMZ.c"
  [47] TclEvalObjvInternal(interp = 0x1000428c0, objc = 2, objv = 0x100045920, command = (nil), length = 0, flags = 0), line 3659 in "tclBasic.c"
  [48] TclExecuteByteCode(interp = 0x1000428c0, codePtr = 0x1003c01b0), line 1832 in "tclExecute.c"
  [49] TclCompEvalObj(interp = 0x1000428c0, objPtr = 0x1003cf230, invoker = 0xffffffff7fffbc60, word = 1), line 1014 in "tclExecute.c"
  [50] TclEvalObjEx(interp = 0x1000428c0, objPtr = 0x1003cf230, flags = 0, invoker = 0xffffffff7fffbc60, word = 1), line 4737 in "tclBasic.c"
  [51] Tcl_CatchObjCmd(dummy = (nil), interp = 0x1000428c0, objc = 3, objv = 0x100045908), line 253 in "tclCmdAH.c"
  [52] TclEvalObjvInternal(interp = 0x1000428c0, objc = 3, objv = 0x100045908, command = (nil), length = 0, flags = 0), line 3659 in "tclBasic.c"
  [53] TclExecuteByteCode(interp = 0x1000428c0, codePtr = 0x100361400), line 1832 in "tclExecute.c"
  [54] TclCompEvalObj(interp = 0x1000428c0, objPtr = 0x1003cf380, invoker = 0xffffffff7fffc590, word = 3), line 1014 in "tclExecute.c"
  [55] TclEvalObjEx(interp = 0x1000428c0, objPtr = 0x1003cf380, flags = 0, invoker = 0xffffffff7fffc590, word = 3), line 4737 in "tclBasic.c"
  [56] Tcl_ForeachObjCmd(dummy = (nil), interp = 0x1000428c0, objc = 4, objv = 0xffffffff7fffc6d8), line 1853 in "tclCmdAH.c"
  [57] TclEvalObjvInternal(interp = 0x1000428c0, objc = 4, objv = 0xffffffff7fffc6d8, command = 0x10007ebf3 "foreach file [lsort [::tcltest::getMatchingFiles]] {\n    set tail [file tail $file]\n    puts stdout $tail\n    if {[catch {source $file} msg]} {\n        puts stdout $msg\n    }\n}\n\n# Cleanup\nputs stdout "\nTests ended at [eval $timeCmd]"\n::tcltest::cleanupTests 1\n\nreturn\n\n", length = 177, flags = 0), line 3659 in "tclBasic.c"
  [58] TclEvalEx(interp = 0x1000428c0, script = 0x10007e570 "# all.tcl --\n#\n# This file contains a top-level script to run all of the Tcl\n# tests.  Execute it by invoking "source all.test" when running tcltest\n# in this directory.\n#\n# Copyright (c) 1998-1999 by Scriptics Corporation.\n# All rights reserved.\n# \n# RCS: @(#) $Id: all.tcl,v 1.5 2004/12/18 13:26:03 vasiljevic Exp $\n\npackage require tcltest\nnamespace import -force ::tcltest::*\n\nset ::tcltest::testSingleFile false\nset ::tcltest::testsDirectory [file dir [info script]]\n\n# We need to ensure that the testsDirec" ..., numBytes = 1937, flags = 0, line = 53), line 4263 in "tclBasic.c"
  [59] Tcl_EvalEx(interp = 0x1000428c0, script = 0x10007e570 "# all.tcl --\n#\n# This file contains a top-level script to run all of the Tcl\n# tests.  Execute it by invoking "source all.test" when running tcltest\n# in this directory.\n#\n# Copyright (c) 1998-1999 by Scriptics Corporation.\n# All rights reserved.\n# \n# RCS: @(#) $Id: all.tcl,v 1.5 2004/12/18 13:26:03 vasiljevic Exp $\n\npackage require tcltest\nnamespace import -force ::tcltest::*\n\nset ::tcltest::testSingleFile false\nset ::tcltest::testsDirectory [file dir [info script]]\n\n# We need to ensure that the testsDirec" ..., numBytes = 1937, flags = 0), line 3934 in "tclBasic.c"
  [60] Tcl_FSEvalFileEx(interp = 0x1000428c0, pathPtr = 0x100032f80, encodingName = (nil)), line 1813 in "tclIOUtil.c"
  [61] Tcl_Main(argc = -1, argv = 0xffffffff7fffd198, appInitProc = 0x100001e58 = &Tcl_AppInit(Tcl_Interp *interp)), line 441 in "tclMain.c"
  [62] main(argc = 2, argv = 0xffffffff7fffd188), line 87 in "tclAppInit.c"
(dbx 2)
User Comments:
vasiljevic added on 2007-06-30 21:42:59:
Logged In: YES 
user_id=95086
Originator: NO

This has been fixed in HEAD.