#13447: Make libsingular multivariate polynomial rings collectable
-------------------------------------------------------+--------------------
Reporter: nbruin | Owner: rlm
Type: defect | Status:
needs_info
Priority: major | Milestone:
sage-5.4
Component: memleak | Resolution:
Keywords: | Work issues: Input
from libsingular experts
Report Upstream: Reported upstream. No feedback yet. | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
-------------------------------------------------------+--------------------
Comment (by SimonKing):
Replying to [comment:22 nbruin]:
> Replying to [comment:20 SimonKing]:
> > {{{
> > sage -t -force_lib devel/sage/sage/modular/modsym/ambient.py
> > **********************************************************************
> > File "/scratch/sking/sage-5.4.beta0/devel/sage-
main/sage/modular/modsym/ambient.py", line 1351:
> > sage: ModularSymbols(20,2).boundary_space().dimension()
> > Expected:
> > 6
> > Got:
> > 0
> > }}}
> I have seen that error before, with other work-arounds (and I think also
with `singular-malloc`), so if it's indeed only a lower bound, then sage
has merely changed. It's not an error.
I am not a number theorist, but I have learnt from the code that the
dimension is computed from the number of "cusps". Hence, if one adds the
compution of cusps to that test and assigns the involved Hecke modules to
variables, then the tests pass:
{{{
sage: M = ModularSymbols(20, 2)
sage: B = M.boundary_space(); B
Space of Boundary Modular Symbols for Congruence Subgroup
Gamma0(20) of weight 2 and over Rational Field
sage: M.cusps()
[Infinity, 0, -1/4, 1/5, -1/2, 1/10]
sage: M.dimension()
7
sage: B.dimension()
6
}}}
I think this would be a good solution.
> > The second error is apparently ignored and only printed to stderr:
> > {{{
> > Exception AttributeError:
AttributeError('PolynomialRing_field_with_category' object has no
attribute '_modulus',) in ignored
> > Exception AttributeError:
AttributeError('PolynomialRing_field_with_category' object has no
attribute '_modulus',) in ignored
> > }}}
> This is a worrisome error because it's fickle.
> ...
> so it happens when doctesting line 1923. These are probably errors
encountered during a dealloc, so it might be happening in a garbage
collection. It could also be a `WeakValueDict` deletion callback that's
trying to do a comparison that fails.
Agreed.
> Googling shows that you've asked about that exact error message on
`cython-users` on 27 January, 2012, so if you solved the bug that led to
that question then, perhaps you can also solve this one.
Yes, but that question was a pure Cython question, namely like: "Wouldn't
it be a good idea to print the function name in which an error was
ignored, rather than printing an empty string? That would help debugging."
> It could also be a straight memory corruption. ['''edit''':] OK that was
on #11521. You didn't really find that error.
Yes. But if it surfaces again, we should now solve it for good. I guess
deletion from a weak dictionary is a likely candidate.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13447#comment:23>
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.