Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Oct 2002 21:36:08 -0400
From:      Jake Burkholder <jake@locore.ca>
To:        Ben Stuyts <ben@stuyts.nl>
Cc:        Terry Lambert <tlambert2@mindspring.com>, current@FreeBSD.ORG, Jeff Roberson <jroberson@chesapeake.net>, Robert Watson <rwatson@FreeBSD.ORG>, jeff@FreeBSD.ORG, Alfred Perlstein <alfred@FreeBSD.ORG>
Subject:   Re: [Ugly PATCH] Again: panic kmem_malloc()
Message-ID:  <20021018213608.A60569@locore.ca>
In-Reply-To: <4.3.2.7.2.20021019001010.00b89f28@terminus>; from ben@stuyts.nl on Sat, Oct 19, 2002 at 12:19:57AM %2B0200
References:  <4.3.2.7.2.20021018125313.00bb8990@terminus> <3DB07805.AB4BAA15@mindspring.com> <4.3.2.7.2.20021019001010.00b89f28@terminus>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021018213608.A60569>