#715: Parents probably not reclaimed due to too much caching
--------------------------------------------------------------------+-------
Reporter: robertwb |
Owner: somebody
Type: defect |
Status: closed
Priority: major |
Milestone: sage-5.5
Component: coercion |
Resolution: fixed
Keywords: weak cache coercion Cernay2012 | Work
issues:
Report Upstream: N/A |
Reviewers: Jean-Pierre Flori, Simon King, Nils Bruin
Authors: Simon King, Jean-Pierre Flori |
Merged in: sage-5.5.beta0
Dependencies: #13145, #13741, #13746, to be merged with #11521 |
Stopgaps:
--------------------------------------------------------------------+-------
Comment (by jpflori):
Replying to [comment:353 SimonKing]:
> Replying to [comment:352 jpflori]:
> > Bad (?) news, Sage 5.2 fails the same way.
> > I've got some FLINT related patches on top of vanilla 5.2 but have
double checked I have nothing related to the memleak tickets.
>
> It means that the debug build of Python can not (yet) be used to debug
the problems introduced by this patch.
If there are indeed additional problems caused by the patches here.
>
> I suggest that we move fixing these unrelated problems to a new ticket.
Agreed.
>
> However, the valgrind output suggests that there ''is'' something wrong
with the new `TripleDict` implementation. Is there a way to tell from the
valgrind output where (i.e., for instances of what classes) the invalid
reads occur? IIRC, you suggested on sage-devel that it could be related
with endomorphism rings, kind of "domain and codomain are both decref'd,
which is bad if they are the same".
Kind of, there is something wrong happening and it involves TripleDict
indeed, but maybe its only a consequence of a previous problem,
potentially the assert that fails when Sage starts.
Let's say that TripleDict tries to delete some of its elements but those
were already deleted because of a superfluous previous decref.
And when Python tries to delete them again (because a final valid strong
reference has been deleted), it can randomly segfault (and did not until
the inclusion of these patches!).
With the debug build, instead of randomly segfaulting, these spurious
decref make the assert clauses abort the program.
A realistic hypothesis is that the decref problems were already present
but went unnoticed.
It's only the patcehs here which make a deeper use of weakrefs that
revealed these previous problems.
And hopefully there are no other problems introduced here (frankly after
staring for hours at the new TripleDict code is does not look that bad, so
we can hope it is really correct).
> But is that just a guess, or has it been confirmed?
That was just a guess, kind of: what could be the more fish here? ok, it
is when both domain and codomain are equal.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/715#comment:354>
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.