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
Segmentation fault on non x86 platforms #237
Comments
This issue still persists after the update of PySPH to the latest git revision (e3d5e10) |
The problem seems to be specific to Python 3.8, the latest Debian package builds for me on arm64 when building only for Python 3.7. |
@avalentino, @AdrianBunk -- I do not have access to one of these platforms. Is this issue resolved or are there any PySPH issues that need to be addressed? Could you please run the following:
So we have some idea of which test exactly is failing? Once we find that, we will need to see where this is failing. |
With commit f599a52 sources:
Backtrace:
|
It seems what is happening is that
from stratified_hash_nnps.pyx is 0.0, so this ends up casting a NaN to int, which is undefined behaviour. On arm64 (the architecture I was trying), it ends up being 2147483647 aka MAX_INT and then mask_len ends up being -1 and so enormous when cast to size_t and everything fails to work at all. I guess on amd64 casting a NaN to an int does something more benign? I don't understand the code nearly well enough to see where this is going wrong. I certainly don't see any particular reason why assuming "self._get_h_max(self.current_cells, i)" is non-zero is justified... |
Hi @prabhuramachandran it seems that @mwhudson has spotted the issue. |
A feedback on this issue would be really appreciated. |
@avalentino -- sorry for the slow response on this. @adityapb -- could you please take a quick look at this? This is clearly a bug. |
@avalentino -- the PR #307 should fix the issue, is it enough if this is merged into PySPH? I can merge it sooner if it will help. |
Thanks @prabhuramachandran thanks @adityapb I can confirm that the fix works on s390x platforms. |
We are working to prepare the debian package for pysph v1.0-a6 (python3 only) we found that there are Segmentation fault on several non-x86 platforms:
See also [1] and [2].
[1] https://buildd.debian.org/status/fetch.php?pkg=pysph&arch=arm64&ver=1.0%7Ea6-3&stamp=1567840824&raw=0
[2] https://buildd.debian.org/status/package.php?p=pysph
The text was updated successfully, but these errors were encountered: