[Debian-science-sagemath] Tests timing out

Ximin Luo infinity0 at debian.org
Sat Oct 15 13:52:00 UTC 2016


Jeroen Demeyer:
> On 2016-10-15 13:47, Tobias Hansen wrote:
>> I'm not sure how to debug this since there is no output.
> 
> That's a bug by itself. Are you using the Sage doctest framework or something else? The Sage doctest framework should show where it timed out.
> 

Yes we are using the Sage doctest framework. :)

I think he just means the output is not displaying in realtime, and also when we're running with --all, it's buried far back in the log so a little hard to find. But the output is there, I am getting something like this for example:

$ ./sage  -t --long src/sage/rings/integer.pyx
too many failed tests, not using stored timings
Running doctests with ID 2016-10-15-14-03-07-87848773.
Using --optional=mpir,python2,sage,scons,termcap
Doctesting 1 file.
sage -t --long src/sage/rings/integer.pyx
**********************************************************************
File "src/sage/rings/integer.pyx", line 6036, in sage.rings.integer.Integer._shift_helper
Failed example:
    1 << (2^60)
Expected:
    Traceback (most recent call last):
    ...
    MemoryError: failed to allocate ... bytes   
Got:
    gmp: overflow in mpz type
    Traceback (most recent call last):
      File "/home/infinity0/var/lib/sage/sagemath/debian/tmp/usr/lib/python2.7/dist-packages/sage/doctest/forker.py", line 495, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/infinity0/var/lib/sage/sagemath/debian/tmp/usr/lib/python2.7/dist-packages/sage/doctest/forker.py", line 858, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.rings.integer.Integer._shift_helper[8]>", line 1, in <module>
        Integer(1) << (Integer(2)**Integer(60))
      File "sage/rings/integer.pyx", line 6114, in sage.rings.integer.Integer.__lshift__ (build/cythonized/sage/rings/integer.c:37844)
        return (<Integer>x)._shift_helper(y, 1)
      File "sage/rings/integer.pyx", line 6075, in sage.rings.integer.Integer._shift_helper (build/cythonized/sage/rings/integer.c:37591)
        sig_on()
      File "src/cysignals/signals.pyx", line 103, in cysignals.signals.sig_raise_exception (build/pari/src/cysignals/signals.c:1294)
    RuntimeError: Aborted
    Timed out (and interrupt failed)
**********************************************************************
Tests run before process (pid=11423) timed out:
sage: a = Integer(3) ; b = Integer(4) ## line 54 ##
sage: a + b == 7 ## line 55 ##
True
[..]

[.. lots more output .. ]

[..]
sage: 0.binomial(-1) ## line 6466 ##
0
sage: 13.binomial(2r) ## line 6468 ##
78
sage: alarm(0.5); (2^100).binomial(2^22, algorithm='mpir') ## line 6473 ##
sage: from cysignals import AlarmInterrupt ## line 6481 ##
sage: for i in [1..10]:  # long time (5s)
    try:
        alarm(i/11)
        (2^100).binomial(2^22, algorithm='pari')
    except AlarmInterrupt:
        pass ## line 6482 ##

**********************************************************************
----------------------------------------------------------------------
sage -t --long src/sage/rings/integer.pyx  # Timed out (and interrupt failed)
----------------------------------------------------------------------
Total time for all tests: 1890.2 seconds
    cpu time: 0.0 seconds
    cumulative wall time: 0.0 seconds
# exit code 4

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



More information about the Debian-science-sagemath mailing list