NetBSD Problem Report #46811
From www@NetBSD.org Sat Aug 18 03:36:31 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 97FD263C3D5
for <gnats-bugs@gnats.NetBSD.org>; Sat, 18 Aug 2012 03:36:31 +0000 (UTC)
Message-Id: <20120818033630.CA56463B882@www.NetBSD.org>
Date: Sat, 18 Aug 2012 03:36:30 +0000 (UTC)
From: isaki@pastel-flower.jp
Reply-To: isaki@pastel-flower.jp
To: gnats-bugs@NetBSD.org
Subject: sysinst got "pid 0 is killed: exceeded RLIMIT_CPU" on netbsd-6/sparc
X-Send-Pr-Version: www-1.0
>Number: 46811
>Category: install
>Synopsis: sysinst got "pid 0 is killed: exceeded RLIMIT_CPU" on netbsd-6/sparc
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: install-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Aug 18 03:40:00 +0000 2012
>Closed-Date: Wed Aug 22 03:55:02 +0000 2012
>Last-Modified: Wed Aug 22 03:55:02 +0000 2012
>Originator: Tetsuya Isaki
>Release: NetBSD 6.0_BETA2/sparc
>Organization:
NetBSD
>Environment:
N/A
>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%...)
>Fix:
N/A
>Release-Note:
>Audit-Trail:
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: install-manager@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
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.
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/46811 CVS commit: src/sys/kern
Date: Sat, 18 Aug 2012 04:54:07 -0400
Module Name: src
Committed By: christos
Date: Sat Aug 18 08:54:07 UTC 2012
Modified Files:
src/sys/kern: kern_synch.c
Log Message:
PR/46811: Tetsua Isaki: Don't handle cpu limits when runtime is negative.
To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.303 src/sys/kern/kern_synch.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Tetsuya Isaki <isaki@pastel-flower.jp>
To: gnats-bugs@NetBSD.org, christos@NetBSD.org
Cc: install-manager@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: PR/46811 CVS commit: src/sys/kern
Date: Sun, 19 Aug 2012 13:02:58 +0900
I tried netbsd-6/sparc again with sys/kern/kern_synch.c,v 1.303
and the error did not happen (I only tried it 5~6 times).
Thank you, chiristos@ and mrg@.
---
Tetsuya Isaki <isaki@pastel-flower.jp / isaki@NetBSD.org>
From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/46811 CVS commit: [netbsd-6] src/sys/kern
Date: Sun, 19 Aug 2012 17:36:42 +0000
Module Name: src
Committed By: riz
Date: Sun Aug 19 17:36:42 UTC 2012
Modified Files:
src/sys/kern [netbsd-6]: kern_synch.c
Log Message:
Pull up following revision(s) (requested by christos in ticket #513):
sys/kern/kern_synch.c: revision 1.303
PR/46811: Tetsua Isaki: Don't handle cpu limits when runtime is negative.
To generate a diff of this commit:
cvs rdiff -u -r1.297 -r1.297.2.1 src/sys/kern/kern_synch.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 22 Aug 2012 03:55:02 +0000
State-Changed-Why:
Fixed and pulled up. Thanks all.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.