[Python-bugs-list] [Bug #129995] segfaults on AIX if configured with threads

noreply@sourceforge.net noreply@sourceforge.net
Fri, 16 Feb 2001 02:53:07 -0800


Bug #129995, was updated on 2001-Jan-24 16:44
Here is a current snapshot of the bug.

Project: Python
Category: Threads
Status: Closed
Resolution: Wont Fix
Bug Group: Not a Bug
Priority: 5
Submitted by: bcollar
Assigned to : twouters
Summary: segfaults on AIX if configured with threads

Details: Hi. AIX 4.2.1. ran ./configure --without-gcc
--prefix=/development/utils. make CC=xlC OPT="-O2 -qmaxmem=4000". some of
the make output follows. Let me know if you need all of it.

if test ! -f ../Modules/hassignal;  then echo adding sigcheck.o; ar r
../libpython2.1.a sigcheck.o;  else echo leaving sigcheck.o out; fi
leaving sigcheck.o out
        touch add2lib
        if test -f hassignal;  then echo removing sigcheck.o intrcheck.o; 
ar d ../libpython2.1.a sigcheck.o intrcheck.o 2>/dev/null;  else echo
leaving sigcheck.o intrcheck.o in; fi
removing sigcheck.o intrcheck.o
make: 1254-004 The error code from the last command is 2.
make: 1254-005 Ignored error code 2 from last command.
        ar cr ../libpython2.1.a gcmodule.o  threadmodule.o  posixmodule.o 
_sre.o  signalmodule.o config.o getpath.o main.o getbuildinfo.o
        touch add2lib
        cd Modules; make OPT="-O2 -qmaxmem=4000" python.o
        xlC -O2 -qmaxmem=4000 -I./../Include -I.. -DHAVE_CONFIG_H -c
python.c
        expr `cat buildno` + 1 >buildno1
        mv -f buildno1 buildno
        xlC -c -O2 -qmaxmem=4000 -I. -DHAVE_CONFIG_H -DBUILD=`cat buildno` 
./Modules/getbuildinfo.c
        ar cr libpython2.1.a getbuildinfo.o
        ranlib libpython2.1.a
        true
        cd Modules;  make OPT="-O2 -qmaxmem=4000" VERSION="2.1" 
prefix="/development/utils/" exec_prefix="/development/utils/" 
LIBRARY=../libpython2.1.a link
        ./makexp_aix python.exp "" ../libpython2.1.a;  xlC 
-Wl,-bE:python.exp -lld python.o  ../libpython2.1.a   -ldl  -lpthreads -lm 
-o python 
        mv python ../python
        ./python ./setup.py build
pthread_mutex_init: Error 0
pthread_cond_init: Error 0
pthread_mutex_lock[1]: Error 0
make: 1254-059 The signal code from the last command is 11.


Follow-Ups:

Date: 2001-Feb-16 02:53
By: twouters

Comment:
Marking it 'not a bug', then, to reflect the fact it's something we can't
really fix, and closing it.

-------------------------------------------------------

Date: 2001-Feb-15 15:26
By: bcollar

Comment:
Response to twouters' question: yes, the error is fixed when using cc_r.


-------------------------------------------------------

Date: 2001-Feb-15 03:47
By: twouters

Comment:
I've rewritten the AIX blurb to mention cc_r (or any threadsafe compiler,
really) even when not compiling for C++ support.
bcollar, does using cc_r (or xlC_r) instead of xlC fix your problem ?


-------------------------------------------------------

Date: 2001-Feb-06 09:18
By: donnc

Comment:
Instead of xlC,  use cc_r.  That (on my host anyway) is
the xlC.cfg compiler configuration that uses the reentrant
libraries for thread support, which are not the default.
-------------------------------------------------------

Date: 2001-Feb-02 05:59
By: twouters

Comment:
I'd like to note that though I don't have access to AIX myself, I do live
with and share a bed with a system administrator who does, very much so,
many, many hours per week. She doesn't have a *compiler* on AIX, though, so
more than general AIX info and the odd programmers manual is out of the
question.

-------------------------------------------------------

Date: 2001-Feb-01 09:21
By: bwarsaw

Comment:
Assigning this to Thomas, since I don't have an AIX machine handy, and he
made the mistake of chiming in. :)
-------------------------------------------------------

Date: 2001-Feb-01 06:53
By: twouters

Comment:
Try making sure configure itself is also run with the same CC and OPT
arguments, by running configure like this (using (ba)sh syntax, should work
in ksh as well):

CC=xlC CFLAGS="-O2 -qmaxmem=4000" ./configure <normalopts>

configure might be mis-detecting some things because of the different
arguments.

-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=129995&group_id=5470