Opened 16 months ago

Closed 5 months ago

#28940 closed defect (duplicate)

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

Reported by: jsp Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: porting Keywords: raspberry
Cc: saraedum Merged in:
Authors: Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

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


Change History (7)

comment:1 Changed 12 months ago by mkoeppe

  • Milestone changed from sage-9.1 to sage-9.2

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

comment:2 Changed 11 months ago by chapoton

  • Keywords raspberry added

comment:3 Changed 8 months ago by dimpase

  • Authors jsp deleted
  • Cc saraedum added
  • Priority changed from minor to major

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

comment:4 Changed 8 months ago by dimpase

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

comment:5 Changed 8 months ago by dimpase

  • Milestone changed from sage-9.2 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

this is basically a duplicate of #28941

Last edited 8 months ago by dimpase (previous) (diff)

comment:6 Changed 8 months ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_review to positive_review

comment:7 Changed 5 months ago by chapoton

  • Resolution set to duplicate
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.