#19244: Broken doctest in src/sage/categories/fields.py
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  blocker            |    Milestone:  sage-6.9
      Component:  memleak            |   Resolution:
       Keywords:  random_fail        |    Merged in:
        Authors:  Simon King         |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/SimonKing/broken_doctest_in_src_sage_categories_fields_py|  
0d97c7db960aa058b7cb1c60aea839dbc3d161e9
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by {'newvalue': u'Simon King', 'oldvalue': ''}):

 * status:  new => needs_review
 * commit:   => 0d97c7db960aa058b7cb1c60aea839dbc3d161e9
 * component:  categories => memleak
 * author:   => Simon King


Comment:

 I have seen that repeatedly. I think at some point I suggested to test
 that the difference is not zero but is at most zero. Now I suggest a
 different solution.

 We have seen the following phenomenon while we introduced Sage's weak
 coercion dictionaries. It is possible that `gc.collect()` collects some
 objects, and by this collection *other* objects become collectable, which
 however will only be collected during a subsequent cyclic garbage
 collection. One can construct examples such that n cyclic garbage
 collections will not collect a certain object, but the (n+1)-st cyclic
 garbage collection *will* collect it.

 It could be that we see this phenomenon here in real life. I.e., it could
 be that the two `gc.collect()` commands in the test do not make a certain
 field collectable that was created in a different doctest. However, a
 third collection step that may or may not happen in the for-loop does make
 it collectable.

 Thus, depending on whether or not a third collection happens, we see a
 failure or not.

 If my explanation is correct, then disabling the garbage collection till
 we really want it to happen should fix the test permanently.

 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=0d97c7db960aa058b7cb1c60aea839dbc3d161e9
 0d97c7d]||{{{Make garbage collection deterministic during a test against a
 memory leak}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/19244#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to