Segmentation fault by importing scipy.interpolate

Bug #1183402 reported by matthias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Won't Fix
Low
Unassigned

Bug Description

importing scipy.interpolate leads to a segmentation fault

kubuntu 13.04
yade 0.90.3 (stable) and yade_daily (0.97.0)
python 2.7.5

Revision history for this message
Alexander Eulitz [Eugen] (kubeu) wrote :
Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

same problem with scipy.stats

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

I found something that could help for a workaround:

ln -s yade-daily yadeimport.py

$ipython
In [1]: import yadeimp
In [2]: import scipy.interpolate
Segmentation fault

$ipython
In [1]: import scipy.interpolate
In [2]: import yadeimp
-> No problemo

Importing scipy by default at startup?...

Revision history for this message
Anton Gladky (gladky-anton) wrote : Re: [Bug 1183402] Re: Segmentation fault by importing scipy.interpolate

Hmm, interesting.

Importing scipy at startup is OK, but we need to add scipy in
dependencies.

It is better to find out, why it crashes to escape a workaround.

Anton

2013/8/23 Bruno Chareyre <email address hidden>:
> I found something that could help for a workaround:
>
> ln -s yade-daily yadeimport.py
>
> $ipython
> In [1]: import yadeimp
> In [2]: import scipy.interpolate
> Segmentation fault
>
> $ipython
> In [1]: import scipy.interpolate
> In [2]: import yadeimp
> -> No problemo
>
> Importing scipy by default at startup?...
>
> --
> You received this bug notification because you are subscribed to Yade.
> https://bugs.launchpad.net/bugs/1183402
>
> Title:
> Segmentation fault by importing scipy.interpolate
>
> Status in Yet Another Dynamic Engine:
> New
>
> Bug description:
> importing scipy.interpolate leads to a segmentation fault
>
> kubuntu 13.04
> yade 0.90.3 (stable) and yade_daily (0.97.0)
> python 2.7.5
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/yade/+bug/1183402/+subscriptions

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

Well, importing scipy by default was a stupid idea, since many other modules may have to be imported the same way (Raphael was importing his own fortran library, for instance).

I added an optional command line argument, so that it does not add global dependencies for yade.
https://github.com/yade/trunk/commit/317d1718bd29cba22a1d22ed9422681f36d6e2ab

@Matthias, you can type "yade -lscipy.interpolate"
@Raphaël: "yade -lnsmp1d_yade"

I've seen a few projects having similar problems with scipy, some of them quite old [,12,3].
I noticed that both scipy and Raphael's library are based on fortran code. Maybe related?
I also realize that Raphael's lib has blas/lapack/friends as dependencies, which is also the case of some modules imported by yade (matplotlib, PFV option,...). They are maybe using incompatible variants of those, as suggested by [2]?

[1] http://mail.scipy.org/pipermail/scipy-dev/2007-March/006724.html
[2] http://blog.tremily.us/posts/SciPy_and_ATLAS/
[3] http://lists.opensuse.org/opensuse-bugs/2010-11/msg00466.html

Changed in yade:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

For the record, a similar problem found a solution in [1]. The fix mentioned there (see below) doesn't work in our case unfortunately, but it may ring a bell for someone.

import sys
flags = sys.getdlopenflags()
import pybel
sys.setdlopenflags(flags)
import scipy.linalg

[1] http://grokbase.com/t/scipy.org/scipy-tickets/12bc83e10j/scipy-1772-scipy-linalg-segfaults-when-imported-after-pybel

Revision history for this message
Anton Gladky (gladky-anton) wrote :

It looks like the problem is gone with in latest distributions. In Debian Jessie the problem does not exist any more.

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

Thanks Anton -> "won't fix"

Changed in yade:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.