NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: install/46811: sysinst got "pid 0 is killed: exceeded RLIMIT_CPU" on netbsd-6/sparc
The following reply was made to PR install/46811; it has been noted by GNATS.
From: matthew green <mrg%eterna.com.au@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: install-manager%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost
Subject: re: install/46811: sysinst got "pid 0 is killed: exceeded RLIMIT_CPU"
on netbsd-6/sparc
Date: Sat, 18 Aug 2012 18:13:54 +1000
> >Description:
> I got the error message "pid 0 is killed: exceeded RLIMIT_CPU"
> repeatedly (1 message/sec?) on sysinst on NetBSD 6.0_BETA2/sparc
> (2012/08/16).
> But it does not seem to occur everytime.
> I use QEMU 0.13 .
> >How-To-Repeat:
> % qemu-system-sparc -boot d -nographic \
> -hda sparc.img -cdrom NetBSD-6.0_BETA2-sparc.iso
> (reproducibility is not 100%...)
i think this is a bug in sched_pstats():
1132 runtm = p->p_rtime.sec;
[ ... ]
1140 runtm += l->l_rtime.sec;
1179 rlim = &p->p_rlimit[RLIMIT_CPU];
1180 sig = 0;
1181 if (__predict_false(runtm >= rlim->rlim_cur)) {
1182 if (runtm >= rlim->rlim_max) {
1183 sig = SIGKILL;
1184 log(LOG_NOTICE, "pid %d is killed:
%s\n",
1185 p->p_pid, "exceeded
RLIMIT_CPU");
[ ... ]
1196 if (__predict_false(runtm < 0)) {
1197 if (!backwards) {
1198 backwards = true;
1199 printf("WARNING: negative runtime; "
1200 "monotonic clock has gone
backwards\n");
1201 }
1202 } else if (__predict_false(sig)) {
1203 KASSERT((p->p_flag & PK_SYSTEM) == 0);
1204 psignal(p, sig);
1205 }
ie, it prints the warning, but then due to runtm being negative doesn't
actually send the signal ever. can you change line 1181 like so:
1181 if (__predict_false(runtm >= 0 && runtm >=
rlim->rlim_cur)) {
and re-test?
.mrg.
Home |
Main Index |
Thread Index |
Old Index