#12215: Memleak in UniqueRepresentation, @cached_method
--------------------------------------------------------------+-------------
Reporter: vbraun | Owner:
Type: defect | Status:
positive_review
Priority: major | Milestone:
sage-5.5
Component: memleak | Resolution:
Keywords: UniqueRepresentation cached_method caching | Work issues:
Report Upstream: N/A | Reviewers:
Nils Bruin
Authors: Simon King | Merged in:
Dependencies: #11521 | Stopgaps:
--------------------------------------------------------------+-------------
Comment (by nbruin):
OK, the "connection lost" problem was resolved by `rm -rf ~/.sage`. I
don't know what was screwed up, but something there was making *any* sage
session very prone to terminating the whole connection.
It seems that line 971 in `mpolynomialsystem.py` is indeed a problematic
doctest. It seems to hang. When I run the doctest in `gdb` I can interrupt
and get a traceback (first bit):
{{{
#0 0x00007fb5259748aa in PyObject_Free (p=0x57d0300) at
Objects/obmalloc.c:969
#1 0x00007fb525985dcc in PyTuple_ClearFreeList () at
Objects/tupleobject.c:916
#2 0x00007fb525a0d5cb in collect (generation=2) at Modules/gcmodule.c:792
#3 0x00007fb525a0d87e in _PyObject_GC_Malloc (basicsize=<value optimized
out>) at Modules/gcmodule.c:996
#4 0x00007fb525a0d92d in _PyObject_GC_New (tp=0x7fb525c801a0) at
Modules/gcmodule.c:1467
#5 0x00007fb52595e64c in PyList_New (size=0) at Objects/listobject.c:142
#6 0x00007fb51c6c47e5 in
__pyx_pw_4sage_9structure_11coerce_dict_10TripleDict_1__init__
(__pyx_v_self=0xf7abc50,
__pyx_args=<value optimized out>, __pyx_kwds=<value optimized out>) at
sage/structure/coerce_dict.c:1440
#7 0x00007fb5259885a8 in type_call (type=<value optimized out>,
args=0xf714d0, kwds=0x0) at Objects/typeobject.c:735
#8 0x00007fb52592c308 in PyObject_Call (func=0x7fb51c8d1620,
arg=0xf714d0, kw=0x0) at Objects/abstract.c:2529
#9 0x00007fb51cf2d550 in
__pyx_f_4sage_9structure_6parent_6Parent_init_coerce
(__pyx_v_self=0x4acacf0,
__pyx_optional_args=<value optimized out>) at
sage/structure/parent.c:5757
#10 0x00007fb51d17176b in
__pyx_f_4sage_9structure_10parent_old_6Parent_init_coerce
(__pyx_v_self=0x57d0300,
__pyx_optional_args=<value optimized out>) at
sage/structure/parent_old.c:1638
}}}
so it seems `TripleDict` is implicated. I've tried it a couple of times
and the tracebacks are not completely identical all the time, but the
`collect (generation=2)` always seems to be there. So either the system
gets stuck in a loop in which it is spending a large percentage of the
time in `collect` or somehow `collect` itself gets caught in an infinite
loop. I guess instrumenting TripleDict to see what it's chewing on is most
likely to resolve this one (anything below seems python library).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12215#comment:131>
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.