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

scipy.signal.iirdesign segfaults in scipy 0.6.0 (Trac #912) #1439

Closed
scipy-gitbot opened this issue Apr 25, 2013 · 3 comments
Closed

scipy.signal.iirdesign segfaults in scipy 0.6.0 (Trac #912) #1439

scipy-gitbot opened this issue Apr 25, 2013 · 3 comments
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected Migrated from Trac scipy.signal
Milestone

Comments

@scipy-gitbot
Copy link

Original ticket http://projects.scipy.org/scipy/ticket/912 on 2009-04-03 by trac user abergeron, assigned to unknown.

I tried using the iirdesign function to create a lowpass filter like this:

scipy.signal.iirdesign(wp=0.2, ws=0.5, gstop=-3, gpass=1, output='ba')

and got a segfault. Mucking around with the parameters did not help. As trying to get 'zpk' output.

After this in gdb:

run -c "import scipy.signal; scipy.signal.iirdesign(ws=0.2, wp=0.5, gstop=-3, gpass=1, output='ba')"

I get this as a backtrace:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0xbf7ffff8
0x0121cf44 in cephes_ellpj ()
(gdb) bt
#0 0x0121cf44 in cephes_ellpj ()
#1 0x0120a950 in PyUFunc_dd_dddd ()
#2 0x00603150 in PyUFunc_GenericFunction ()
#3 0x006042dc in ufunc_generic_call ()
#4 0x00007f34 in PyObject_Call ()
#5 0x000afd08 in PyEval_EvalFrameEx ()
#6 0x000b1d90 in PyEval_EvalCodeEx ()
#7 0x000320b8 in function_call ()
#8 0x00007f34 in PyObject_Call ()
#9 0x000b0350 in PyEval_EvalFrameEx ()
#10 0x000b1d90 in PyEval_EvalCodeEx ()
#11 0x000afc88 in PyEval_EvalFrameEx ()
#12 0x000b1d90 in PyEval_EvalCodeEx ()
#13 0x000afc88 in PyEval_EvalFrameEx ()
#14 0x000afbec in PyEval_EvalFrameEx ()
#15 0x000b1d90 in PyEval_EvalCodeEx ()
#16 0x000afc88 in PyEval_EvalFrameEx ()
#17 0x000b1d90 in PyEval_EvalCodeEx ()
#18 0x000afc88 in PyEval_EvalFrameEx ()
#19 0x000b1d90 in PyEval_EvalCodeEx ()
#20 0x000b1f30 in PyEval_EvalCode ()
#21 0x000d8398 in PyRun_StringFlags ()
#22 0x000d8454 in PyRun_SimpleStringFlags ()
#23 0x000e38b8 in Py_Main ()
#24 0x00001a10 in _start ()
#25 0x00001720 in start ()

I tried this on Mac OS X 10.5.6 on a G5 PPC (0.6.0 compiled as part of Sage and 0.7.0 stand-alone), and on a linux machine running Fedora Core 8 x86 machine (0.6.0 stand-alone install), and got the same segfault.

@scipy-gitbot
Copy link
Author

trac user abergeron wrote on 2009-04-03

Okay, the backtrace should look like this:

> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_PROTECTION_FAILURE at address: 0xbf7ffff8
> 0x0121cf44 in cephes_ellpj ()
> (gdb) bt
> #0  0x0121cf44 in cephes_ellpj ()
> #1  0x0120a950 in PyUFunc_dd_dddd ()
> #2  0x00603150 in PyUFunc_GenericFunction ()
> #3  0x006042dc in ufunc_generic_call ()
> #4  0x00007f34 in PyObject_Call ()
> #5  0x000afd08 in PyEval_EvalFrameEx ()
> #6  0x000b1d90 in PyEval_EvalCodeEx ()
> #7  0x000320b8 in function_call ()
> #8  0x00007f34 in PyObject_Call ()
> #9  0x000b0350 in PyEval_EvalFrameEx ()
> #10 0x000b1d90 in PyEval_EvalCodeEx ()
> #11 0x000afc88 in PyEval_EvalFrameEx ()
> #12 0x000b1d90 in PyEval_EvalCodeEx ()
> #13 0x000afc88 in PyEval_EvalFrameEx ()
> #14 0x000afbec in PyEval_EvalFrameEx ()
> #15 0x000b1d90 in PyEval_EvalCodeEx ()
> #16 0x000afc88 in PyEval_EvalFrameEx ()
> #17 0x000b1d90 in PyEval_EvalCodeEx ()
> #18 0x000afc88 in PyEval_EvalFrameEx ()
> #19 0x000b1d90 in PyEval_EvalCodeEx ()
> #20 0x000b1f30 in PyEval_EvalCode ()
> #21 0x000d8398 in PyRun_StringFlags ()
> #22 0x000d8454 in PyRun_SimpleStringFlags ()
> #23 0x000e38b8 in Py_Main ()
> #24 0x00001a10 in _start ()
> #25 0x00001720 in start ()

And I should note that I found out that the gstop parameter should not be negative. Nevertheless, I would have expected an error, not a segfault for being stupid.

@scipy-gitbot
Copy link
Author

@cournape wrote on 2009-04-17

Don't worry, a segfault is usually a bug, even if you used wrong arguments.

The problem should be detected in ellipord, which is the funciton which determines the filter order necessary to respect the given constraints (it returns a 0 order filter in your case...). The segfault is related to another problem, namely ellipj behavior when its second argument is nan. This is another ticket, gh-1454.

@scipy-gitbot
Copy link
Author

@cournape wrote on 2009-04-20

I close this one, as the segfault is fixed. I opened gh-1455 for the buggy behavior of ellipord, though.

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 Migrated from Trac scipy.signal
Projects
None yet
Development

No branches or pull requests

1 participant