Share

Tcl

Tracker: Bugs

5 Stack space check fails on AIX - ID: 1889719
Last Update: Comment added ( sf-robot )

I am trying to build/tect/install tcl on an aix 5.2 using gcc 2.9.

/usr2/projets/paltech/amorce/sources/tcl8.5.1/unix/configure
--enable-threads --disable-load --disable-shared --disable-langinfo
--prefix=/usr2/projets/paltech/amorce/racine
make

all this seems to be OK

"make test" fail with the following error

LIBPATH=`pwd`:${LIBPATH}; export LIBPATH; \

TCL_LIBRARY="/usr2/projets/paltech/amorce/sources/tcl8.5.1/library"; export
TCL_LIBRARY; \
./tcltest
/usr2/projets/paltech/amorce/sources/tcl8.5.1/unix/../tests/all.tcl
application-specific initialization failed: out of stack space (infinite
loop?)
out of stack space (infinite loop?)
while executing
"package require Tcl 8.5"
(file
"/usr2/projets/paltech/amorce/sources/tcl8.5.1/unix/../tests/all.tcl" line
15)


I've tried another build from scratch with --disable-threads => same
result

this problem desn't seem to be fixed for this platform


Nobody/Anonymous ( nobody ) - 2008-02-08 16:46

5

Closed

None

miguel sofer

41. Memory Allocation

obsolete: 8.5.1

Public


Comments ( 8 )

Date: 2008-07-17 02:20
Sender: sf-robotSourceForge.net Site Admin


This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).


Date: 2008-07-02 11:05
Sender: msoferProject AdminAccepting Donations


I still recommend the workaround in the first post below: disable stack
checking! That is, compile with -DTCL_NO_STACK_CHECK=1.

What your numbers mean: whenever outerVarPtr<stackBound Tcl thinks you
blew the stack (because stackGrowsDown=1, otherwise it'de be >)

What the result probably means is: AIX is not satisfying the assumptions
for that code, so that either
(a) the whole approach fails
(b) stackBound and/or stackGrowsDown are not set properly to begin with

The whole stack checking will be eliminated before 8.6.1: it is ugly,
hacky, not-really-portable as you're finding out. It cannot be done both
correct and portable. And it will not be as necessary due to other changes
that will be coming in.






Date: 2008-07-02 06:25
Sender: cnassau


We've been seeing the same failure on various AIXes, most recently on a
machine where "ulimit -s" reported "hard" which allegedly means a full 4GB
stack. Tcl worked after *decreasing* the stack size with "ulimit -s
32768".

To debug this I've added some "fprintf"'s to
GetStackSize and TclpGetCStackParams which log the return values. The
following failure happens on AIX 5.1 with Tcl 8.5.3, built using xlC_r:

[cnassau] bluebull(AIX[5.1.0.0]):unix/$ make install
Installing libtcl8.5.so to /space/cnassau/tcl/lib/
Installing libtcl8.5.exp to /space/cnassau/tcl/lib/
Installing tclsh as /space/cnassau/tcl/bin/tclsh8.5
Installing tclConfig.sh to /space/cnassau/tcl/lib/
Installing libtclstub8.5.a to /space/cnassau/tcl/lib/
Installing time zone data
GetStackSize: stacksize = 7fff7ffe, rawStacksize = 7ffffffe
TclpGetCStackParams: outerVarPtr = 2ff22410, stackBound = aff2a412,
stackGrowsDown =1
application-specific initialization failed: out of stack space (infinite
loop?)
out of stack space (infinite loop?)
while executing
"proc copyDir { d1 d2 } {

puts [format {%*sCreating %s} [expr { 4 * [info level] }] {} \
[file tail $d2]]

file delete -force -- $d2
..."
(file "/home/cnassau/src/tcl8.5.3/unix/../tools/installData.tcl" line
23)
make: *** [install-tzdata] Error 1

I'm not sure if I'm reading this correctly but it seems the allowable
stack region consists of [0, 2ff22410] and [aff2a412, ffffffff]. Could this
be a problem for the stack check?



Date: 2008-04-02 12:48
Sender: msoferProject AdminAccepting Donations


192kB stack? That is very low, Please try to increase the stack size.


Date: 2008-04-02 06:44
Sender: nobody

Logged In: NO

I have the same problem on my AIX 5.3 and the "workaround" does give the
same error.
There is however an Warning message during ./configure and that message
is:
Warning: Can't figure out how to do dynamic loading or shared libraries on
this system

Only ./configure (without --enable-threads --disable-load --disable-shared
--disable-langinfo works)
The error refers to the file /mqm/tcl8.5.1/unix/../tests/all.tcl and line
15
line 15 says: package require Tcl 8.5

does this mean that tcl 8.5.1 is an upgrade installation and not an
initial installation ?


Date: 2008-02-10 13:47
Sender: nobody

Logged In: NO

Default stack on PowerPC seems to be very low, just 192kB see:
https://computing.llnl.gov/tutorials/pthreads/



Date: 2008-02-10 13:40
Sender: nobody

Logged In: NO

This might be helpful?
https://computing.llnl.gov/mpi/aix_stack.html


Date: 2008-02-08 16:55
Sender: msoferProject AdminAccepting Donations


WORKAROUND
define CFLAGS="-DTCL_NO_STACK_CHECK=1" at configure time, or edit the
makefile to add that definition.

FIX
I'll appreciate contact info, and please log in to sourceforge so that we
can communicate via this bug ticket. I do not have AIX anyqhere near me, so
I'll need your collaboration to fix this.


Attached File

No Files Currently Attached

Changes ( 11 )

Field Old Value Date By
status_id Pending 2008-07-17 02:20 sf-robot
close_date 2008-07-02 11:05 2008-07-17 02:20 sf-robot
status_id Open 2008-07-02 11:05 msofer
close_date 2008-06-28 13:45 2008-07-02 11:05 msofer
status_id Pending 2008-07-02 06:25 cnassau
close_date - 2008-06-28 13:45 msofer
status_id Open 2008-06-28 13:45 msofer
priority 8 2008-04-02 12:48 msofer
category_id None 2008-02-08 16:55 msofer
assigned_to nobody 2008-02-08 16:55 msofer
priority 5 2008-02-08 16:55 msofer