Menu

#2771 Segmentation fault in new thread on Cray X1

obsolete: 8.4.6
closed-fixed
5
2009-06-18
2004-06-20
No

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.

Discussion

  • Rob Ratcliff

    Rob Ratcliff - 2004-06-20

    Stack trace related to segmentation fault

     
  • Rob Ratcliff

    Rob Ratcliff - 2004-06-20

    Compiler warnings for Tcl on Cray X1

     
  • Rob Ratcliff

    Rob Ratcliff - 2004-06-20
    • priority: 5 --> 9
     
  • Rob Ratcliff

    Rob Ratcliff - 2004-06-20
    • priority: 9 --> 5
     
  • Rob Ratcliff

    Rob Ratcliff - 2004-06-20

    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.

     
  • Rob Ratcliff

    Rob Ratcliff - 2004-06-21

    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

     
  • Donal K. Fellows

    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.

     
  • Donal K. Fellows

    • status: open --> closed-fixed
     
MongoDB Logo MongoDB