From owner-freebsd-current Fri Oct 18 18:26:56 2002 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 7080537B401 for ; Fri, 18 Oct 2002 18:26:54 -0700 (PDT) Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8CFB43E77 for ; Fri, 18 Oct 2002 18:26:53 -0700 (PDT) (envelope-from jake@k6.locore.ca) Received: from k6.locore.ca (jake@localhost.locore.ca [127.0.0.1]) by k6.locore.ca (8.12.5/8.12.5) with ESMTP id g9J1a8bd060878; Fri, 18 Oct 2002 21:36:08 -0400 (EDT) (envelope-from jake@k6.locore.ca) Received: (from jake@localhost) by k6.locore.ca (8.12.5/8.12.5/Submit) id g9J1a86P060877; Fri, 18 Oct 2002 21:36:08 -0400 (EDT) Date: Fri, 18 Oct 2002 21:36:08 -0400 From: Jake Burkholder To: Ben Stuyts Cc: Terry Lambert , current@FreeBSD.ORG, Jeff Roberson , Robert Watson , jeff@FreeBSD.ORG, Alfred Perlstein Subject: Re: [Ugly PATCH] Again: panic kmem_malloc() Message-ID: <20021018213608.A60569@locore.ca> References: <4.3.2.7.2.20021018125313.00bb8990@terminus> <3DB07805.AB4BAA15@mindspring.com> <4.3.2.7.2.20021019001010.00b89f28@terminus> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <4.3.2.7.2.20021019001010.00b89f28@terminus>; from ben@stuyts.nl on Sat, Oct 19, 2002 at 12:19:57AM +0200 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Apparently, On Sat, Oct 19, 2002 at 12:19:57AM +0200, Ben Stuyts said words to the effect of; > Terry, > > At 23:07 18/10/2002, you wrote: > >Ben Stuyts wrote: > > > Furthermore, this might be interesting: the last vmstat -m log > > > before the panic. Maybe someone can check if these values are reasonable? > > > The system has 64 MB memory and has been up for about 24 hrs with almost no > > > load. > > > sem344456 5390K 5390K 344456 16,1024,4096 > > > >Almost 5.3M of unswappable physical memory dedicated to semaphores > >seems like a bit much. > > Yes, and it increases continuously, for example when I fetch new mail (over > pop) from my windows pc. The pc stores this again on a network drive, so > both qpopper and smbd are involved. For example, vmstat -m says: > semop() leaks memory. An important free() was removed by alfred in rev 1.55. Try this. Jake Index: sysv_sem.c =================================================================== RCS file: /home/ncvs/src/sys/kern/sysv_sem.c,v retrieving revision 1.55 diff -u -r1.55 sysv_sem.c --- sysv_sem.c 13 Aug 2002 08:47:17 -0000 1.55 +++ sysv_sem.c 19 Oct 2002 01:20:35 -0000 @@ -1128,6 +1128,8 @@ td->td_retval[0] = 0; done2: mtx_unlock(sema_mtxp); + if (sops) + free(sops, M_SEM); return (error); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message