Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 236334 - scipy.integrate.quad, Illegal instruction on i386 (recompilation helps)
Summary: scipy.integrate.quad, Illegal instruction on i386 (recompilation helps)
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: scipy
Version: 6
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jef Spaleta
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-13 09:00 UTC by Jan Martinek
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-04-15 20:15:13 UTC


Attachments (Terms of Use)

Description Jan Martinek 2007-04-13 09:00:03 UTC
Description of problem:
scipy.integrate.quad crashes with "Illegal instruction". But only on i386
architecture. The solution is rebuilding the package from src.rpm. On x86_64 it
works fine.

Version-Release number of selected component (if applicable):
scipy-0.5.2-1.fc6, Build Date: Sun 25 Feb 2007 08:38:09 PM CET


How reproducible:
Always

Steps to Reproduce:
cut and paste this code to your terminal:

python << EOF
from scipy.integrate import quad
from math import pi,cos

def ft(t):
    return cos(t)/(1 + 0.5*cos(t))**1.5
print quad(ft, 0, 2*pi)[0]
EOF

Actual results: 
On i386: Illegal instruction
On x86_64: -3.22295889217

Expected results:
-3.22295889217

Additional info: I tried
rpmbuild --rebuild scipy-0.5.2-1.fc7.src.rpm
and the resulting package is functional.

Comment 1 Jef Spaleta 2007-04-13 20:41:28 UTC
Okay I can definitely confirm the problem on fc6.  The problem does not exist on
fc7 for me. 

The fact that recompiling seems to help, seems to suggest to me that something
in the underlying libraries in fc6 have changed. Has there been a numpy, atlas,
blas or fftw update for fc6 since the latest scipy package was released?

I'm going to do some more local testing here and try to confirm if a rebuild
under mock works.  The problem with doing a local rpmbuild --rebuild is that you
aren't using the same environment as the buildsystem. This could be a subtle
buildsystem environment issue.

-jef

Comment 2 Jef Spaleta 2007-04-13 21:38:29 UTC
Okay a simple local rebuild under mock does not fix the problem for me.

Can you capture the output from your local rpmbuild session and attach it to
this bug report.  I need to understand what is different in your local
environment from that of the mock based build environment.

-jef


Comment 3 Jef Spaleta 2007-04-13 21:51:40 UTC
Okay, confirmed, on an fc6 box running rpmbuild --rebuild  gives me a working
package.  But running a local mock build of the package does not fix the problem.

So this must be a subtle issue with the buildsystem environment compared to a
local default user environment.  Hopefully I can figure this out, though any
help would be appreciated.

-jef

Comment 4 Jef Spaleta 2007-04-14 10:50:11 UTC
Okay i think i figured out what was going wrong. Scipy relies heavily on the
distutils module in numpy to build optimal fortran compiler flags dynamically. 
Optimal to numpy means, cpu specific. So what was happening was the binaries
were being built with optional instruction sets available on the buildserver's
cpus, but not available on all cpus. 

I'm going to be doing some local test builds on my machines over the weekend to
make sure I've nailed the problem and that I'm setting a reasonable set of
compiler options. I'll write back with location for test packages for you to try
out today or tomorrow.


-jef

Comment 5 Jef Spaleta 2007-04-14 18:55:20 UTC
I think I fixed it.
Can you please test the binary i built locally:
http://jspaleta.thecodergeek.com/Fedora%20SRPMS/scipy/scipy-0.5.2-1.1.fc6.i386.rpm

If this binary works for you, I'll go ahead and submit it to the buildsystem as
an update.

-jef

Comment 6 Jef Spaleta 2007-04-15 20:15:13 UTC
Okay scipy-0.5.2-1.1.fc6 has been built and is awaiting signing for release to
fc6-extras. Please test this package when it becomes available for download and
re-open if the problem persists.

-jef

Comment 7 Jan Martinek 2007-04-16 20:23:29 UTC
Hello,

thank you very much for what you have done. I downloaded and installed the rpm
package you built and it does not contain the error anymore. Great!

Bye,
Jan Martinek


Note You need to log in before you can comment on or make changes to this bug.