Port-alpha archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Stream of kernel messages: pid <n> is killed: exceeded RLIMIT_CPU

christos%zoulas.com@localhost (Christos Zoulas) writes:
> On Nov 13, 11:51am, jarle%uninett.no@localhost (Jarle Greipsland) wrote:
> -- Subject: Re: Stream of kernel messages: pid <n> is killed: exceeded RLIMIT
> | What do you want printed, and where?
> I would start with the comparison between the limit and the cpu time that
> causes the limit to be exceeded. I would print the two values compared.
With the attached patch applied, the kernel now prints:

pid 0 is killed: exceeded RLIMIT_CPU, runtm=18446744073709551615 
rlim_cur=9223372036854775807 rlim_max=9223372036854775807
WARNING: negative runtime; monotonic clock has gone backwards
pid 0 is killed: exceeded RLIMIT_CPU, runtm=18446744073709551614 
rlim_cur=9223372036854775807 rlim_max=9223372036854775807
pid 0 is killed: exceeded RLIMIT_CPU, runtm=18446744073709551613 
rlim_cur=9223372036854775807 rlim_max=9223372036854775807

Also, this time the log messages seems to have stopped after just
these three messages, and no other processes than pid 0 seem to
have been affected.  Slightly suspicious that
 9223372036854775807==0x7FFFFFFFFFFFFFFF, and

Index: sys/kern/kern_synch.c
RCS file: /cvsroot/src/sys/kern/kern_synch.c,v
retrieving revision 1.296
diff -u -r1.296 kern_synch.c
--- sys/kern/kern_synch.c       6 Nov 2011 14:11:00 -0000       1.296
+++ sys/kern/kern_synch.c       13 Nov 2011 15:47:07 -0000
@@ -1255,8 +1255,9 @@
                if (__predict_false(runtm >= rlim->rlim_cur)) {
                        if (runtm >= rlim->rlim_max) {
                                sig = SIGKILL;
-                               log(LOG_NOTICE, "pid %d is killed: %s\n",
-                                       p->p_pid, "exceeded RLIMIT_CPU");
+                               log(LOG_NOTICE, "pid %d is killed: %s, 
runtm=%lu rlim_cur=%lu rlim_max=%lu\n",
+                                       p->p_pid, "exceeded RLIMIT_CPU",
+                                       (unsigned long)runtm, (unsigned 
long)rlim->rlim_cur, (unsigned long)rlim->rlim_max);
                                uprintf("pid %d, command %s, is killed: %s\n",
                                        p->p_pid, p->p_comm,
                                        "exceeded RLIMIT_CPU");

Home | Main Index | Thread Index | Old Index