Bug 607683 - Please fix the memory corruption problem with NumPy
Please fix the memory corruption problem with NumPy
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: numpy (Show other bugs)
12
All Linux
low Severity high
: ---
: ---
Assigned To: Gwyn Ciesla
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-24 10:56 EDT by Cong Ma
Modified: 2010-07-13 16:45 EDT (History)
4 users (show)

See Also:
Fixed In Version: numpy-1.3.0-9.fc12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-13 16:40:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Cong Ma 2010-06-24 10:56:31 EDT
Description of problem:
Under certain circumstances, importing from NumPy modules causes a double free. It is fixed upstream. Please check the upstream fix here:

http://projects.scipy.org/numpy/changeset/8364
http://projects.scipy.org/numpy/changeset/8367

Although Fedora's not exactly following NumPy upstream closely, I think it should be easy to merge those two simple patches into Fedora's numpy package.


Version-Release number of selected component (if applicable):
numpy-1.3.0-8.fc12


How reproducible:
Always.


Steps to Reproduce:
See upstream ticket:
http://projects.scipy.org/numpy/ticket/1464
http://projects.scipy.org/numpy/ticket/1464

Additional info:
This bug also causes extremely nasty behavior when using PyLint to check source code files that imports numpy.
Comment 1 Jef Spaleta 2010-06-24 11:31:16 EDT
I agree these are probably worth rolling as an update.  I'll try to find the time to build test packages for F13 and F12 with this small fix.

Do you know if 1.4.1 has this fix rolled in? It probably time to move rawhide to 1.4.1

-jef
Comment 2 Jef Spaleta 2010-06-24 11:51:48 EDT
These patches do not appear to apply. The file numpy/core/src/multiarray/number.c
does not exist in the 1.3.0 tree.  These apply only to the 1.4.x tree.  And the upstream bugreport doesn't provide a 1.3.0 equivalent patch.  I'll have to track this down and figure out what the correct patch is for 1.3.0

-jef
Comment 3 Jef Spaleta 2010-06-24 11:54:19 EDT
And... using the test code in the upstream bug report on Fedora 13. I can not reproduce the doublefree. Are you sure this is a problem in numpy 1.3.0? Can you provide me a script that consistently causes the problem on Fedora 12 or Fedora 13?

-jef
Comment 4 Cong Ma 2010-06-24 12:19:46 EDT
(In reply to comment #3)
> And... using the test code in the upstream bug report on Fedora 13. I can not
> reproduce the doublefree. Are you sure this is a problem in numpy 1.3.0? Can
> you provide me a script that consistently causes the problem on Fedora 12 or
> Fedora 13?
> 
> -jef    

Well, I can't test for F13 (yet), but on my F12 32-bit system the upstream test case, when run outside of gdb, produces an error message that indicates some memory corruption problem:

*** glibc detected *** python: corrupted double-linked list: 0x081cec48 ***

When run under gdb, the warning message is not shown. Also, the upstream test case does not *always* produce the bug.

Nonetheless, the issue w/ pylint seems to be much more reproducible. For an example, please see this Debian bug:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581058

[tl;dr version: Whenever you run PyLint over a python source file that does "import numpy", a memory error occurs. Meanwhile, pylint spews out false positives wrt numpy in the output before failing.]
Comment 5 Jef Spaleta 2010-06-24 12:43:03 EDT
There we go.  the pylint example worksforme.  That gives me what I need to ensure I build the correct equivalent patch for 1.3.0

Feel free to beat me to constructing the correct patch to 1.3.  

-jef
Comment 6 Jef Spaleta 2010-06-24 13:08:40 EDT
Got it.  I have a confirmed fix on F13.  Only one of the upstream patches apply. 
The other involves functionality introduced in 1.4.x series.

I'll give you a url for koji F12 and F13 builds shortly. I'll push to bodhi once you give me confirmation that the koji builds fix things for you.

-jef
Comment 7 Jef Spaleta 2010-06-24 13:16:56 EDT
Okay koji tasks are up. Please report back and tell me if the appropriate build from this set works for you.

F13:
http://koji.fedoraproject.org/koji/taskinfo?taskID=2270797
F12:
http://koji.fedoraproject.org/koji/taskinfo?taskID=2270805

Give the F12 koji task a few minutes to complete before you try to grab the binaries.
Comment 8 Cong Ma 2010-06-24 22:09:10 EDT
Thanks for the update! The F12 build works for me. Memory errors no longer happens.

On the other hand, Pylint still generates false positives whenever an attribute in the NumPy package is accessed (E1101, "nonexistent member"). However, this problem appears to be a separate issue from Pylint...
Comment 9 Fedora Update System 2010-06-25 02:52:17 EDT
numpy-1.3.0-9.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/numpy-1.3.0-9.fc13
Comment 10 Fedora Update System 2010-06-25 02:52:22 EDT
numpy-1.3.0-9.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/numpy-1.3.0-9.fc12
Comment 11 Fedora Update System 2010-06-25 14:12:28 EDT
numpy-1.3.0-9.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update numpy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/numpy-1.3.0-9.fc13
Comment 12 Fedora Update System 2010-06-25 14:19:15 EDT
numpy-1.3.0-9.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update numpy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/numpy-1.3.0-9.fc12
Comment 13 Fedora Update System 2010-07-13 16:40:37 EDT
numpy-1.3.0-9.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 14 Fedora Update System 2010-07-13 16:45:29 EDT
numpy-1.3.0-9.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

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