-
Notifications
You must be signed in to change notification settings - Fork 119
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
boost_adaptbx: method import_ext
causing segmentation fault
#796
Comments
Note, the relevant line in |
What happens if |
I had a recent SEGV issue in FWIW I'v never liked That said, I'm not 100% sure it's the same issue but I've also seen several bugs arise from linking both In fact, if it is this problem, the RTLD_GLOBAL flag possibly makes sense, because it could be clobbering the already-global symbols that the running interpreter is using? |
@bkpoon , still receive the segfault
@ndevenish Thanks for the tip, I was unaware of this! But if I remove the -lpython3.8 flags and rebuild, I can still generate the segfault. I removed the flags from the example build script |
TLDR;
sys.setdlopenflags(0x100|0x2)
inimport_ext
is causing segfault due to mysterious boost+mpi4py+eigen interactions.This is quite involved, and I have a patch for it, but I would like to get to the bottom of whats going on.
Assume one has their own boost extension module
tester_ext.cpp
:Lets also assume that one wishes to use an existing extension module from cctbx (another_ext), whose source code is given by
another.cpp
:and whose extension wrapper is
another_ext.cpp
:After everything is built, if one runs the following python script with the flag
--makeSegfault
, the segfault can be triggeredThis issue appears to be platform dependent. I've tested it at NERSC and it segfaults on CORI GPU, but not in Perlmutter. Note replacing
bp.import_ext("another_ext")
withimport another_ext
does not trigger the segfault regardless of the--makeSegfault
flag. Also, commenting out the line of codeif (import_mpi4py() < 0) return;
prevents the segfault, regardless of the--makeSegfault
flag. Or, instead, if one comments out the linevecs.push_back(vec)
inanother.cpp
, then the segfault is avoided. Lastly, (see build script below), if one leaves outanother.o
during the linking step that writesanother_ext.so
, then the segfault won't be triggered.Example build script for python3.8:
The text was updated successfully, but these errors were encountered: