Date: Wed, 24 Dec 2003 20:56:41 -0500 (EST) From: Lowell Gilbert <freebsd-bugs-local@be-well.no-ip.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: silby@FreeBSD.org Subject: kern/60550: [PATCH] hitting process limits produces sub-optimal error messages Message-ID: <20031225015641.11C2C66@be-well.no-ip.com> Resent-Message-ID: <200312250200.hBP20W0p037054@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031225015641.11C2C66>