Archived

This forum has been archived. Please start a new discussion on GitHub.

Segmentation fault with Ice for Python

Hi
Any ideas on why this should happen. It only seems to be signal that causes the problem. Is this a name clash issue? I've rearranged my imports so I import scipy.signal before Ice even though that module does not use it.

Bob

Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Ice
>>> import scipy.signal
Segmentation fault

and this way around
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy import signal
>>> import Ice
>>>

Comments

  • xdm
    xdm La Coruña, Spain
    Hi Bob,

    We have investigated this issue and the problem is related to dlopen flags set in Ice for load plug-ins, this settings caused the segmentation when numpy load one of its extensions or modules.

    We have tested that in modern linux (python-2.5, gcc-4.x) this ldflags are no longer needed, we will investigate further if this is needed for any of the supported platforms.

    To work around this issue you can comment the following lines at the top of Ice.py
    #try:
    #    import dl
        #
        # This is necessary for proper operation of Ice plug-ins.
        # Without it, RTTI problems can occur.
        #
    #    sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)
    #except ImportError:
        # If the dl module is not available and we're running on a linux
        # platform, use the hard coded value of RTLD_NOW|RTLD_GLOBAL.
    #    if sys.platform.startswith("linux"):
    #        sys.setdlopenflags(258)
    #    pass
    

    We'll include a fix for the issue in next Ice release.

    Thanks for point this bug out, and let us know if you need further help with this

    Regards,
    José