Closed neutrinoceros closed 1 month ago
I don't know exactly what I'm doing wrong but
I'm running out of time for today, but I'll try to come back soon. Any help is welcome.
I was able to reproduce the linux segfaults locally (inside the cibuildwheel containers), and the backtraces point to static initialization of std::locale
objects. Maybe something is up with the locale settings in the containers?
They initially showed up for std::ctype<wchar_t>::do_scan_not()
and std::ctype<wchar_t>::do_is()
in _octree_raytracing.*.so
, but I commented out the unused includes for <iostream>
, <string>
, and <fstream>
in yt/utilities/lib/_octree_raytracing.hpp
, which moved the problem to std::__cxx11::numpunct<char>::~numpunct()
in ewah_bool_wrap.*.so
.
Full backtraces:
_octree_raytracing.cpython-39-x86_64-linux-gnu.so
```
Program received signal SIGSEGV, Segmentation fault.
#0 0x00007facd39364fc in std::ctype
ewah_bool_wrap.cpython-39-x86_64-linux-gnu.so
```
Program received signal SIGSEGV, Segmentation fault.
#0 0x00007fcd06471fb6 in _int_free () from /lib64/libc.so.6
#1 0x00007fccd390d2a1 in std::__cxx11::numpunct
Thanks @yut23. I also dropped the unused includes you referred to here just in case, but I actually didn't realized there was a segfault at al... Maybe it's something that should get reported to cibuildwheel ? In any case, I think we need to figure out how to properly run pytest from outside the source repo first, so we have at least some evidence that the segfault is specifically a problem with the ubuntu container. Currently, sdist and macOS wheels are blocked by the same problem, so, progress !
Made some progress regarding configuration, but I'm still seeing collection errors where files named *_nose.py
are still not ignored. I really don't get it.
It looks like --ignore
just doesn't work with --pyargs
: https://github.com/pytest-dev/pytest/issues/3287
Alright, I've figured out why: pytest makes the --ignore
and --ignore-glob
paths absolute before checking against the test file. This prepends the current working directory (which is /tmp/tmp.<random>/test_cwd
inside the container), so they will never match the installed files under /tmp/tmp.<random>/venv
.
Relevant pytest code: https://github.com/pytest-dev/pytest/blob/cbf6bd9dd28d8464f7eebe32e51b398e2a5e3039/src/_pytest/main.py#L407-L416
Thank you so much for investigating this. Indeed, I never thought it could be a problem with pytest itself. Do you think this should be fixed upstream or is pytest working as intended ?
superseded by #4913
PR Summary
In #4905 it became apparent that our wheels are not tested, and while they're not broken now (as far as I know), it seems worth it to make building safer (albeit probably much longer). Let's see how long it even takes.
PR Checklist