-
Notifications
You must be signed in to change notification settings - Fork 111
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 faults with numpy 1.21 package #627
Comments
Can you add a numpy<1.21 constraint to the conda-forge package and yank the unconstrained release? This currently is breaking builds all over the place. |
I can build a new build that adds the constraint. But we don't have to remove the old one. I'm trying to determine the underlying issue. |
Can always update it again once the problem is discovered/resolved |
The new build that does not update to numpy 1.21 should be available. You may need to wait for the CDN to update for the package to be widely available. |
Also unpin wxpython, no longer needed after 79108f4
Do we know what the origin of this issue is, and is there any prospect for a fix? |
We have seen segmentation faults with |
Also unpin wxpython, no longer needed after 79108f4
Did we find out why this happened? |
Have not had time to took further into this yet. |
Just adding to the story, a simple segfault reproducer with a numpy 1.21 build is
|
Just flagging this boost discussion: boostorg/python#376 which I assume is about the same issue. Here's an excerpt from a stack trace when triggering the segfault via Derek's reproducer: stack trace
|
Great! I was not able to reproduce Derek's crash, but I was able to find another simple way of causing the segfault. There is also an earlier discussion here. |
For me, using Derek's reproducer, I can avoid crashing with a couple different changes in As written now, we have:
If I comment out the second constructor, or if I remove
then no crash. So clearly it's something about the overload resolution for the space_group_symbols class as kinda suggested by the boost issue I linked before. Pretty weird that numpy would have anything to do with it! I'm also curious how widespread this is: both the pattern of mixing overloaded constructors with boost optional arguments, and whether they all cause segfaults now. |
I added a comment on the Boost issue I mentioned above (boostorg/python#376) but not sure if it gets us any closer to a fix. The issue started with changes to numpy type casting here: numpy/numpy#17401 |
It appears to be a numpy bug and I describe a possible fix here: boostorg/python#376 The problem involved dereferencing a null pointer when checking convertibility of types (like boost_python ones) that haven't implemented the new numpy casting implementation. I'll open a numpy PR which I assume will take a while to get into a release. It's possible to build a custom numpy from sources and we can discuss if necessary, but it seems like our stuff is stable for now with the pin to 1.20... |
This appears to be fixed as of numpy 1.21.5, which is now on conda-forge :) |
Yeah, I've been following the discussion. But it looks like there should still be an update to Boost.Python. Thanks for getting the ball rolling! I should be able to add Python 3.10 checks to Azure Pipelines now that there is a way forward. And I can remove the |
This reflects the resolution of #627 as discussed in several other issues and PRs: - boostorg/python#376 - numpy/numpy#20507 - numpy/numpy#20616 Leaving this "bibliography" here because the fix in numpy PR 20616 is considered temporary; thus someday we may have to revisit this to fix the underlying bug in boost::python. Co-authored-by: Billy Poon <bkpoon@lbl.gov>
Unpinning this since there is a fix in |
This reflects the resolution of #627 as discussed in several other issues and PRs: - boostorg/python#376 - numpy/numpy#20507 - numpy/numpy#20616 Leaving this "bibliography" here because the fix in numpy PR 20616 is considered temporary; thus someday we may have to revisit this to fix the underlying bug in boost::python. Co-authored-by: Billy Poon <bkpoon@lbl.gov>
The recently released 1.21 version of
numpy
will cause segmentation faults with thecctbx-base
conda package. This affects Python versions 3.7 through 3.9. Please use version 1.20 until this issue is resolved. Python 3.6 is using version 1.19.The text was updated successfully, but these errors were encountered: