Skip to contentSkip to conversation

2GB process crashing on 2.4.14

DISCUSSION Andi Kleen 2 participants 2 messages Dec 7, 2001 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#1 lore raw
Quoted 2 lines · Paul Sargent

So if I was hitting this limit then I should see no / very few gaps, in the /proc/<pid>/maps. Is that true?

It usually fails when malloc() hits your libraries. One solution is to recompile the kernel with a higher TASK_UNMAPPED_BASE (should be a sysctl, but is a fixed define currently). That would force the shared libraries to start at a higher address and give sbrk() more breathing space.

Another way is to use mallopt(M_MMAP_THRESHOLD, ..) and set a low mmap threshold. This allows malloc to use mmap earlier instead of sbrk() and skip the shared library area. It comes at a cost thought, malloc() tends to become more expensive.

With some more changes you can also force the user space to 3.5GB, at the cost of much less kernel memory. It usually makes sense to change TASK_UNMAPPED_BASE with this.

-Andi

P.S.: I'm pretty sure this is a FAQ.

#2 lore raw
In reply to a message not in the archive
Quoted 7 lines · Andi Kleen
Quoted 2 lines · Paul Sargent

So if I was hitting this limit then I should see no / very few gaps, in the /proc/<pid>/maps. Is that true?

It usually fails when malloc() hits your libraries.

[remedies to increase available address space snipped]

Quoted 3 lines

-Andi

P.S.: I'm pretty sure this is a FAQ.

Yes, I think your right, this is. At least, I've come across it before, but I'm not convinced this is my problem in this case.

I think it's failing about 1GB before getting to the bottom of the libraries, but I'm going to monitor maps over the weekend to ensure it doesn't start doing anything wacky just before crashing.

Paul

Signature · 4 lines
Paul Sargent
Tel: +44 (1784) 476669
Fax: +44 (1784) 470699
mailto: [email protected]