From owner-freebsd-bugs@FreeBSD.ORG Wed Dec 24 18:00:34 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C8B0016A4CE for ; Wed, 24 Dec 2003 18:00:34 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41CF743D3F for ; Wed, 24 Dec 2003 18:00:32 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) hBP20WFR037055 for ; Wed, 24 Dec 2003 18:00:32 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id hBP20W0p037054; Wed, 24 Dec 2003 18:00:32 -0800 (PST) (envelope-from gnats) Resent-Date: Wed, 24 Dec 2003 18:00:32 -0800 (PST) Resent-Message-Id: <200312250200.hBP20W0p037054@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Lowell Gilbert Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BE82C16A4CE; Wed, 24 Dec 2003 17:56:42 -0800 (PST) Received: from be-well.no-ip.com (lowellg.ne.client2.attbi.com [66.30.200.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B47843D2D; Wed, 24 Dec 2003 17:56:41 -0800 (PST) (envelope-from lowell@be-well.no-ip.com) Received: by be-well.no-ip.com (Postfix, from userid 1147) id 11C2C66; Wed, 24 Dec 2003 20:56:41 -0500 (EST) Message-Id: <20031225015641.11C2C66@be-well.no-ip.com> Date: Wed, 24 Dec 2003 20:56:41 -0500 (EST) From: Lowell Gilbert To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: silby@FreeBSD.org Subject: kern/60550: [PATCH] hitting process limits produces sub-optimal error messages X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2003 02:00:35 -0000 >Number: 60550 >Category: kern >Synopsis: [PATCH] hitting process limits produces sub-optimal error messages >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Dec 24 18:00:31 PST 2003 >Closed-Date: >Last-Modified: >Originator: Lowell Gilbert >Release: FreeBSD 4.9-STABLE i386 >Organization: >Environment: System: FreeBSD be-well.ilk.org 4.9-STABLE FreeBSD 4.9-STABLE #59: Sun Dec 21 16:00:19 EST 2003 root@be-well.ilk.org:/usr/src/sys/compile/BE-WELL i386 >Description: Recent changes to the fork code (to control boot-time interrupt storms) added some error messages for the cases where process limits are hit. These list the UID hitting the limit, but not a process ID, which would be useful also. >How-To-Repeat: Set process limits low with ulimit, then run against the limit. The console will show a message with your UID and no other info. >Fix: I have a proposed patch which just adds the current PID to the printf statement. However, I wonder whether it might be even better to remove the printf completely for the case where process limits (as opposed to maxproc) are being hit. [If a task hits other process limits, there are no comparable messages produced.] *** kern_fork.c.ORIG Wed Nov 12 10:40:22 2003 --- kern_fork.c Wed Dec 24 18:51:32 2003 *************** *** 239,245 **** uid = p1->p_cred->p_ruid; if ((nprocs >= maxproc - 10 && uid != 0) || nprocs >= maxproc) { if (ppsratecheck(&lastfail, &curfail, 1)) ! printf("maxproc limit exceeded by uid %d, please see tuning(7) and login.conf(5).\n", uid); tsleep(&forksleep, PUSER, "fork", hz / 2); return (EAGAIN); } --- 239,245 ---- uid = p1->p_cred->p_ruid; if ((nprocs >= maxproc - 10 && uid != 0) || nprocs >= maxproc) { if (ppsratecheck(&lastfail, &curfail, 1)) ! printf("maxproc limit exceeded by uid %d (pid %d), please see tuning(7) and login.conf(5).\n", uid, p1->p_pid); tsleep(&forksleep, PUSER, "fork", hz / 2); return (EAGAIN); } *************** *** 261,267 **** */ nprocs--; if (ppsratecheck(&lastfail, &curfail, 1)) ! printf("maxproc limit exceeded by uid %d, please see tuning(7) and login.conf(5).\n", uid); tsleep(&forksleep, PUSER, "fork", hz / 2); return (EAGAIN); } --- 261,267 ---- */ nprocs--; if (ppsratecheck(&lastfail, &curfail, 1)) ! printf("maxproc limit exceeded by uid %d (pid %d), please see tuning(7) and login.conf(5).\n", uid, p1->p_pid); tsleep(&forksleep, PUSER, "fork", hz / 2); return (EAGAIN); } >Release-Note: >Audit-Trail: >Unformatted: