From owner-freebsd-current@FreeBSD.ORG Tue Apr 15 13:40:26 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F9EF37B419 for ; Tue, 15 Apr 2003 13:40:26 -0700 (PDT) Received: from mailspool.ops.uunet.co.za (mailspool.ops.uunet.co.za [196.7.0.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6562443F85 for ; Tue, 15 Apr 2003 13:40:24 -0700 (PDT) (envelope-from ianf@wcom.com) Received: from copernicus.so.cpt1.za.uu.net ([196.30.72.32]) by mailspool.ops.uunet.co.za with esmtp (Exim 3.36 #1) id 195XE5-0003YQ-00 for FreeBSD-current@freebsd.org; Tue, 15 Apr 2003 22:40:21 +0200 Received: from localhost ([127.0.0.1] helo=wcom.com) by copernicus.so.cpt1.za.uu.net with esmtp (Exim 3.36 #1) id 195XE4-000EMd-00 for FreeBSD-current@FreeBSD.org; Tue, 15 Apr 2003 22:40:20 +0200 To: FreeBSD-current@FreeBSD.org From: "Ian Freislich" X-image-url: http://www.digs.iafrica.com/gallery/ian-small.gif X-BOFH: true X-LART: Depleted uranium X-No-Junk-Mail: I do not want to get *any* junk mail. You have been deleted. Date: Tue, 15 Apr 2003 22:40:20 +0200 Message-ID: <55218.1050439220@wcom.com> Sender: ianf@wcom.com Subject: Kernel memory leak? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2003 20:40:26 -0000 Hi Ok, so I'm a fool for trashing my other server's disklabel, but my script for recovering the drive by finding the filesystem start highlighted this issue. Running this program, resulted in my server panicing after about 15 minutes (15000 iterations). Watching top, the 'wired' memory slowly increases increases until the system panics with the message below. It's very repeatable, so I can get a more detailed backtrace if required. Ian #! /usr/local/bin/perl # There must be a better way to do this for ($i = 345000; $i < 8538240; $i += 2) { open(FILE, ">newlabel"); print FILE < c: 8538240 0 unused 1024 8192 # (Cyl. 0 - 8893) e: 8538240 $i 4.2BSD 1024 8192 46208 # (Cyl. 0 - 8893) END close(FILE); system("disklabel -R /dev/ad2s1c newlabel"); $result = system("dumpfs /dev/ad2s1e|grep UFS1"); print "RESULT: $result\t $i\n"; last if ($result == 0); } panic: kmem_malloc(4096): kmem_map too small: 109064192 total allocated cpuid = 1; lapic.id = 01000000 boot() called on cpu#1 syncing disks, buffers remaining... 1423 1423 1422 1422 1422 1422 1422 1422 1422 1422 1422 1422 1422 1422 1422 1422 1422 1422 1422 1422 1422 1422 giving up on 910 buffers Uptime: 15m40s Dumping 191 MB ata0: resetting devices .. done 16 32 48 64 80 96 112 128 144 160 176 (kgdb) bt #0 0xc01d8acb in doadump () #1 0xc01d916a in boot () #2 0xc01d94b0 in poweroff_wait () #3 0xc02b7e64 in kmem_malloc () #4 0xc02c8c87 in page_alloc () #5 0xc02c898c in slab_zalloc () #6 0xc02c9c68 in uma_zone_slab () #7 0xc02c9eb1 in uma_zalloc_bucket () #8 0xc02c9ae7 in uma_zalloc_arg () #9 0xc01ccd99 in malloc () #10 0xc01a6883 in g_slice_init () #11 0xc01a735c in g_slice_new () #12 0xc02dbfed in g_mbr_taste () #13 0xc01a5150 in g_do_event () #14 0xc01a5456 in one_event () #15 0xc01a54e5 in g_run_events () #16 0xc01a6495 in g_event_procbody () #17 0xc01c2b70 in fork_exit ()