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

Failure in doctesting src/sage/cpython/dict_del_by_value.pyx #28940

Closed
jaapspies opened this issue Jan 2, 2020 · 7 comments
Closed

Failure in doctesting src/sage/cpython/dict_del_by_value.pyx #28940

jaapspies opened this issue Jan 2, 2020 · 7 comments

Comments

@jaapspies
Copy link
Member

Doctesting sage-9.0 on a Raspberry Pi 4B on Raspbian Buster

sage -t --long src/sage/cpython/dict_del_by_value.pyx
**********************************************************************
File "src/sage/cpython/dict_del_by_value.pyx", line 396, in sage.cpython.dict_del_by_value.test_del_dictitem_by_exact_value
Failed example:
    for i in range(100000):        # long time
        ki=L[floor(random()*B)]
        vi=L[floor(random()*B)]
        D1[ki]=vi
        D2[ki]=vi
        ko=L[floor(random()*B)]
        if ko in D1:
            vo=D1[ko]
            del D1[ko]
            test_del_dictitem_by_exact_value(D2,vo,hash(ko))
        assert D1 == D2
Exception raised:
    Traceback (most recent call last):
      File "/home/pi/sagemath/sage-9.0/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/pi/sagemath/sage-9.0/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.cpython.dict_del_by_value.test_del_dictitem_by_exact_value[5]>", line 11, in <module>
        assert D1 == D2
    AssertionError
**********************************************************************
1 item had failures:
   1 of  12 in sage.cpython.dict_del_by_value.test_del_dictitem_by_exact_value
    [33 tests, 1 failure, 0.10 s]
----------------------------------------------------------------------
sage -t --long src/sage/cpython/dict_del_by_value.pyx  # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 0.2 seconds
    cpu time: 0.1 seconds
    cumulative wall time: 0.1 seconds
pi@rasp4:~/sagemath/sage-9.0 $ ./sage -t --long src/sage/misc/weak_dict.pyx  # 11 doctests failed

too many failed tests, not using stored timings
Running doctests with ID 2020-01-02-12-37-17-bd6476eb.
Git branch: develop
Using --optional=build,dochtml,memlimit,sage
Doctesting 1 file.
sage -t --long src/sage/misc/weak_dict.pyx
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 60, in sage.misc.weak_dict
Failed example:
    len(D)
Expected:
    1
Got:
    10
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 63, in sage.misc.weak_dict
Failed example:
    len(D)
Expected:
    0
Got:
    10
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 158, in sage.misc.weak_dict.WeakValueDictEraser
Failed example:
    len(D)
Expected:
    0
Got:
    1
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 179, in sage.misc.weak_dict.WeakValueDictEraser.__init__
Failed example:
    len(D)  # indirect doctest
Expected:
    0
Got:
    1
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 206, in sage.misc.weak_dict.WeakValueDictEraser.__call__
Failed example:
    len(D)  # indirect doctest
Expected:
    0
Got:
    1
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 261, in sage.misc.weak_dict.WeakValueDictionary
Failed example:
    len(D)
Expected:
    1
Got:
    10
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 264, in sage.misc.weak_dict.WeakValueDictionary
Failed example:
    len(D)
Expected:
    0
Got:
    10
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 306, in sage.misc.weak_dict.WeakValueDictionary
Failed example:
    for i in range(10000):
        ki = floor(random()*B)
        vi = C(floor(random()*B))
        D1[ki] = vi
        D2[ki] = vi
        L[ki]  = vi
        del vi
        ko = floor(random()*B)
        if ko in D1:
            del D1[ko]
            L[ko] = None
        assert D1 == D2
Exception raised:
    Traceback (most recent call last):
      File "/home/pi/sagemath/sage-9.0/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/pi/sagemath/sage-9.0/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.misc.weak_dict.WeakValueDictionary[23]>", line 12, in <module>
        assert D1 == D2
    AssertionError
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 528, in sage.misc.weak_dict.WeakValueDictionary.__setitem__
Failed example:
    len(D)
Expected:
    1
Got:
    5
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 1047, in sage.misc.weak_dict.WeakValueDictionary._enter_iter
Failed example:
    len(D.keys())
Expected:
    0
Got:
    9
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 1073, in sage.misc.weak_dict.WeakValueDictionary._exit_iter
Failed example:
    len(D.keys())
Expected:
    0
Got:
    9
**********************************************************************
8 items had failures:
   2 of  28 in sage.misc.weak_dict
   1 of   7 in sage.misc.weak_dict.WeakValueDictEraser
   1 of   6 in sage.misc.weak_dict.WeakValueDictEraser.__call__
   1 of   6 in sage.misc.weak_dict.WeakValueDictEraser.__init__
   3 of  25 in sage.misc.weak_dict.WeakValueDictionary
   1 of  28 in sage.misc.weak_dict.WeakValueDictionary.__setitem__
   1 of  12 in sage.misc.weak_dict.WeakValueDictionary._enter_iter
   1 of  12 in sage.misc.weak_dict.WeakValueDictionary._exit_iter
    [271 tests, 11 failures, 0.83 s]
----------------------------------------------------------------------
sage -t --long src/sage/misc/weak_dict.pyx  # 11 doctests failed
----------------------------------------------------------------------
Total time for all tests: 1.2 seconds
    cpu time: 0.8 seconds
    cumulative wall time: 0.8 seconds


CC: @saraedum

Component: porting

Keywords: raspberry

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/28940

@jaapspies jaapspies added this to the sage-9.1 milestone Jan 2, 2020
@mkoeppe
Copy link
Member

mkoeppe commented May 1, 2020

comment:1

Moving tickets to milestone sage-9.2 based on a review of last modification date, branch status, and severity.

@mkoeppe mkoeppe modified the milestones: sage-9.1, sage-9.2 May 1, 2020
@fchapoton
Copy link
Contributor

Changed keywords from none to raspberry

@dimpase
Copy link
Member

dimpase commented Aug 27, 2020

comment:3

this is still present on 9.2.beta10

Using --optional=bliss,build,dochtml,e_antic,jupymake,lrslib,memlimit,normaliz,sage
Doctesting 1 file using 4 threads.
sage -t --random-seed=0 src/sage/misc/weak_dict.pyx
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 60, in sage.misc.weak_dict
Failed example:
    len(D)
Expected:
    1
Got:
    10
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 63, in sage.misc.weak_dict
Failed example:
    len(D)
Expected:
    0
Got:
    10
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 157, in sage.misc.weak_dict.WeakValueDictEraser
Failed example:
    len(D)
Expected:
    0
Got:
    1
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 178, in sage.misc.weak_dict.WeakValueDictEraser.__init__
Failed example:
    len(D)  # indirect doctest
Expected:
    0
Got:
    1
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 205, in sage.misc.weak_dict.WeakValueDictEraser.__call__
Failed example:
    len(D)  # indirect doctest
Expected:
    0
Got:
    1
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 260, in sage.misc.weak_dict.WeakValueDictionary
Failed example:
    len(D)
Expected:
    1
Got:
    10
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 263, in sage.misc.weak_dict.WeakValueDictionary
Failed example:
    len(D)
Expected:
    0
Got:
    10
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 305, in sage.misc.weak_dict.WeakValueDictionary
Failed example:
    for i in range(10000):
        ki = floor(random()*B)
        vi = C(floor(random()*B))
        D1[ki] = vi
        D2[ki] = vi
        L[ki]  = vi
        del vi
        ko = floor(random()*B)
        if ko in D1:
            del D1[ko]
            L[ko] = None
        assert D1 == D2
Exception raised:
    Traceback (most recent call last):
      File "/home/pi/sage/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 720, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/pi/sage/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 1145, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.misc.weak_dict.WeakValueDictionary[23]>", line 12, in <module>
        assert D1 == D2
    AssertionError
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 527, in sage.misc.weak_dict.WeakValueDictionary.__setitem__
Failed example:
    len(D)
Expected:
    1
Got:
    5
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 1046, in sage.misc.weak_dict.WeakValueDictionary._enter_iter
Failed example:
    len(D.keys())
Expected:
    0
Got:
    9
**********************************************************************
File "src/sage/misc/weak_dict.pyx", line 1072, in sage.misc.weak_dict.WeakValueDictionary._exit_iter
Failed example:
    len(D.keys())
Expected:
    0
Got:
    9
**********************************************************************
8 items had failures:
   2 of  28 in sage.misc.weak_dict
   1 of   7 in sage.misc.weak_dict.WeakValueDictEraser
   1 of   6 in sage.misc.weak_dict.WeakValueDictEraser.__call__
   1 of   6 in sage.misc.weak_dict.WeakValueDictEraser.__init__
   3 of  25 in sage.misc.weak_dict.WeakValueDictionary
   1 of  28 in sage.misc.weak_dict.WeakValueDictionary.__setitem__
   1 of  12 in sage.misc.weak_dict.WeakValueDictionary._enter_iter
   1 of  12 in sage.misc.weak_dict.WeakValueDictionary._exit_iter
    [271 tests, 11 failures, 0.72 s]
----------------------------------------------------------------------
sage -t --random-seed=0 src/sage/misc/weak_dict.pyx  # 11 doctests failed
----------------------------------------------------------------------
Total time for all tests: 1.0 seconds

This is on a "real" Raspberry pi 4:

pi@raspberrypi:~/sage $ uname -a
Linux raspberrypi 5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020 armv7l GNU/Linux

@dimpase
Copy link
Member

dimpase commented Aug 27, 2020

Changed author from jsp to none

@dimpase
Copy link
Member

dimpase commented Aug 27, 2020

comment:4

Author: field is for the full name of the (intended, or real) author of the branch with the fix.

@dimpase
Copy link
Member

dimpase commented Aug 31, 2020

comment:5

this is basically a duplicate of #28941

@dimpase dimpase removed this from the sage-9.2 milestone Aug 31, 2020
@dimpase
Copy link
Member

dimpase commented Aug 31, 2020

Reviewer: Dima Pasechnik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants