From wkwu@mailgate.csie.nctu.edu.tw  Tue Mar 30 22:44:41 2004
Return-Path: <wkwu@mailgate.csie.nctu.edu.tw>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D730B16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 30 Mar 2004 22:44:41 -0800 (PST)
Received: from mailgate.csie.nctu.edu.tw (mailgate.csie.nctu.edu.tw [140.113.209.7])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5CC3743D55
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 30 Mar 2004 22:44:41 -0800 (PST)
	(envelope-from wkwu@mailgate.csie.nctu.edu.tw)
Received: from mailgate.csie.nctu.edu.tw (wkwu@localhost [127.0.0.1])
	by mailgate.csie.nctu.edu.tw (8.12.10/8.12.10) with ESMTP id i2V6ifHH097159
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 31 Mar 2004 14:44:41 +0800 (CST)
Received: (from wkwu@localhost)
	by mailgate.csie.nctu.edu.tw (8.12.10/8.12.10/Submit) id i2V6ifxE097158;
	Wed, 31 Mar 2004 14:44:41 +0800 (CST)
	(envelope-from wkwu)
Message-Id: <200403310644.i2V6ifxE097158@mailgate.csie.nctu.edu.tw>
Date: Wed, 31 Mar 2004 14:44:41 +0800 (CST)
From: Wei-Kai Wu <wkwu@csie.nctu.edu.tw>
Reply-To: Wei-Kai Wu <wkwu@csie.nctu.edu.tw>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: A squid process larger than 3G
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         64971
>Category:       kern
>Synopsis:       A squid process larger than 3G
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 30 22:50:20 PST 2004
>Closed-Date:    Fri Dec 29 19:11:53 GMT 2006
>Last-Modified:  Fri Dec 29 19:11:53 GMT 2006
>Originator:     Wei-Kai Wu
>Release:        FreeBSD 5.2.1-RELEASE-p4 i386
>Organization:
Kavalan
>Environment:
FreeBSD altair 5.2.1-RELEASE-p4 FreeBSD 5.2.1-RELEASE-p4 #1: Wed Mar 31 06:13:12 CST 2004     root@altair:/usr/obj/usr/src/sys/ALTAIR  i386

Mainboard: P4P800/SE with P4-2.8CG and 4G RAM

>Description:
When running squid allocated more than 3G memory, the squid will crash.
I have tuned the kernel with MAXDSIZ=(3072UL*1024*1024) and KVA_PAGES=192.

If I enlarged the MAXDSIZ > 3072, the system cannot boot with error message:
(after loading kernel, running init)
init in malloc(): error: recursive call
init in malloc(): error: recursive call
...

>How-To-Repeat:

set the kernel with: 

options		MAXDSIZ=(3200UL*1024*1024)
options		KVA_PAGES=192

>Fix:

No idea.
>Release-Note:
>Audit-Trail:

From: Kris Kennaway <kris@obsecurity.org>
To: Wei-Kai Wu <wkwu@csie.nctu.edu.tw>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: kern/64971: A squid process larger than 3G
Date: Wed, 31 Mar 2004 17:53:17 -0800

 --0OAP2g/MAC+5xKAE
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Wed, Mar 31, 2004 at 02:44:41PM +0800, Wei-Kai Wu wrote:
 
 > >Description:
 > When running squid allocated more than 3G memory, the squid will crash.
 > I have tuned the kernel with MAXDSIZ=3D(3072UL*1024*1024) and KVA_PAGES=
 =3D192.
 >=20
 > If I enlarged the MAXDSIZ > 3072, the system cannot boot with error messa=
 ge:
 > (after loading kernel, running init)
 > init in malloc(): error: recursive call
 > init in malloc(): error: recursive call
 > ...
 
 What you described is not squid crashing, but init.
 
 It sounds like you've adjusted the kernel parameters inappropriately,
 and that's what you need to fix.  I don't know the solution off-hand,
 but check the mailing list archives for extensive discussion on how to
 tune kernel parameters for large-memory configurations.
 
 Be aware that what you're trying to do may be impossible - i.e. if you
 really need 3GB of RAM for squid, it sounds like it's being heavily
 used, and may therefore also require a lot of kernel memory to manage
 the network resources.q  If you need more than 1GB of kernel memory,
 you're out of luck with only 4GB total.
 
 Kris
 --0OAP2g/MAC+5xKAE
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.4 (FreeBSD)
 
 iD8DBQFAa3YMWry0BWjoQKURAjr8AJ91AE1Gi7WkMULAF6lBkccodZ2SHACdHjCK
 KUhhNEUw7enwqu7eCsaChX8=
 =PBO6
 -----END PGP SIGNATURE-----
 
 --0OAP2g/MAC+5xKAE--

From: Kris Kennaway <kris@obsecurity.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/64971: A squid process larger than 3G
Date: Sat, 24 Apr 2004 01:04:36 -0700

 ----- Forwarded message from Kris Kennaway <kris@obsecurity.org> -----
 
 X-Original-To: kris@obsecurity.org
 Delivered-To: kkenn@obsecurity.dyndns.org
 Date: Sat, 24 Apr 2004 01:01:24 -0700
 From: Kris Kennaway <kris@obsecurity.org>
 To: Kris Kennaway <kris@obsecurity.org>
 Cc: freebsd-bugs@FreeBSD.org
 Subject: Re: kern/64971: A squid process larger than 3G
 In-Reply-To: <200404010200.i3120e8s065381@freefall.freebsd.org>
 User-Agent: Mutt/1.4.2.1i
 X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.17.5
 
 On Wed, Mar 31, 2004 at 06:00:40PM -0800, Kris Kennaway wrote:
 
 >  What you described is not squid crashing, but init.
 >  
 >  It sounds like you've adjusted the kernel parameters inappropriately,
 >  and that's what you need to fix.  I don't know the solution off-hand,
 >  but check the mailing list archives for extensive discussion on how to
 >  tune kernel parameters for large-memory configurations.
 >  
 >  Be aware that what you're trying to do may be impossible - i.e. if you
 >  really need 3GB of RAM for squid, it sounds like it's being heavily
 >  used, and may therefore also require a lot of kernel memory to manage
 >  the network resources.q  If you need more than 1GB of kernel memory,
 >  you're out of luck with only 4GB total.
 
 Did you resolve this problem?
 
 Kris
 
 ----- End forwarded message -----
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Fri Dec 29 19:11:52 UTC 2006 
State-Changed-Why:  
major feedback timeout (since 2004) 

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