Subject: kern/17386: processes killed because they exceeded RLIMIT_CPU are not logged
To: None <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 06/25/2002 13:44:06
>Number: 17386
>Category: kern
>Synopsis: processes killed because they exceeded RLIMIT_CPU are not logged
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 25 11:54:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Greg A. Woods
>Release: NetBSD-current 2002/06/23
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD
>Description:
The kernel will kill processes that have exceeded rlim-rlim_max
without logging why.
>How-To-Repeat:
>Fix:
log the reason SIGKILL will be sent to the process.
Index: kern_synch.c
===================================================================
RCS file: /cvs/master/m-NetBSD/main/syssrc/sys/kern/kern_synch.c,v
retrieving revision 1.108
diff -c -c -r1.108 kern_synch.c
*** kern_synch.c 21 May 2002 01:38:27 -0000 1.108
--- kern_synch.c 25 Jun 2002 17:41:55 -0000
***************
*** 829,834 ****
--- 829,839 ----
* use sched_psignal.
*/
if (s >= rlim->rlim_max)
+ /* XXX really should invent:
+ *
+ * sched_killproc(p, "exceeded RLIMIT_CPU");
+ */
+ log(LOG_ERR, "pid %d will be killed: %s\n", p->p_pid, "exceeded RLIMIT_CPU");
sched_psignal(p, SIGKILL);
else {
sched_psignal(p, SIGXCPU);
>Release-Note:
>Audit-Trail:
>Unformatted: