Project

General

Profile

Bug #1089

hammer-mount: malloc limit exceeded panic

Added by mneumann almost 13 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

I got this panic 3 times today with 2.0, when building packages like
firefox3 on a hammer partition.

hammer-mount: malloc limit exceeded
hammer_alloc_mem_record+0x22
hammer_ip_add_directory+0x1d
hammer_vop_ncreate+0xba
vop_ncreate+0x3d
vn_open+0xf3
kern_open+0x84

Strange, as I have 3GB of memory. Is there a memory leak somewhere?
I just build 1 or 2 packages (distfiles are already fetched), no other
activity. And it's a UP machine.

Regards,

Michael

History

#1

Updated by dillon almost 13 years ago

:I got this panic 3 times today with 2.0, when building packages like
:firefox3 on a hammer partition.
:
: hammer-mount: malloc limit exceeded
: hammer_alloc_mem_record+0x22
: hammer_ip_add_directory+0x1d
: hammer_vop_ncreate+0xba
: vop_ncreate+0x3d
: vn_open+0xf3
: kern_open+0x84
:
:Strange, as I have 3GB of memory. Is there a memory leak somewhere?
:I just build 1 or 2 packages (distfiles are already fetched), no other
:activity. And it's a UP machine.
:
:Regards,
:
: Michael

I thought I had fixed those.  Damn.
Can you get a crash dump from the panic?  And upload it to your
leaf account?
This does sound like a memory leak but it could also be something
else. HAMMER keeps track of all those allocations so I should be
able to figure out what is going on from a crash dump.
-Matt
Matthew Dillon
<>
#2

Updated by mneumann almost 13 years ago

Hm, I couldn't reproduce the panic after setting "dumpdev" correctly in
loader.conf (it refered to a non existing partition). I also used
hw.physmem="2G" (instead of the 3G of memory).

I try again without the hw.physmem setting and see if I can reproduce
it. Or could it be related to maybe dumpdev (or the missing swap partition)?

Regards,

Michael
#3

Updated by dillon almost 13 years ago

:: hammer-mount: malloc limit exceeded
:: hammer_alloc_mem_record+0x22
::
::Strange, as I have 3GB of memory. Is there a memory leak somewhere?
::I just build 1 or 2 packages (distfiles are already fetched), no other
::activity. And it's a UP machine.
::
::Regards,

I tracked the problem down to the system's kern.maxvnodes variable,
which on a 3G machine is set to 197946.
This is too large for the 100MB of kmalloc space that HAMMER is allowed
to use.
(kgdb) print hammer_count_inodes
$25 = 162952
(kgdb) print hammer_count_inodes * sizeof(struct hammer_inode)
$26 = 95163968
I will adjust the maxvnodes calculation and I think I will also
have to create a separate kmalloc space for HAMMER's vnodes.
You can temporarily work around the problem by setting the
kern.maxvnodes sysctl to a lower value, like 100000.
-Matt

Also available in: Atom PDF