thaler-lab / Wasserstein

Python/C++ library for computing Wasserstein distances efficiently.
https://thaler-lab.github.io/Wasserstein
Other
22 stars 9 forks source link

Windows build test fails #15

Closed j-s-ashley closed 3 months ago

j-s-ashley commented 3 months ago

https://github.com/j-s-ashley/Wasserstein/actions/runs/9448008848/job/26021089328#step:5:147

j-s-ashley commented 3 months ago

Updating the Python version to 3.12 changed details of the error but maintained the result.

j-s-ashley commented 3 months ago

First call: line 476 in Windows fatal exception: __call__

Line 475-6 in wasserstein.py:

        if not self.request_mode():
            self.compute()
j-s-ashley commented 3 months ago

Confirmed that the manual workflow trigger is not the cause of the error.

matthewfeickert commented 3 months ago
access violation stack trace: ``` Windows fatal exception: access violation Current thread 0x00001808 (most recent call first): File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\wasserstein\wasserstein.py", line 476 in __call__ File "D:\a\Wasserstein\Wasserstein\wasserstein\tests\test_externalemdhandler.py", line 35 in test_corrdim File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\python.py", line 162 in pytest_pyfunc_call File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_callers.py", line 103 in _multicall File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_hooks.py", line 513 in __call__ File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\python.py", line 1632 in runtest File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\runner.py", line 173 in pytest_runtest_call File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_callers.py", line 103 in _multicall File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_hooks.py", line 513Windows fatal exception: in access violation__call__ File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\runner.py", line 241 in File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\runner.py", line 341 in from_call File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\runner.py", line 240 in call_and_report File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\runner.py", line 135 in runtestprotocol File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\runner.py", line 116 in pytest_runtest_protocol File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_callers.py", line Windows fatal exception: 103access violation in _multicall File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_hooks.py", line 513 in __call__ File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\main.py", line 364 in pytest_runtestloop File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_callers.py", line 103 in _multicall File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_hooks.py", line 513 in __call__ File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\main.py", line 339 in _main File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\main.py", line 285 in wrap_session File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\main.py", line 332 in pytest_cmdline_main File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_callers.py", line 103 in _multicall File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_hooks.py", line 513 in __call__ File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\config\__init__.py", line 178 in main File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\config\__init__.py", line 206 in console_main File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Scripts\pytest.exe\__main__.py", line 7 in File "", line 88 in _run_code File "", line 198 in _run_module_as_main Windows fatal exception: access violation Thread 0x00001808 (most recent call first): File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\wasserstein\wasserstein.py", line 476 in __call__ File "D:\a\Wasserstein\Wasserstein\wasserstein\tests\test_externalemdhandler.py", line 35 in test_corrdim File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\python.py", line 162 in pytest_pyfunc_call File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_callers.py", line 103 in _multicall File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_hooks.py", line 513 in __call__ File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\python.py", line 1632 in runtest File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\runner.py", line 173 in pytest_runtest_call File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_callers.py", line 103 in _multicall File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_hooks.py", line 513 in __call__ File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\runner.py", line 241 in File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\runner.py", line 341 in from_call File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\runner.py", line 240 in call_and_report File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\runner.py", line 135 in runtestprotocol File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\runner.py", line 116 in pytest_runtest_protocol File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_callers.py", line 103 in _multicall File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_hooks.py", line 513 in __call__ File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\main.py", line 364 in pytest_runtestloop File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_callers.py", line 103 in _multicall File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_hooks.py", line 513 in __call__ File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\main.py", line 339 in _main File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\main.py", line 285 in wrap_session File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\main.py", line 332 in pytest_cmdline_main File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_callers.py", line 103 in _multicall File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\pluggy\_hooks.py", line 513 in __call__ File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\config\__init__.py", line 178 in main File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\_pytest\config\__init__.py", line 206 in console_main File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Scripts\pytest.exe\__main__.py", line 7 in File "", line 88 in _run_code File "", line 198 in _run_module_as_main wasserstein\tests\test_externalemdhandler.py x ```
matthewfeickert commented 3 months ago

I'm going to check the package differences on Windows to see if there's something buggy in a dependency

$ diff -y /tmp/pip-list-pass.txt /tmp/pip-list-fail.txt 
colorama    0.4.6                       colorama    0.4.6
coverage    7.4.4                         | coverage    7.5.3
EnergyFlow  1.3.3a0                     EnergyFlow  1.3.3a0
h5py        3.11.0                      h5py        3.11.0
iniconfig   2.0.0                       iniconfig   2.0.0
numpy       1.26.4                      numpy       1.26.4
packaging   24.0                          | packaging   24.1
pip         24.0                        pip         24.0
pluggy      1.5.0                       pluggy      1.5.0
POT         0.9.3                       POT         0.9.3
pytest      8.1.1                         | pytest      8.2.2
scipy       1.13.0                        | scipy       1.13.1
setuptools  69.5.1                        | setuptools  70.0.0
six         1.16.0                      six         1.16.0
Wasserstein 1.1.0                       Wasserstein 1.1.0
wheel       0.43.0                      wheel       0.43.0
wurlitzer   3.0.3                         | wurlitzer   3.1.0

I'm starting with the following constraints.txt file

$ cat constraints.txt 
coverage==7.4.4
packaging==24.0
pytest==8.1.1
scipy==1.13.0
setuptools==69.5.1
wurlitzer==3.0.3

and using

python -m pip install --upgrade --constraint constraints.txt ".[test]"

in the CI on a debug branch, and then stepping through the constraints to unpin them and find where things break.

matthewfeickert commented 3 months ago

Something must have changed on the Windows runner environment in the last 2 months, as with the same Python environment

$ diff /tmp/pip-list-pass.txt /tmp/pip-list-constraint-fail.txt && echo $?  # also constrained setuptools
0

the access violation is reproducible.