Project

General

Profile

Actions

Bug #1831

open

HAMMER "malloc limit exceeded" panic

Added by eocallaghan about 14 years ago. Updated over 2 years ago.

Status:
Feedback
Priority:
High
Assignee:
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

I was able to reproduce with a hammer equivalent of issue1726 with the following
test case from vsrinivas in issue1726:

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>

main() {
        int i;
        char id[320] = {};

        for (i = 0; i < 10000000; i++) {
                sprintf(id, "%09d", i);
                link("sin.c", id);
        }

        return 0;
}


----


(kgdb) bt
#0  _get_mycpu (di=0xc06d4ca0) at ./machine/thread.h:83
#1  md_dumpsys (di=0xc06d4ca0)
    at /usr/src/sys/platform/pc32/i386/dump_machdep.c:263
#2  0xc0304d15 in dumpsys () at /usr/src/sys/kern/kern_shutdown.c:880
#3  0xc03052d5 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:387
#4  0xc030559e in panic (fmt=0xc05bb41b "%s: malloc limit exceeded")
    at /usr/src/sys/kern/kern_shutdown.c:786
#5  0xc03032bb in kmalloc (size=25, type=0xc1d8f590, flags=258)
    at /usr/src/sys/kern/kern_slaballoc.c:503
#6  0xc04aa5a3 in hammer_alloc_mem_record (ip=0xcb803d50, data_len=25)
    at /usr/src/sys/vfs/hammer/hammer_object.c:280
#7  0xc04aa91f in hammer_ip_add_directory (trans=0xce350ad4, 
    dip=0xcb803d50, name=0xd3cdb1d0 "000452457", bytes=9, ip=0xce31df50)
    at /usr/src/sys/vfs/hammer/hammer_object.c:666
#8  0xc04bbf8a in hammer_vop_nlink (ap=0xce350b2c)
    at /usr/src/sys/vfs/hammer/hammer_vnops.c:1388
#9  0xc036cc1f in vop_nlink_ap (ap=0xce350b2c)
    at /usr/src/sys/kern/vfs_vopops.c:1978
#10 0xc03717ca in null_nlink (ap=0xce350b2c)
    at /usr/src/sys/vfs/nullfs/null_vnops.c:164
#11 0xc036d465 in vop_nlink (ops=0xcdbbe030, nch=0xce350c48, 
    dvp=0xce0913e8, vp=0xce2f04e8, cred=0xcdef1738)
    at /usr/src/sys/kern/vfs_vopops.c:1397
---Type <return> to continue, or q <return> to quit--- 
---Type <return> to continue, or q <return> to quit---#12 0xc0365496 in
kern_link (nd=0xce350c80, linknd=0xce350c48)
    at /usr/src/sys/kern/vfs_syscalls.c:2320
#13 0xc036ad49 in sys_link (uap=0xce350cf0)
    at /usr/src/sys/kern/vfs_syscalls.c:2345
#14 0xc055f6b3 in syscall2 (frame=0xce350d40)
    at /usr/src/sys/platform/pc32/i386/trap.c:1310
#15 0xc0547fb6 in Xint0x80_syscall ()
    at /usr/src/sys/platform/pc32/i386/exception.s:876
#16 0x0000001f in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(kgdb) 

Dump on my leaf account;
http://leaf.dragonflybsd.org/~evocallaghan/hammer_vfs_panic.7z

Cheers,
Edward.


Files

hammermalloc_core.txt.0 (49.6 KB) hammermalloc_core.txt.0 tuxillo, 01/23/2013 05:03 PM
Actions

Also available in: Atom PDF