Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-06-18
15:34 • Closed ticket [976090ffff]: Segmentation fault in new thread on Cray X1 plus... artifact: 8697406a20 user: dkf
15:34 • Ticket [976090ffff]: 4 changes artifact: d719d71f16 user: dkf
2004-06-21
09:24 • Ticket [976090ffff]: 4 changes artifact: 756e513541 user: wobster
2004-06-20
20:00 • Ticket [976090ffff]: 4 changes artifact: 68a662dd47 user: wobster
20:00 • Ticket [976090ffff]: 1 change artifact: 935374fc08 user: wobster
10:35 • Ticket [976090ffff]: 1 change artifact: 6512e2013f user: wobster
10:34 • Ticket [976090ffff]: 4 changes artifact: 1cee96aac9 user: wobster
10:34 • Add attachment warnings.txt to ticket [976090ffff] artifact: 99bd54badd user: wobster
10:33 • Ticket [976090ffff] Segmentation fault in new thread on Cray X1 status still... artifact: 912366bc18 user: wobster
10:33 • Add attachment stacktrace.txt to ticket [976090ffff] artifact: 0dd0ad4774 user: wobster
03:33 • New ticket [976090ffff] Segmentation fault in new thread on Cray X1. artifact: 46c56eeb2b user: wobster

Segmentation fault in new thread on Cray X1

Closed / Fixed976090ffffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 17 years ago
Descriptionplain2004-06-20 03:33:42
I discovered a segmentation fault when running some
incrTcl code in a new thread. If I run the same script
in the main thread, there are no errors. It appears to
be related to object creation. 

I'm using the Tcl 8.4.6, the CVS head of the incrTcl
extension, and the CVS head of the thread extension.

I haven't been able to trace down the exact source of
the memory problem yet.

Any ideas?

Thanks,

Rob

p.s. I'm attaching the stack trace of the segmentation
fault and the compiler warnings I got when I compiled
Tcl on the Cray.
wobsterplain2004-06-20 10:33:43
File Added - 91249: stacktrace.txt
wobsterplain2004-06-20 10:34:50
File Added - 91250: warnings.txt
wobster Ticket [976090ffff]: 1 change [History diff]2004-06-20 10:35:29
wobster Ticket [976090ffff]: 1 change [History diff]2004-06-20 20:00:25
wobsterplain2004-06-20 20:00:26
Logged In: YES 
user_id=60261

Zoran Vasiljevic suggested that the default stack size for
the threads might not be large enough, so I  recompiled Tcl
using
make MEM_DEBUG_FLAGS=-DTCL_THREAD_STACK_MIN=1048576L
That seemed to fix the problem for now.
wobsterplain2004-06-21 09:24:33
Logged In: YES 
user_id=60261

As an FYI here are the default stack sizes for a few of the
platforms that I run on:

1.) Cray - 512 KB
2.) IRIX  - 128K 
3.) Solaris 32 bit - 1 MB
4.) Solaris 64 bit - 2 MB
5.) Linux -  2 MB

I'm going to recompile Tcl to use 2 MB on all platforms.

At some point, it might be nice to be able to configure the
Tcl interpreter at run time to change the stack sizes prior
to creating new threads. If there is any way that the user
could be alerted that the stack size is insufficient that'd
be great as well.

Thanks,

Rob
dkfplain2009-06-18 15:34:43
Tcl 8.6 should use a lot less stack due to its restructure in "stackless" form for NRE. Reopen this bug if it is still an issue.
dkf Closed ticket [976090ffff]. [History diff]2009-06-18 15:34:44
Log in (anonymous is fine) to add a comment.

Attachments: