#5970: Weak references in Polynomial Ring cache
-----------------------------------+----------------------------------------
   Reporter:  SimonKing            |          Owner:  malb                      
          
       Type:  defect               |         Status:  positive_review           
          
   Priority:  critical             |      Milestone:  
sage-duplicate/invalid/wontfix      
  Component:  commutative algebra  |       Keywords:  polynomial ring cache 
weak reference
Work_issues:                       |       Upstream:  N/A                       
          
   Reviewer:  Simon King           |         Author:                            
          
     Merged:                       |   Dependencies:                            
          
-----------------------------------+----------------------------------------
Changes (by jdemeyer):

  * work_issues:  regression for test_ec_leak? =>
  * milestone:  sage-4.8 => sage-duplicate/invalid/wontfix


Old description:

> At http://groups.google.com/group/sage-
> support/browse_thread/thread/ef01dae47c835137 a memory leak was reported.
>
> Reason for the leak: Many different polynomial rings are created, but
> used only once. But since we want to have unique parents, they are all
> cached and thus prevented from deletion.
>
> As Robert pointed out, using weak references enables us to both have
> unique parents and garbage collection.
>
> With the patch, that should at least apply to sage 3.4.1.rc3, one can do
> {{{
> sage: for p in primes(2,1000000):
> ....:     R.<x,y,z> = GF(p)[]
> }}}
> without running into memory problems.

New description:

 At http://groups.google.com/group/sage-
 support/browse_thread/thread/ef01dae47c835137 a memory leak was reported.

 Reason for the leak: Many different polynomial rings are created, but used
 only once. But since we want to have unique parents, they are all cached
 and thus prevented from deletion.

 As Robert pointed out, using weak references enables us to both have
 unique parents and garbage collection.

 With the patch, that should at least apply to sage 3.4.1.rc3, one can do
 {{{
 sage: for p in primes(2,1000000):
 ....:     R.<x,y,z> = GF(p)[]
 }}}
 without running into memory problems.

 See instead #715.

--

Comment:

 Replying to [comment:33 SimonKing]:
 > I am very much sure that Jeroen said that this is the correct way to
 proceed: If one thinks that the ticket is a duplicate then you review it
 accordingly, putting it as "positive review". Then the RELEASE MANAGER
 (nobody else!!) closes the ticket by choosing the resolution "duplicate",
 if he believes that the reasons given in the review make sense.

 True, but you forget one important step: you should put the milestone to
 sage-duplicate/invalid/wontfix yourself, so I know the intention is to
 close this ticket as duplicate and no patch should be merged.

 Nobody except for the release manager should close or reopen tickets (with
 a few exceptions like spam tickets, tickets marked as duplicate by the
 person who reported the ticket and with no other activity).

 And if it's a duplicate, it would be nice to add a pointer in the
 description to the ticket of which it is a duplicate of.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5970#comment:34>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to