#5278: On modern fedora 64 installs, sage exists frequently when omalloc thinks
there is no memory left
---------------------+------------------------------------------------------
 Reporter:  was      |        Owner:  cwitty  
     Type:  defect   |       Status:  new     
 Priority:  blocker  |    Milestone:  sage-3.3
Component:  misc     |   Resolution:          
 Keywords:           |  
---------------------+------------------------------------------------------
Comment (by cwitty):

 Well, I tracked down one instance of this.  omalloc says there is no
 memory left when sbrk() (which is a wrapper for brk()) fails, like this:
 {{{
 23475 brk(0x22e6030)                    = 0x22e0000
 23475 brk(0x22e6030)                    = 0x22e0000
 }}}
 Here, brk() is trying (and failing) to allocate the memory between
 0x22e0000 and 0x22e6030.

 The reason is that the memory is already allocated, to hold a shared
 library.  Earlier in the same trace, we see:
 {{{
 23475 open("/scratch/wstein/sage-3.3.rc0/local/lib/python2.5/lib-
 dynload/grp.so", O_RDONLY) = 9
 23475 read(9,
 "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\f\0\0\0\0\0\0@"...,
 832) = 832
 23475 fstat(9, {st_mode=S_IFREG|0755, st_size=24578, ...}) = 0
 23475 mmap(NULL, 2104704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
 9, 0) = 0x22e2000
 23475 mprotect(0x22e4000, 2093056, PROT_NONE) = 0
 23475 mmap(0x24e3000, 4096, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 9, 0x1000) = 0x24e3000
 }}}

 The return value of the first mmap() shows that it has allocated its
 memory at 0x22e2000, squarely in the range that brk() is trying to
 allocate.  So brk() is correct to fail here.

 The question is why mmap() is picking addresses in the range just above
 the current brk(), and -- more to the point -- whether there is something
 we can do to change its policy.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5278#comment:7>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to