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

Pre-release failures in Windows tests #1147

Closed
effigies opened this issue Nov 19, 2022 · 1 comment
Closed

Pre-release failures in Windows tests #1147

effigies opened this issue Nov 19, 2022 · 1 comment

Comments

@effigies
Copy link
Member

The last passing action was: https://github.com/nipy/nibabel/actions/runs/3286366798/jobs/5414393925

  • Pre-release packages:
    • numpy-1.24.0.dev0+934.gdb7414b7f
    • scipy-1.10.0.dev0+1556.df6da9a
    • matplotlib-3.7.0.dev407+g101cbaa60f

The first failing action was: https://github.com/nipy/nibabel/actions/runs/3294239687/jobs/5431558155

  • Pre-release packages:
    • numpy-1.24.0.dev0+973.g7776bc616
    • scipy-1.10.0.dev0+1556.df6da9a
    • matplotlib-3.7.0.dev407+g101cbaa60f
..\virtenv\lib\site-packages\nibabel\tests\test_floating.py::test_check_nmant_nexp PASSED [ 48%]
Windows fatal exception: stack overflow

Thread 0x00000ca4 (most recent call first):
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\selectors.py", line 315 in _select
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\selectors.py", line 324 in select
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\socketserver.py", line 232 in serve_forever
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\werkzeug\serving.py", line 741 in serve_forever
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pytest_httpserver\httpserver.py", line 684 in thread_target
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\threading.py", line 917 in run
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\threading.py", line 980 in _bootstrap_inner
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\threading.py", line 937 in _bootstrap

Current thread 0x0000022c (most recent call first):
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\nibabel\casting.py", line 402 in as_int
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\nibabel\tests\test_floating.py", line 116 in test_as_int
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\python.py", line 192 in pytest_pyfunc_call
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_callers.py", line 39 in _multicall
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_manager.py", line 80 in _hookexec
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_hooks.py", line 265 in __call__
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\python.py", line 1761 in runtest
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\runner.py", line 166 in pytest_runtest_call
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_callers.py", line 39 in _multicall
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_manager.py", line 80 in _hookexec
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_hooks.py", line 265 in __call__
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\runner.py", line 259 in <lambda>
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\runner.py", line 338 in from_call
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\runner.py", line 258 in call_runtest_hook
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\runner.py", line 219 in call_and_report
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\runner.py", line 130 in runtestprotocol
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\runner.py", line 111 in pytest_runtest_protocol
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_callers.py", line 39 in _multicall
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_manager.py", line 80 in _hookexec
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_hooks.py", line 265 in __call__
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\main.py", line 347 in pytest_runtestloop
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_callers.py", line 39 in _multicall
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_manager.py", line 80 in _hookexec
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_hooks.py", line 265 in __call__
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\main.py", line 322 in _main
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\main.py", line 268 in wrap_session
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\main.py", line 315 in pytest_cmdline_main
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_callers.py", line 39 in _multicall
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_manager.py", line 80 in _hookexec
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\pluggy\_hooks.py", line 265 in __call__
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\config\__init__.py", line 164 in main
  File "D:\a\nibabel\nibabel\virtenv\lib\site-packages\_pytest\config\__init__.py", line 187 in console_main
  File "D:\a\nibabel\nibabel\virtenv\Scripts\pytest.exe\__main__.py", line 7 in <module>
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\runpy.py", line 87 in _run_code
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\runpy.py", line 197 in _run_module_as_main
..\virtenv\lib\site-packages\nibabel\tests\test_floating.py::test_as_int 
Error: Process completed with exit code 127.

The failing test seems to be here:

def test_as_int():
# Integer representation of number
assert as_int(2.0) == 2
assert as_int(-2.0) == -2
with pytest.raises(FloatingError):
as_int(2.1)
with pytest.raises(FloatingError):
as_int(-2.1)
assert as_int(2.1, False) == 2
assert as_int(-2.1, False) == -2
v = np.longdouble(2**64)
assert as_int(v) == 2**64
# Have all long doubles got 63+1 binary bits of precision? Windows 32-bit
# longdouble appears to have 52 bit precision, but we avoid that by checking
# for known precisions that are less than that required
try:
nmant = type_info(np.longdouble)['nmant']
except FloatingError:
nmant = 63 # Unknown precision, let's hope it's at least 63
v = np.longdouble(2) ** (nmant + 1) - 1
assert as_int(v) == 2**(nmant + 1) - 1
# Check for predictable overflow
nexp64 = floor_log2(type_info(np.float64)['max'])
with np.errstate(over='ignore'):
val = np.longdouble(2**nexp64) * 2 # outside float64 range
with pytest.raises(OverflowError):
as_int(val)
with pytest.raises(OverflowError):
as_int(-val)

@effigies
Copy link
Member Author

Looking at the diff between the two numpy commits: numpy/numpy@db7414b...7776bc6

Most likely PR in that range looks like numpy/numpy#21875.

About to go on vacation. Will try to reproduce on a Windows box when I have a chance.

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

1 participant