8000 BUG: Fix various Big-Endian test failures (ppc64) by ahaldane · Pull Request #10443 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: Fix various Big-Endian test failures (ppc64) #10443

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

Merged
merged 1 commit into from
Jan 30, 2018

Conversation

ahaldane
Copy link
Member

This fixes a few miscellaneous test failures on ppc64 (big endian). They're all problems with the test, not numpy.

There is an additional heisenbug which I haven't been able to track down since it only occurs rarely, randomly: The test test_require_each occasionally fails to set the "align" flag on a complex128 array. May be related to #6377.

After these fixes, the only remaining ppc64 test failures are for float128 types (fixed on my local copy, to submit soon), and #10442.

@ahaldane ahaldane added this to the 1.14.1 release milestone Jan 20, 2018
@@ -420,6 +421,7 @@ def test_int_from_infinite_longdouble___int__(self):
assert_raises(OverflowError, x.__int__)
assert_equal(len(sup.log), 1)

@dec.skipif(platform.machine().startswith("ppc64"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be knownfailure?

@ahaldane
Copy link
Member Author
ahaldane commented Jan 21, 2018

The alignment bug is pretty bad, sometimes it crashes numpy. A large fraction of tests are occasionally affected. After some investigation I think it might be caused by a pretty serious glibc bug on ppc:

https://sourceware.org/bugzilla/show_bug.cgi?id=6527

(My VM is using glibc 2.23). They had malloc align at 8 bytes on ppc, but long double needs to be aligned at 16 bytes. So on the cases malloc gave us an 8-byte but not 16-byte aligned buffer, numpy starts to go crazy if we are using long doubles. I'm not 100% sure how the alignment of complex128 was affected too, but it must be something similar.

I don't really feel like trying to compile the newest glibc where that bug is fixed, so I'm just going to ignore all those random failures and assume they are glibc's fault.

(I didn't read that bug report super carefully, but they were discussing a lot about ppc32, so maybe my ppc64 system is a little different. But in any case I did confirm in gdb that I was getting 8-byte aligned buffers sometimes)

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Jan 27, 2018
@charris
Copy link
Member
charris commented Jan 29, 2018

Would be good to have an issue for the glibc bug for reference, and maybe a release note with a reference to the glibc version that has the bug fix.

@ahaldane
Copy link
Member Author

All right, will do.

@charris
Copy link
Member
charris commented Jan 30, 2018

Thanks Allan.

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Feb 9, 2018
@charris charris removed this from the 1.14.1 release milestone Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0