-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
glibc detected: double free or corruption error on numpy.percentile #4836
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
Comments
hm thats bad, can you provide the images so we can reproduce it? |
Total sample of images is 361. Those images are X-Ray projection taken from angle 0-360 (in TIFF format). But 4-5 images is enough to reproduce the error, so this is the link to the 5 images I used in the trial https://www.dropbox.com/s/jtotuirzztybujl/samples.zip. |
I can't reproduce the issue, I noticed you are using the ICC compiler. Do you still see the issue when you build numpy with GCC? can you maybe create a valgrind log of the issue, this suppression file might keep the false positives down: |
Do I need to recompile my Python build using GCC so that numpy can be build using it? I found that I can't change my compiler flags, so though I specify Here, I rebuild numpy through ver 1.8.1 to the most recent one and found that 1.8.1 works fine, while >=1.9 has the issue. One thing that I find strange is this:
In numpy 1.8.1 |
yes that is the case for me too, there is a huge mistake in the pivot handling of the multiple selection algorithm :/ |
when orders are selected where the kth element falls into an equal range the the last stored pivot was not the kth element, this leads to losing the ordering of smaller orders as following selection steps can start at index 0 again instead of the at the offset of the last selection. Closes numpygh-4836
can you try the patch in the linked PR, it should fix the wrong result, but I don't see how it could fix the crash. |
Yeah, it's still crash like crazy 😄 But I've checked the fix and still found an inconsistency with
While in 1.8.1 |
I get low 0 for all images you sent me. |
which version of skimage are you using? |
I use skimage 0.10.0. Hmm, this is weird... so I tried using
More trial:
The strangest thing is, it's always crash on image Block_1_0003.tiff. This is my current pip list:
Maybe I will try to recompile Python with GCC to see if that fix the issue :( |
I ran it with gccs undefined behavior sanitizer and it found no problems, so I don't know what is going on. |
Hi Julian, I've created valgrind log of my issue in https://gist.github.com/habibrosyad/7fbb8547350d3e2dee67, sorry for the late response. I tried to use Python 2.7.8 still compiled with ICC but with lower optimization flag (-O2) and the problem still there. From the log it's look like the problem comes from the compiler, as some lines there mention path to the compiler libs, am I right? |
no valgrind never reached the numpy code because it encountered some instruction it doesn't know about, you could try valgrind 3.9 and see if that works. fwiw I tried compiling python3.4 and numpy with the latest icc but could not reproduce any issue |
I've created valgrind 3.9 log in https://gist.github.com/habibrosyad/dbd911752ae526ffd8d0. Have you tried on version 2.7.6 or 2.7.8? |
I can't get python2.7 to compile with icc, so I used 3.4 |
I've found the root of my issue. Apparently, the culprit is the flags that I use in building numpy Me too can't get python2.7 to compile with icc at first, since it has problem with _ctypes module, so I used this patch https://github.com/atgreen/libffi/blob/master/src/x86/ffi64.c on ffi64.c (in |
does the current numpy master testsuite work with your build? you will get some errors due to subnormals but seeing if the partition tests work would be interesting |
This is my test result:
I've got one error, don't know what's that mean though. In my previous build which raise the previous issue, I got at least 5 errors for version 1.9 and 0 for version 1.8 with the same icc flags. |
I can't reproduce it with the options on that page either, so I can't do more, you'll have to debug it yourself or use GCC. |
Though I got one error on the test, the issue with |
when orders are selected where the kth element falls into an equal range the the last stored pivot was not the kth element, this leads to losing the ordering of smaller orders as following selection steps can start at index 0 again instead of the at the offset of the last selection. Closes numpygh-4836
Hi,
I've got this error while trying to run
np.percentile
on a series of images in a loop:So I tried running it in different ways:
But, I have no problem in running it outside loop:
It's just when I used
np.percentile
in loop then things got messy. I used numpy 1.9.0.dev-c24cc4e in this case, but on my other machine with numpy 1.8.0 has no problem at all.Best regards,
Habib
The text was updated successfully, but these errors were encountered: