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

test_isolate_from_socket_default_timeout fails on SPARC #614

Closed
mgorny opened this issue May 29, 2020 · 0 comments
Closed

test_isolate_from_socket_default_timeout fails on SPARC #614

mgorny opened this issue May 29, 2020 · 0 comments

Comments

@mgorny
Copy link
Contributor

mgorny commented May 29, 2020

test_isolate_from_socket_default_timeout fails on SPARC due to timeout.

$ nosetests tests/tpool_test.py 
.............................Program /home/mgorny/eventlet/tests/isolated/tpool_isolate_socket_default_timeout.py output:
---

---
F.
======================================================================
FAIL: tests.tpool_test.test_isolate_from_socket_default_timeout
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mgorny/eventlet/tests/__init__.py", line 355, in run_python
    output, _ = p.communicate(timeout=timeout)
  File "/usr/lib/python3.7/subprocess.py", line 964, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "/usr/lib/python3.7/subprocess.py", line 1716, in _communicate
    self._check_timeout(endtime, orig_timeout, stdout, stderr)
  File "/usr/lib/python3.7/subprocess.py", line 1011, in _check_timeout
    stderr=b''.join(stderr_seq) if stderr_seq else None)
subprocess.TimeoutExpired: Command '['/usr/bin/python3.7', '/home/mgorny/eventlet/tests/isolated/tpool_isolate_socket_default_timeout.py']' timed out after 1 seconds

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/mgorny/eventlet/tests/tpool_test.py", line 369, in test_isolate_from_socket_default_timeout
    tests.run_isolated('tpool_isolate_socket_default_timeout.py', timeout=1)
  File "/home/mgorny/eventlet/tests/__init__.py", line 381, in run_isolated
    run_python(prefix + path, **kwargs)
  File "/home/mgorny/eventlet/tests/__init__.py", line 361, in run_python
    assert False, 'timed out'
AssertionError: timed out

----------------------------------------------------------------------
Ran 31 tests in 6.873s

FAILED (failures=1)

It seems that the default value of 1 s is probably too slow for non-x86 hardware.

$ time python /home/mgorny/eventlet/tests/isolated/tpool_isolate_socket_default_timeout.py
pass

real	0m1.894s
user	0m1.590s
sys	0m0.110s

After adding timing prints around imports, you can see that it takes ~1.6s to load the Python modules:

$ python /home/mgorny/eventlet/tests/isolated/tpool_isolate_socket_default_timeout.py
2020-05-29 06:40:08.231281
2020-05-29 06:40:09.808935

eventlet git master (336773d)
Python 3.7.7

Linux catbus-mgorny-sparc 5.6.1-gentoo #1 SMP Wed Apr 1 19:36:39 PDT 2020 sparc64 sun4v UltraSparc T5 (Niagara5) GNU/Linux

using system-built packages since these installed by pip just crash (does it even support non-x86?)

mgorny added a commit to mgorny/eventlet that referenced this issue May 29, 2020
Increase the timeout used for test_isolate_from_socket_default_timeout
from 1 second to 5 seconds.  Otherwise, the test can't succeed
on hardware where Python runs slower.  In particular, on our SPARC box
importing greenlet modules takes almost 2 seconds, so the test program
does not even start properly.

Fixes eventlet#614
mgorny added a commit to mgorny/eventlet that referenced this issue May 29, 2020
Increase the timeout used for test_isolate_from_socket_default_timeout
from 1 second to 5 seconds.  Otherwise, the test can't succeed
on hardware where Python runs slower.  In particular, on our SPARC box
importing greenlet modules takes almost 2 seconds, so the test program
does not even start properly.

Fixes eventlet#614
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