Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_bisplev_integer_overflow: Segmentation fault (core dumped) #12401

Closed
Lechnio opened this issue Jun 22, 2020 · 1 comment
Closed

test_bisplev_integer_overflow: Segmentation fault (core dumped) #12401

Lechnio opened this issue Jun 22, 2020 · 1 comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.interpolate

Comments

@Lechnio
Copy link
Contributor

Lechnio commented Jun 22, 2020

After scipy 1.4.1 instalation I have run the tests with

$ python3
>>> import scipy
>>> scipy.test()

and the 'test_bisplev_integer_overflow' test exited with Segmentation fault (core dumped). I added few prints that can help me to trace this issue (I do not have dev/debug tools on my target device), and what I figured out, the seg fault occurs on call:
scipy/interpolate/src/_fitpackmodule.c:198

197: else {
198:         BISPEV(tx, &nx, ty, &ny, c, &kx, &ky, x, &mx, y, &my, z, wrk, &lwrk,
199:                iwrk, &kwrk, &ier);
200: }

BISPEV is not NULL here and has an address assigned, but I could not debug it deeper, since seg fault occurs just after this call.
I have been testing this for a while and the bisplev function works in other cases (e.g. example codes from https://docs.scipy.org/doc/scipy-1.4.1/reference/tutorial/interpolate.html), I only noticed problem with input data from the mentioned test.

Error message:

When I run test_bisplev_integer_overflow line by line in python console:

On my intel host:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/lechnio/.local/lib/python3.6/site-packages/scipy/interpolate/_fitpack_impl.py", line 1054, in bisplev
    z, ier = _fitpack._bispev(tx, ty, c, kx, ky, x, y, dx, dy)
RuntimeError: Cannot produce output of size 2621440x2621440 (size too large)

I expect the same output for my target device.

On my target device:
>>> interpolate.bisplev(xp, yp, tck)
Segmentation fault (core dumped)

Target device info:

Hardware

Architecture: armv7l
Vendor ID: ARM
Model name: Cortex-A9

Software

GCC: 9.2.0
Python: 3.7.7
Pybind11: 2.5.0
Scipy: 1.4.1
Numpy: 1.15.4

@ev-br ev-br added defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.interpolate labels May 4, 2021
gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Nov 5, 2021
Known broken upstream for years (ditto in Gentoo). Other tests seem okay
and we're going to have to hope that's sufficient until there's a resolution
upstream.

Other distros are trying to battle this too.

Bug: https://bugs.gentoo.org/743295
Bug: scipy/scipy#9245
Bug: scipy/scipy#12401
Bug: scipy/scipy#12471
Signed-off-by: Sam James <sam@gentoo.org>
@rgommers
Copy link
Member

rgommers commented Apr 2, 2022

This was continued in gh-12471, so closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.interpolate
Projects
None yet
Development

No branches or pull requests

3 participants