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

Python test suite failure #376

Open
tpikonen opened this issue Jul 22, 2024 · 3 comments
Open

Python test suite failure #376

tpikonen opened this issue Jul 22, 2024 · 3 comments

Comments

@tpikonen
Copy link

I built the v0.11.1 git tag (master failed to build) on Debian trixie with this config:

cmake .. -DBUILD_EXAMPLES=OFF -DWITH_PYTHON=ON -DGOOGLETEST_ROOT=/usr/src/googletest

The python binding test suite fails with a segfault:

$ cd python ; make test
Running tests...
Test project /home/tmx/debian/s2geometry/git-deb-s2geometry/build/python
    Start 1: s2geometry_test
1/1 Test #1: s2geometry_test ..................Subprocess aborted***Exception:   3.72 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   3.73 sec

The following tests FAILED:
	  1 - s2geometry_test (Subprocess aborted)
Errors while running CTest

The failing test class is S2BuilderTest:

$ PYTHONPATH=$(pwd) python3 ../../src/python/s2geometry_test.py S2BuilderTest
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
F0000 00:00:1721660167.483759  916916 s2edge_distances.cc:405] Check failed: tolerance.radians() > 0 (0 vs. 0) 
*** Check failure stack trace: ***
Aborted (core dumped)

Anything with a call to S2Builder.AddEdge() (i.e. all tests in this class) results in a segfault.

@smcallis
Copy link
Collaborator

smcallis commented Jul 22, 2024

I'm on a rolling Debian distribution I grabbed a fresh copy of ABSL LTS and did this:

cmake .. -DCMAKE_CXX_STANDARD=17 -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_PREFIX_PATH=/opt/absl/lts20240116.1 -DCMAKE_INSTALL_PREFIX=/opt/absl/lts20240116.1 -DABSL_ENABLE_INSTALL=ON -DABSL_USE_EXTERNAL_GOOGLETEST=ON -DABSL_FIND_GOOGLETEST=ON

And followed up with compiling S2 (clean checkout of the v0.11.1 tag):
cmake .. -DCMAKE_CXX_STANDARD=17 -DBUILD_EXAMPLES=OFF -DWITH_PYTHON=ON -DGOOGLETEST_ROOT=/usr/src/googletest -DCMAKE_PREFIX_PATH=/opt/absl/lts20240116.1/

And make test in build/python runs fine for me:

Running tests...
Test project /home/smcallis/tmp/s2geometry/build/python
    Start 1: s2geometry_test
1/1 Test #1: s2geometry_test ..................   Passed    2.21 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   2.21 sec          

@tpikonen
Copy link
Author

Thanks, but using the exact same checkouts and configuration as above still segfaults here. For reference, I originally used the libabsl-dev version 20240116.2-2 package from Debian experimental which has this configuration:

-DCMAKE_CXX_STANDARD=17 -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DABSL_BUILD_TESTING=ON -DABSL_USE_GOOGLETEST_HEAD=OFF

As I don't need the Python binding I'm going to leave this be, but it would be nice to have this fixed this eventually.

@jmr
Copy link
Member

jmr commented Sep 23, 2024

@tpikonen Which of the S2BuilderTest test cases are failing? If tolerance is zero, can you figure out why?

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

No branches or pull requests

3 participants