On Nov 30, 2007, at 1:11 AM, mabshoff wrote:
> On Nov 29, 10:50 am, mabshoff <[EMAIL PROTECTED]
> dortmund.de> wrote:
>> On Nov 29, 5:04 am, Robert Bradshaw <[EMAIL PROTECTED]>
>> wrote:
>>
>> Hello Robert,
>>
>
> Hi Robert,
>
>>
>>> I've been looking into this and I can't seem to find where the issue
>>> is. The thing I don't understand is that dictobject calls Py_XDECREF
>>> on line 847, which is a macro that essentially boils down to
>>> _Py_Dealloc in object.c. Even if this were inlined, it calls op-
>>>> ob_type->tp_dealloc which should be fast_tp_dealloc (integer.c:
>>> 3258) if indeed the integer created on at integer.c:19673 is the
>>> thing being collected.
>>
>>> Also, an integer object is 28 bytes:
>>
>>> {{{
>>> %cython
>>> from sage.rings.integer cimport Integer
>>> print sizeof(Integer)
>>> ///
>>> 28
>>
>>> }}}
>>
>>> so I can't figure out why 80 bytes is getting allocated at that
>>> spot.
>>> Also strange, in my version of sage, element.c:22299 is the closing
>>> brace of __pyx_tp_new_4sage_9structure_7element_Element, so the
>>> traceback for the allocation seems strange as well.
>>
>>> It would be useful if we could figure out what module is being
>>> collected that is throwing this error.
>>
>> Yep. You once send me a patch for some "magic" integer not to be
>> deallocated with high garbage collection level with Cython - I am
>> going to see if applying that patch fixes it.
>>
>>> - Robert
>>
>> This is now #1337. On Linux PPC the above leads to a crash on exit
>> for
>> every Sage session started. It didn't used to do that with 2.8.7, but
>> that really doesn't indicate a whole lot.
>>
>
> I commented on #1337: Your no-collect-integer.patch prevents the issue
> from happening by incrementing the ref count on global_integer_dummy.
> It isn't really a fix, but an appropriate short term solution.
>
> I plan to apply the patch to 2.8.15, unless you object somehow :)
I'm glad the fix was so simple. I think this is OK permanently, as
bad things can happen if this integer ever goes away before the
session dies completely.
- Robert
--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---