From pho@holm.cc  Tue Jul 13 13:44:10 2004
Return-Path: <pho@holm.cc>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6F59C16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 13 Jul 2004 13:44:10 +0000 (GMT)
Received: from relay.pair.com (relay.pair.com [209.68.1.20])
	by mx1.FreeBSD.org (Postfix) with SMTP id D96F143D58
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 13 Jul 2004 13:44:09 +0000 (GMT)
	(envelope-from pho@holm.cc)
Received: (qmail 58965 invoked from network); 13 Jul 2004 13:44:08 -0000
Received: from 0x50a43fc7.hknxx1.adsl-dhcp.tele.dk (HELO current.osted.lan) (80.164.63.199)
  by relay.pair.com with SMTP; 13 Jul 2004 13:44:08 -0000
Received: from current.osted.lan (localhost [127.0.0.1])
	by current.osted.lan (8.12.11/8.12.11) with ESMTP id i6DDi6TJ000802
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 13 Jul 2004 15:44:06 +0200 (CEST)
	(envelope-from pho@current.osted.lan)
Received: (from pho@localhost)
	by current.osted.lan (8.12.11/8.12.11/Submit) id i6DDi6g1000801;
	Tue, 13 Jul 2004 15:44:06 +0200 (CEST)
	(envelope-from pho)
Message-Id: <200407131344.i6DDi6g1000801@current.osted.lan>
Date: Tue, 13 Jul 2004 15:44:06 +0200 (CEST)
From: Peter Holm <peter@holm.cc>
Reply-To: Peter Holm <peter@holm.cc>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: panic: kmem_malloc(163840): kmem_map too small
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         68987
>Category:       kern
>Synopsis:       panic: kmem_malloc(163840): kmem_map too small
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 13 13:50:19 GMT 2004
>Closed-Date:    Mon Nov 19 18:16:42 UTC 2007
>Last-Modified:  Mon Nov 19 18:16:42 UTC 2007
>Originator:     Peter Holm
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD current.osted.lan 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue Jul 13 11:04:18 CEST 2004 pho@current.osted.lan:/usr/src/sys/i386/compile/PHO i386


	
>Description:
	Stress test of core dump via kse_create seems to create the problem, with
	"define PREEMPTION" removed from sys/i386/include/param.h.

	With PREEMPTION defined I get lock ups or these problems:
	http://www.holm.cc/stress/log/cons58.html
	http://www.holm.cc/stress/log/cons59.html
	http://www.holm.cc/stress/log/cons60.html

	Details of the current problem is at
	http://www.holm.cc/stress/log/cons61.html
>How-To-Repeat:
kse_create.c:
int main(int argc, char **argv)
{
        struct kse_mailbox mbx;
        int newgroup = 1;
        int r;
        int i;

        bzero(&mbx, sizeof(mbx));
        mbx.km_version = 1912;
        for (i = 0; i < 499; i++) {
                r = kse_create(&mbx, newgroup);
                if (r == -1)
                        err(1, "kse_create, %d", i);
        }
        return 0;
}

plus

while true;do
   date
   ./kse_create&
   ./kse_create&
   wait;wait
done

>Fix:

	


>Release-Note:
>Audit-Trail:

From: Peter Holm <peter@holm.cc>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/68987: panic: kmem_malloc(163840): kmem_map too small
Date: Sat, 17 Jul 2004 12:49:51 +0200

 The memory usage seems to originate from the parallel invocations
 of coredump() in sys/kern/kern_sig.c. Limiting the number of parallel
 core dumps to fx. 64 seems to alleviate the problem.
 -- 
 Peter Holm
State-Changed-From-To: open->feedback 
State-Changed-By: kmacy 
State-Changed-When: Mon Nov 19 08:08:14 UTC 2007 
State-Changed-Why:  

Is this fixed or does one need to manually limit the number of parallel core dumps? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=68987 
State-Changed-From-To: feedback->closed 
State-Changed-By: kmacy 
State-Changed-When: Mon Nov 19 18:15:33 UTC 2007 
State-Changed-Why:  

Peter Holm: 
I can not reproduce this problem on current. 

Do you want to close it or should I give edit-pr a try? :-) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=68987 
>Unformatted:
