[C++-sig] Boost.Python exception problems on AIX 5.3 (compiled with gcc 3.4.3, 64 bit)

J. Michael Owen mikeowen at llnl.gov
Thu Dec 21 20:02:41 CET 2006


I'm having some problems with Boost.Python (1.33.1) exceptions not  
being caught properly when I compile with gcc 3.4.3 on AIX 5.3 (I'm  
using 64 bit mode).  Boost.Python exceptions don't seem to be handled  
correctly, resulting in Python exiting with an error like

terminate called after throwing an instance of  
'boost::python::error_already_set'
Abort

This problem shows up in the Boost.Python self tests:  for instance the  
"libs/python/test/vector_indexing_suite.py" test exits in the method  
"print_xvec" because of an uncaught end of iteration exception --  
here's the final error message I see:

Trying:
     print_xvec(v)
Expecting:
     [ a b c d e ]

EXIT STATUS: 134

I'll append the complete log from "vector_indexing_suite.py" to the end  
of this message for completeness.  Of the Boost.Python self tests, the  
following set currently fail for me:

crossmod_exception
shared_ptr
polymorphism
polymorphism2
auto_ptr
args
enum
exception_translator
try
builtin_converters
callbacks
object
list
slice
virtual_functions
implicit
iterator
extract
opaque
pickle2
vector_indexing_suite
map_indexing_suite

I'm building the python used (2.4.3) myself, and I've confirmed that it  
is being built with the C++ compiler set (g++-3.4.3) which is being  
used for linking.  Does anyone have any suggestions I could use to  
track down this problem?

Thanks!

Mike.

In case it's of interest, here's the complete log from  
vector_indexing_suite:

execute-test  
../../../bin/boost/libs/python/test/vector_indexing_suite.test/gcc/ 
release/vector_indexing_suite.run
/bin/sh[8]: 197050 Abort
====== BEGIN OUTPUT ======
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/site.pyc  
matches /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/site.py
import site # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/site.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/os.pyc matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/os.py
import os # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/os.pyc
import posix # builtin
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/posixpath.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/posixpath.py
import posixpath # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/posixpath.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/stat.pyc  
matches /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/stat.py
import stat # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/stat.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/UserDict.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/UserDict.py
import UserDict # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/UserDict.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/copy_reg.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/copy_reg.py
import copy_reg # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/copy_reg.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/types.pyc  
matches /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/types.py
import types # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/types.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/warnings.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/warnings.py
import warnings # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/warnings.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/linecache.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/linecache.py
import linecache # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/linecache.pyc
import encodings # directory  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/encodings
#  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/encodings/ 
__init__.pyc matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/encodings/ 
__init__.py
import encodings # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/encodings/ 
__init__.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/codecs.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/codecs.py
import codecs # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/codecs.pyc
import _codecs # builtin
#  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/encodings/ 
aliases.pyc matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/encodings/ 
aliases.py
import encodings.aliases # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/encodings/ 
aliases.pyc
#  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/encodings/ 
iso8859_1.pyc matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/encodings/ 
iso8859_1.py
import encodings.iso8859_1 # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/encodings/ 
iso8859_1.pyc
Python 2.4.3 (#2, Dec 20 2006, 15:59:22)
[GCC 3.4.3] on aix5
Type "help", "copyright", "credits" or "license" for more information.
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/doctest.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/doctest.py
import doctest # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/doctest.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/__future__.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/__future__.py
import __future__ # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/__future__.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/traceback.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/traceback.py
import traceback # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/traceback.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/inspect.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/inspect.py
import inspect # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/inspect.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/string.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/string.py
import string # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/string.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/re.pyc matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/re.py
import re # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/re.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/sre.pyc  
matches /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/sre.py
import sre # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/sre.pyc
#  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/sre_compile.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/sre_compile.py
import sre_compile # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/sre_compile.pyc
import _sre # builtin
#  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/ 
sre_constants.pyc matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/sre_constants.py
import sre_constants # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/ 
sre_constants.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/sre_parse.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/sre_parse.py
import sre_parse # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/sre_parse.pyc
dlopen("/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib- 
dynload/strop.so", 2);
import strop # dynamically loaded from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib-dynload/ 
strop.so
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/dis.pyc  
matches /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/dis.py
import dis # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/dis.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/opcode.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/opcode.py
import opcode # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/opcode.pyc
import imp # builtin
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/tokenize.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/tokenize.py
import tokenize # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/tokenize.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/token.pyc  
matches /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/token.py
import token # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/token.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/unittest.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/unittest.py
import unittest # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/unittest.pyc
dlopen("/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib- 
dynload/time.so", 2);
import time # dynamically loaded from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib-dynload/ 
time.so
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/difflib.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/difflib.py
import difflib # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/difflib.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/heapq.pyc  
matches /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/heapq.py
import heapq # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/heapq.pyc
dlopen("/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib- 
dynload/itertools.so", 2);
import itertools # dynamically loaded from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib-dynload/ 
itertools.so
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/bisect.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/bisect.py
import bisect # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/bisect.pyc
dlopen("/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib- 
dynload/_bisect.so", 2);
import _bisect # dynamically loaded from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib-dynload/ 
_bisect.so
dlopen("/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib- 
dynload/_heapq.so", 2);
import _heapq # dynamically loaded from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib-dynload/ 
_heapq.so
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/pdb.pyc  
matches /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/pdb.py
import pdb # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/pdb.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/cmd.pyc  
matches /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/cmd.py
import cmd # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/cmd.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/bdb.pyc  
matches /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/bdb.py
import bdb # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/bdb.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/repr.pyc  
matches /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/repr.py
import repr # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/repr.pyc
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/pprint.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/pprint.py
import pprint # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/pprint.pyc
dlopen("/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib- 
dynload/cStringIO.so", 2);
import cStringIO # dynamically loaded from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib-dynload/ 
cStringIO.so
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/tempfile.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/tempfile.py
import tempfile # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/tempfile.pyc
import errno # builtin
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/random.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/random.py
import random # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/random.pyc
dlopen("/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib- 
dynload/math.so", 2);
import math # dynamically loaded from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib-dynload/ 
math.so
dlopen("/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib- 
dynload/binascii.so", 2);
import binascii # dynamically loaded from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib-dynload/ 
binascii.so
dlopen("/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib- 
dynload/_random.so", 2);
import _random # dynamically loaded from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib-dynload/ 
_random.so
dlopen("/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib- 
dynload/fcntl.so", 2);
import fcntl # dynamically loaded from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib-dynload/ 
fcntl.so
import thread # builtin
# /g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/StringIO.pyc  
matches  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/StringIO.py
import StringIO # precompiled from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/StringIO.pyc
dlopen("/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib- 
dynload/readline.so", 2);
import readline # dynamically loaded from  
/g/g12/owen/Spheral++/aix/trunk/optimize/lib/python2.4/lib-dynload/ 
readline.so
dlopen("/g/g12/owen/Spheral++/aix/trunk/optimize/spheral/src/ 
thirdPartyLibs/boost_1_33_1/bin/boost/libs/python/test/ 
vector_indexing_suite_ext.so/gcc/release/shared-linkable-true/ 
vector_indexing_suite_ext.so", 2);
dlopen("../../../bin/boost/libs/python/build/libboost_python.so/gcc/ 
release/shared-linkable-true/libboost_python.so", 2);
import libboost_python # dynamically loaded from  
../../../bin/boost/libs/python/build/libboost_python.so/gcc/release/ 
shared-linkable-true/libboost_python.so
import vector_indexing_suite_ext # dynamically loaded from  
/g/g12/owen/Spheral++/aix/trunk/optimize/spheral/src/thirdPartyLibs/ 
boost_1_33_1/bin/boost/libs/python/test/vector_indexing_suite_ext.so/ 
gcc/release/shared-linkable-true/vector_indexing_suite_ext.so
terminate called after throwing an instance of  
'boost::python::error_already_set'
running...
Trying:
     from vector_indexing_suite_ext import *
Expecting nothing
ok
Trying:
     x = X('hi')
Expecting nothing
ok
Trying:
     x
Expecting:
     hi
ok
Trying:
     x.reset() # a member function that modifies X
Expecting nothing
ok
Trying:
     x
Expecting:
     reset
ok
Trying:
     x.foo() # another member function that modifies X
Expecting nothing
ok
Trying:
     x
Expecting:
     foo
ok
Trying:
     x_value('bochi bochi')
Expecting:
     'gotya bochi bochi'
ok
Trying:
     def print_xvec(xvec):
         s = '[ '
         for x in xvec:
             s += repr(x)
             s += ' '
         s += ']'
         print s
Expecting nothing
ok
Trying:
     v = XVec()
Expecting nothing
ok
Trying:
     v[:] = [X('a'),X('b'),X('c'),X('d'),X('e')]
Expecting nothing
ok
Trying:
     print_xvec(v)
Expecting:
     [ a b c d e ]

EXIT STATUS: 134
====== END OUTPUT ======



More information about the Cplusplus-sig mailing list