Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2012-05-02
02:29 • New ticket [3522894fff] Solaris build fails: TclBN_mp_init_set_int not found... artifact: e9cba4d151 user: markatc
2007-06-11
04:26 • Closed ticket [1516686fff]: Crash with Tcl 8.5 on x86_64 plus 7 other change... artifact: 60f9587e71 user: hobbs
2007-02-09
06:43 • Ticket [1516686fff]: 4 changes artifact: e78f5ca0fd user: hobbs
2006-08-07
21:05 • Ticket [1516686fff]: 1 change artifact: 360b9c6b21 user: dkf
2006-08-06
18:46 • Ticket [1516686fff]: 4 changes artifact: 29aa904666 user: mic42
18:44 • Ticket [1516686fff]: 4 changes artifact: 668a139615 user: mic42
16:42 • Ticket [1516686fff]: 4 changes artifact: 84a322a690 user: vasiljevic
16:42 • Ticket [1516686fff]: 4 changes artifact: d025b01dfa user: vasiljevic
2006-07-04
00:09 • New ticket [1516686fff]. artifact: 96f83902f1 user: mic42

Crash with Tcl 8.5 on x86_64

Closed / Fixed1516686fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 19 years ago
Descriptionplain2006-07-04 00:09:41
I see a segfault when compiling Thread (cvs) against
Tcl 8.5 (cvs) on my SUSE 10.1 x86_64 machine.

The following script crashes Tcl.
(basically from the testsuit thread-4.4)
load ./libthread2.6.3.so Thread
set tid [thread::create -joinable {set x 5}]
thread::join $tid

The crash does not happen in an --enable-symbols build.

I have linked tcl and thread with efence to find
something, and run the script inside gdb.

schlenk@chronos:~/devel/thread> gdb ../tcl/efence/tclsh
GNU gdb 6.4
This GDB was configured as "x86_64-suse-linux"...Using
host libthread_db library "/lib64/libthread_db.so.1".

(gdb) run
Starting program: /home/schlenk/devel/tcl/efence/tclsh
[Thread debugging using libthread_db enabled]
[New Thread 47191154113392 (LWP 9563)]

  Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce
Perens <[email protected]>
[New Thread 1082132800 (LWP 9566)]
% source crash.tcl
[New Thread 1090525504 (LWP 9567)]
[Thread 1090525504 (zombie) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47191154113392 (LWP 9563)]
TclEvalObjvInternal (interp=0x2aeb8bffbc70, objc=2,
objv=0x7fff1f2c5320,
    command=0x2aeb8c06403d "thread::join $tid\n",
length=18, flags=0)
    at
/home/schlenk/devel/tcl/unix/../generic/tclBasic.c:3394
3394        if (!(cmdPtr->flags & CMD_IS_DELETED)) {

This is the resulting stack trace:

#0  TclEvalObjvInternal (interp=0x2b5c2cf2bc70, objc=2,
objv=0x7fff7e3933f0,
    command=0x2b5c2cf9383d "thread::join $tid\n",
length=18, flags=0)
    at
/home/schlenk/devel/tcl/unix/../generic/tclBasic.c:3394
#1  0x0000000000467cd0 in Tcl_EvalEx
(interp=0x2b5c2cf2bc70,
    script=0x2b5c2cf937f0 "load ./libthread2.6.3.so
Thread\nset tid [thread::create -joinable {set x
5}]\nthread::join $tid\n",
    numBytes=<value optimized out>, flags=<value
optimized out>)
    at
/home/schlenk/devel/tcl/unix/../generic/tclBasic.c:3788
#2  0x000000000042344f in Tcl_FSEvalFileEx
(interp=0x2b5c2cf2bc70,
    pathPtr=0x2b5c2cf3cf00, encodingName=<value
optimized out>)
    at
/home/schlenk/devel/tcl/unix/../generic/tclIOUtil.c:1805
#3  0x0000000000479de2 in Tcl_SourceObjCmd
(dummy=<value optimized out>,
    interp=0x2b5c2cf2bc70, objc=<value optimized out>,
objv=0x2b5c2cf45078)
    at
/home/schlenk/devel/tcl/unix/../generic/tclCmdMZ.c:959
#4  0x00000000004676b2 in TclEvalObjvInternal
(interp=0x2b5c2cf2bc70, objc=2,
    objv=0x2b5c2cf45078, command=0x0, length=0, flags=0)
    at
/home/schlenk/devel/tcl/unix/../generic/tclBasic.c:3381
#5  0x0000000000497bdd in TclExecuteByteCode
(interp=0x2b5c2cf2bc70,
    codePtr=0x2b5c2cf20e70)
    at
/home/schlenk/devel/tcl/unix/../generic/tclExecute.c:1795
#6  0x000000000049edcf in TclCompEvalObj
(interp=0x2b5c2cf2bc70,
    objPtr=0x2b5c2cf41e80)
    at
/home/schlenk/devel/tcl/unix/../generic/tclExecute.c:1003
---Type <return> to continue, or q <return> to quit---
#7  0x0000000000468340 in Tcl_EvalObjEx
(interp=0x2b5c2cf2bc70,
    objPtr=0x5e0b38, flags=131072)
    at
/home/schlenk/devel/tcl/unix/../generic/tclBasic.c:4058
#8  0x00000000004a45db in Tcl_RecordAndEvalObj
(interp=0x2b5c2cf2bc70,
    cmdPtr=0x2b5c2cf41e80, flags=131072)
    at
/home/schlenk/devel/tcl/unix/../generic/tclHistory.c:146
#9  0x00000000004263d2 in Tcl_Main (argc=754371952,
argv=0x2b5c2cfc7770,
    appInitProc=0x412ac0 <Tcl_AppInit>)
    at
/home/schlenk/devel/tcl/unix/../generic/tclMain.c:546
#10 0x0000000000412b10 in main (argc=754105456,
argv=0x5e0b38)
    at /home/schlenk/devel/tcl/unix/../unix/tclAppInit.c:87
vasiljevicplain2006-08-06 16:42:16
Logged In: YES 
user_id=95086

I'm unable to get this reproduced on and latest 
CVS state of Tcl as of Sun Aug 06 11:28:15 CEST 2006
With or without symbols enabled.
I'm running tests on the following machines:
Linux devlinux 2.6.4-52-default #1 Wed Apr 7 02:08:30 UTC 2004 i686 
athlon i386 GNU/Linux
Darwin zvpb.local 8.7.0 Darwin Kernel Version 8.7.0: Fri May 26 15:20:53 
PDT 2006; root:xnu-792.6.76.obj~1/RELEASE_PPC Power Macintosh powerpc
vasiljevicplain2006-08-06 16:42:44
Logged In: YES 
user_id=95086

I'm unable to get this reproduced on and latest 
CVS state of Tcl as of Sun Aug 06 11:28:15 CEST 2006
With or without symbols enabled.
I'm running tests on the following machines:
Linux devlinux 2.6.4-52-default #1 Wed Apr 7 02:08:30 UTC 2004 i686 
athlon i386 GNU/Linux
Darwin zvpb.local 8.7.0 Darwin Kernel Version 8.7.0: Fri May 26 15:20:53 
PDT 2006; root:xnu-792.6.76.obj~1/RELEASE_PPC Power Macintosh powerpc
mic42plain2006-08-06 18:44:39
Logged In: YES 
user_id=302287

The crashing machine has this for uname:
Linux chronos 2.6.16.21-0.13-smp #1 SMP Mon Jul 17 17:22:44
UTC 2006 x86_64 x86_64 x86_64 GNU/Linux

With this glibc:
GNU C Library development release version 2.4 (20060526), by
Roland McGrath et al.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or
FITNESS FOR A
PARTICULAR PURPOSE.
Configured for i686-suse-linux.
Compiled by GNU CC version 4.1.0 (SUSE Linux).
Compiled on a Linux 2.6.16 system on 2006-05-26.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        GNU libio by Per Bothner
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
        NoVersion patch for broken glibc 2.0 binaries
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
Thread-local storage support included.

So maybe this is an SMP issue?

Any advice what i could do to get more info about this issue?
mic42plain2006-08-06 18:46:34
Logged In: YES 
user_id=302287

Could this be related to the crash in Bug 1082283 ?
dkf Ticket [1516686fff]: 1 change [History diff]2006-08-07 21:05:46
hobbsplain2007-02-09 06:43:52
Logged In: YES 
user_id=72656
Originator: NO

Is this possibly related to 1654104?  It requires using unlimited stack size in your shell settings.  Fixed 2007-02-08.
hobbsplain2007-06-11 04:26:45
Logged In: YES 
user_id=72656
Originator: NO

I believe this fix covered it:

2007-05-29  Jeff Hobbs  <[email protected]>

* unix/tclUnixThrd.c (Tcl_JoinThread): fix for 64-bit handling of
pthread_join exit return code storage. [Bug 1712723]
Log in (anonymous is fine) to add a comment.