Changes between Version 1 and Version 2 of Ticket #715, comment 282
 Timestamp:
 09/09/12 07:02:23 (9 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #715, comment 282
v1 v2 1 Oh sigh ... this could be such a red herring. On bsd.math, there is a huge difference between sage versions in how this piece of code behaves:2 On `sage 5.4.beta0` (with patches):3 1 {{{ 4 2 sage: PF = WeylGroup(['A',3]).pieri_factors() 5 3 sage: %time a = PF.an_element() 6 CPU times: user 0.06 s, sys: 0.05 s, total: 0.11 s7 Wall time: 43.57 s8 4 }}} 9 On `sage 5.2beta1` (happens to be the systemwide sage install on bsd): 5 I think `an_element` is exonerated. If you replace it with `a=iter(PF).next()` you get the same element and the same segfault. 6 7 Further desperate facts that may or may not be relevant: 8  if you make `TripleDict` strong on ''any'' of its keys, the segfault disappears. That doesn't say no memory corruption happens of course. 9 10  if you store all key triples fed into TripleDict (setting strong refs), you find 220 keys before the tests run (i.e., just due to sage startup) and 351 after (and no segfault of course). A set of the 151 new entries: 10 11 {{{ 11 sage: PF = WeylGroup(['A',3]).pieri_factors() 12 sage: %time a = PF.an_element() 13 CPU times: user 0.06 s, sys: 0.05 s, total: 0.10 s 14 Wall time: 0.44 s 12 set([Full MatrixSpace of 4 by 4 sparse matrices over Integer Ring, Set of Python objects of type 'long', Ring of integers modulo 389, Extended weight space over the Rational Field of the Root system of type ['A', 3, 1], Full MatrixSpace of 4 by 4 dense matrices over Rational Field, Multivariate Polynomial Ring in a, b, c, d over Rational Field, Weight space over the Rational Field of the Root system of type ['A', 3], Coroot lattice of the Root system of type ['A', 3, 1], Ambient space of the Root system of type ['A', 3], Set of Python objects of type 'int', Weight lattice of the Root system of type ['A', 3, 1], Vector space of dimension 4 over Rational Field, Weight lattice of the Root system of type ['A', 3], Extended weight lattice of the Root system of type ['A', 3, 1], Full MatrixSpace of 130 by 390 sparse matrices over Rational Field, <type 'int'>, Root space over the Rational Field of the Root system of type ['A', 3], Interface to the PARI C library, Integer Ring, Root space over the Rational Field of the Root system of type ['A', 3, 1], The Infinity Ring, Rational Field, Weight space over the Rational Field of the Root system of type ['A', 3, 1], Root lattice of the Root system of type ['A', 3, 1], Multivariate Polynomial Ring in x, y, z over Rational Field, Full MatrixSpace of 130 by 390 sparse matrices over Integer Ring, <type 'NoneType'>, Root lattice of the Root system of type ['A', 3], <type 'long'>]) 15 13 }}} 16 The 5.4b0 time is really anomalous. On another system, 5.3rc1+patches behaves very comparably to 5.0 for me. So there is something fishy with this. 17 18 The method eventually called, PF._an_element_, is a very interesting piece of work. It's recursive and exercises the coercion system really well. So lots of opportunities to foul up caches and memory. Implicated in all of this, by the way: 19 {{{ 20 class WeylGroup_gens(ClearCacheOnPickle, UniqueRepresentation, MatrixGroup_gens) 21 }}} 22 Oh this is so cool. All our favourites in one place: 23 {{{ 24 class MatrixGroup_gens(MatrixGroup_gap) 25 }}} 26 We're wrapping an interface too! (that sort of explains the anomalous timing. Apparently the particular 5.4b0 build on bsd has a very bad gap? 14 Quite some entries involving "root systems" etc., so it's not so far fetched to think that a bad deletion of something involving the `WeylGroup` causes the memory corruption. In that case the corruption is happening on all systems. It just only triggers a segfault on bsd. So someone with good valgrind experience wanting to analyze the memory management of the `cachefunc.pyx` doctests?