pypy3 5.10.0: Timeout tests never timeout on i686
Hi, I'm trying to build pypy3 5.10.0 for Fedora.
On i686/i386 the timeout test hang forever.
testTimeoutValueNonamed (test.test_socket.NetworkConnectionAttributesTest) ... ok
The above tests is the last in the logs. Teh next one never appears there:
testInsideTimeout (test.test_socket.NetworkConnectionBehaviourTest) ... ok
Full logs and build info:
- https://koji.fedoraproject.org/koji/taskinfo?taskID=23909400
- https://koji.fedoraproject.org/koji/taskinfo?taskID=23909447
-
https://kojipkgs.fedoraproject.org//work/tasks/9447/23909447/build.log
-
https://copr.fedorainfracloud.org/coprs/g/python/pypy35/build/691426/
- https://copr-be.cloud.fedoraproject.org/results/@python/pypy35/fedora-26-i386/00691426-pypy3/builder-live.log
- https://copr-be.cloud.fedoraproject.org/results/@python/pypy35/fedora-27-i386/00691426-pypy3/builder-live.log
- https://copr-be.cloud.fedoraproject.org/results/@python/pypy35/fedora-rawhide-i386/00691426-pypy3/builder-live.log
Comments (15)
-
-
There are patches, but not that intrusive, you can find all 4 of them here https://src.fedoraproject.org/rpms/pypy3/tree/master and their description around https://src.fedoraproject.org/rpms/pypy3/blob/master/f/pypy3.spec#_141 but none of them should be related . I will try to reproduce this by running the test by hand.
-
Testing in mock (the build environment), will try an actual i686 virtual machine later.
First thing, running
pypy3 -m test.test_socket
hangs as well, at this point:testInsideTimeout (__main__.NetworkConnectionBehaviourTest) ... ^CTraceback (most recent call last): File "/usr/lib/pypy3-5.10.0/lib-python/3/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/pypy3-5.10.0/lib-python/3/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/lib/pypy3-5.10.0/lib-python/3/test/test_socket.py", line 5401, in <module> test_main() File "/usr/lib/pypy3-5.10.0/lib-python/3/test/test_socket.py", line 5397, in test_main support.run_unittest(*tests) File "/usr/lib/pypy3-5.10.0/lib-python/3/test/support/__init__.py", line 1897, in run_unittest _run_suite(suite) File "/usr/lib/pypy3-5.10.0/lib-python/3/test/support/__init__.py", line 1863, in _run_suite result = runner.run(suite) File "/usr/lib/pypy3-5.10.0/lib-python/3/unittest/runner.py", line 176, in run test(result) File "/usr/lib/pypy3-5.10.0/lib-python/3/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/usr/lib/pypy3-5.10.0/lib-python/3/unittest/suite.py", line 122, in run test(result) File "/usr/lib/pypy3-5.10.0/lib-python/3/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/usr/lib/pypy3-5.10.0/lib-python/3/unittest/suite.py", line 122, in run test(result) File "/usr/lib/pypy3-5.10.0/lib-python/3/unittest/case.py", line 649, in __call__ return self.run(*args, **kwds) File "/usr/lib/pypy3-5.10.0/lib-python/3/unittest/case.py", line 604, in run self.tearDown() File "/usr/lib/pypy3-5.10.0/lib-python/3/test/test_socket.py", line 262, in _tearDown self.done.wait() File "/usr/lib/pypy3-5.10.0/lib-python/3/threading.py", line 549, in wait signaled = self._cond.wait(timeout) File "/usr/lib/pypy3-5.10.0/lib-python/3/threading.py", line 293, in wait waiter.acquire() KeyboardInterrupt
-
Running the test manually boils down to:
>>>> import time >>>> time.sleep(3) Traceback (most recent call last): File "<stdin>", line 1, in <module> OverflowError: timestamp too large to convert to C _PyTime_t >>>
-
Something is very wrong. What is "time" (i.e. what happens when you
print(time)
?time.sleep
should not be connected at all to_PyTime_t
, it is implemented in RPython, the error message seems to point to some CPython type not available in PyPy. -
>>>> import time >>>> print(time) <module 'time' (built-in)> >>>> dir(time) ['CLOCK_BOOTTIME', 'CLOCK_MONOTONIC', 'CLOCK_MONOTONIC_COARSE', 'CLOCK_MONOTONIC_RAW', 'CLOCK_PROCESS_CPUTIME_ID', 'CLOCK_REALTIME', 'CLOCK_REALTIME_COARSE', 'CLOCK_THREAD_CPUTIME_ID', '_STRUCT_TM_ITEMS', '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'altzone', 'asctime', 'clock', 'clock_getres', 'clock_gettime', 'clock_settime', 'ctime', 'daylight', 'get_clock_info', 'gmtime', 'localtime', 'mktime', 'monotonic', 'perf_counter', 'process_time', 'sleep', 'strftime', 'strptime', 'struct_time', 'time', 'timezone', 'tzname', 'tzset'] >>>> time.sleep(0.01) >>>> time.sleep(0.1) >>>> time.sleep(1) >>>> time.sleep(2) >>>> time.sleep(2.5) >>>> time.sleep(3) Traceback (most recent call last): File "<stdin>", line 1, in <module> OverflowError: timestamp too large to convert to C _PyTime_t >>>> time.sleep(3.) >>>> time.sleep(4) Traceback (most recent call last): File "<stdin>", line 1, in <module> OverflowError: timestamp too large to convert to C _PyTime_t >>>> time.sleep(4.) >>>>
-
-
May be introduced by https://bitbucket.org/pypy/pypy/commits/570c2749ff19c36c5592435d1e3d5df6fe37d951
-
It seems that on i686 Fedora,
sys.maxint
in Python 2 is2147483647
and thus< (SECS_TO_NS * 3)
. -
I believe the
sec * SECS_TO_NS
operation should be called withr_longlong
s, but I wouldn't know how to properly check for overflow then:result = r_longlong(sec) * SECS_TO_NS ... check overflow
But given
sec
will only beint
, there will be no overflow I guess. Will try to patch it. -
That actually makes the testsuite pass on all arches. Will send a PR later, now I'm only commenting from my phone.
-
Thanks for identifying the source of the issue. f145d85 should fix it, but please check.
-
It should. Running a build in https://koji.fedoraproject.org/koji/taskinfo?taskID=23934826
-
Confirmed fixed. Thank you.
-
- changed status to resolved
- Log in to comment
The tests pass on our buildbot. I wonder what is different. Are there patches Fedora applies to the raw pypy repo? That test is meant to set up two sockets and pass a message between them, can you run it by hand and see what is failing?