Skip to content
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

Working around Centos 8 failure. #3030

Merged
merged 5 commits into from
Jun 18, 2021
Merged

Working around Centos 8 failure. #3030

merged 5 commits into from
Jun 18, 2021

Conversation

rwgk
Copy link
Collaborator

@rwgk rwgk commented Jun 6, 2021

Using -DCMAKE_BUILD_TYPE=Debug for Centos 8 as a work around for the failure below.

The failure was first observed around 2020-06-04, when the gcc version changed from 8.3 to 8.4:

2359.txt: gcc-c++                  x86_64  8.3.1-5.1.el8                          appstream   12 M
2360.txt: gcc-c++                  x86_64  8.4.1-1.el8                            appstream   12 M
# cmake --build build --target pytest
Consolidate compiler generated dependencies of target cross_module_gil_utils
[  4%] Built target cross_module_gil_utils
Consolidate compiler generated dependencies of target pybind11_cross_module_tests
[  9%] Built target pybind11_cross_module_tests
Consolidate compiler generated dependencies of target pybind11_tests
[100%] Built target pybind11_tests
gmake[3]: *** [tests/CMakeFiles/pytest.dir/build.make:72: tests/CMakeFiles/pytest] Segmentation fault (core dumped)
gmake[2]: *** [CMakeFiles/Makefile2:249: tests/CMakeFiles/pytest.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:256: tests/CMakeFiles/pytest.dir/rule] Error 2
gmake: *** [Makefile:183: pytest] Error 2

For future reference, to reproduce the crash in a docker container (thanks @henryiii):

docker run --rm --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -it centos:8 /bin/bash
yum update -y && yum install -y python3-devel gcc-c++ gdb make git && python3 -m pip install --upgrade pip && git clone https://github.com/pybind/pybind11.git && cd pybind11 && python3 -m pip install cmake -r tests/requirements.txt --prefer-binary && cmake -S . -B build -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=11 -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") && cmake --build build -j 16
cd build/tests
python3 -c "import pybind11_tests" # Crashes

@rwgk rwgk requested a review from henryiii as a code owner June 6, 2021 18:50
@rwgk rwgk marked this pull request as draft June 6, 2021 23:03
@rwgk rwgk changed the title Skipping yum install gcc-c++ for Centos 8. Working around Centos 8 failure. Jun 17, 2021
@rwgk rwgk marked this pull request as ready for review June 17, 2021 22:34
@rwgk rwgk merged commit 19d99a8 into pybind:master Jun 18, 2021
@rwgk rwgk deleted the centos8_fix branch June 18, 2021 08:35
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Jun 18, 2021
@rwgk rwgk removed the needs changelog Possibly needs a changelog entry label Jun 18, 2021
rwgk pushed a commit to rwgk/pybind11 that referenced this pull request Aug 12, 2021
rwgk pushed a commit that referenced this pull request Aug 12, 2021
)

* Rollback of PR #3030 (Working around Centos 8 failure).

* Adding `-DCMAKE_BUILD_TYPE=Release`

* Improving existing workaround (undoing the originally intended rollback).

* Fixing minor documentation bug.
rwgk pushed a commit to rwgk/pybind11 that referenced this pull request Aug 12, 2021
rwgk pushed a commit that referenced this pull request Aug 14, 2021
* Removing last remnants of pragma block at the top of pybind11.h, defaulting CUDA, GCC7, GCC8 to PYBIND11_NOINLINE_DISABLED, with the option to define PYBIND11_NOINLINE_FORCED.

* Unique SOSIZE prefix to make it easier to extract the sosizes from the GitHub logs.

* Commenting out PYBIND11_WERROR block, for noinline testing.

* Undoing accidental change.

* `#define PYBIND11_NOINLINE_FORCED`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* `#define PYBIND11_NOINLINE_DISABLED`

* Going back to default (removing `#define PYBIND11_NOINLINE_DISABLED`).

* `#define PYBIND11_NOINLINE_FORCED`

* Undoing all changes releated to measuring sosizes.

* Rollback of PR #3030 (Working around Centos 8 failure).

* Disabling -Werror for GNU (experiment).

* Commenting out the entire `if(PYBIND11_WERROR)` again (although that is not expected to make a difference, but who knows what I am overlooking).

* Adding `-DCMAKE_BUILD_TYPE=Release`

* Undoing change to tests/CMakeLists.txt (uncommenting `if(PYBIND11_WERROR)` block).

* post `git rebase master -X theirs` fixups.

* Adding measurements to comment for `PYBIND11_NOINLINE_FORCED`.

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant