Ticket #470 (closed defect: fixed)
libpari doesn't deallocate its stack [usually 8MB or more]
| Reported by: | mabshoff | Owned by: | was |
|---|---|---|---|
| Priority: | major | Milestone: | sage-2.8.7 |
| Component: | packages | Keywords: | memory |
| Cc: | Author(s): | ||
| Report Upstream: | Reviewer(s): | ||
| Merged in: | Work issues: |
Description
Valgrinding Sage 2.8.2rc1 tells me:
==2609== 100,000,000 bytes in 1 blocks are still reachable in loss record 6,989 of 6,989 ==2609== at 0x4A05809: malloc (vg_replace_malloc.c:149) ==2609== by 0xFEE00BA: __pyx_f_3gen_init_stack (gen.c:25497) ==2609== by 0xFF0744D: __pyx_f_3gen_12PariInstance___init__ (gen.c:21006) ==2609== by 0x459FB1: type_call (typeobject.c:436) ==2609== by 0x4156B2: PyObject_Call (abstract.c:1860) ==2609== by 0x47D801: PyEval_CallObjectWithKeywords (ceval.c:3433) ==2609== by 0xFF096E8: initgen (gen.c:27669) ==2609== by 0x49F3F2: _PyImport_LoadDynamicModule (importdl.c:53) ==2609== by 0x49D2CE: import_submodule (import.c:2394) ==2609== by 0x49D7A1: load_next (import.c:2214) ==2609== by 0x49D9FE: import_module_level (import.c:2002) ==2609== by 0x49DE34: PyImport_ImportModuleLevel (import.c:2066)
An empty start up & quit immediately Sage session under valgrind shows about 130 MB of memory still reachable at exit. The vast amount of that is the libpari stack.
William stated that this is non-trivial to fix and will probably require changes in libpari itself.
I would like to state that any application that needs that much stack space should be considered "broken by design".
Cheers,
Michael
Change History
Note: See
TracTickets for help on using
tickets.
