yt-project / yt

Main yt repository
http://yt-project.org
Other
454 stars 272 forks source link

BUG: segault on manylinux2014 image #4910

Closed neutrinoceros closed 1 month ago

neutrinoceros commented 1 month ago

Bug report

Bug summary

In my attempts to enable artifacts testing (#4906 and #4909), we discovered that running even the simplest test python -c "import yt" triggered a segmentation fault on manylinux2014. @yut23 gave more details about the error in https://github.com/yt-project/yt/pull/4906#issuecomment-2118520417

Every other target (macOS ARM, macOS x86_64 and Windows 64) appear to behave correctly.

In my experiments, I also discovered that using targeting manylinux_2_28 instead of manylinux2014 (using CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28) avoided the issue but this move requires a bump in the oldest supported Python version from 3.9.2 to 3.9.5 (see pip requirements in https://github.com/pypa/manylinux). Would this be an acceptable solution for yt 4.4.0 ?

yut23 commented 1 month ago

I got it to work with manylinux2014 by removing CIBW_ENVIRONMENT: "LDFLAGS='-static-libstdc++'". It seems like that used to be needed for C++14 support, but evidently not anymore?

neutrinoceros commented 1 month ago

Awesome, thank you very much ! I see you already have a branch for this patch so I suggest you merge #4909 and follow up with a PR closing this issue :)

yut23 commented 1 month ago

Should I put the pytest fixes in a separate PR, for separation of concerns?

yut23 commented 1 month ago

Here's a StackOverflow post from someone with a very similar issue: https://stackoverflow.com/questions/47202468/segfault-on-declaring-a-variable-of-type-vectorshared-ptrint.

neutrinoceros commented 1 month ago

Should I put the pytest fixes in a separate PR, for separation of concerns?

Preferably, yes. And if you can pull it off don't hesitate to close #4906. Thank you !