kern/51964: panic: race condition with realitexpire() called
for zombie
Jilles Tjoelker
jilles at stack.nl
Mon May 12 07:50:19 PDT 2003
The following reply was made to PR kern/51964; it has been noted by GNATS.
From: Jilles Tjoelker <jilles at stack.nl>
To: Tor.Egge at cvsup.no.freebsd.org
Cc: FreeBSD-gnats-submit at freebsd.org, svdb at stack.nl, unix at stack.nl
Subject: Re: kern/51964: panic: race condition with realitexpire() called for zombie
Date: Mon, 12 May 2003 16:43:25 +0200
On Sat, May 10, 2003 at 05:07:56PM +0000, Tor.Egge at cvsup.no.freebsd.org wrote:
> The enclosed patch should fix the problem if your source is newer than
> "2003/05/01 14:16:38 PDT" (the struct proc mutex must be persistent).
> If callout_pending() is true then callout_reset() has been called.
> If callout_active() is false then callout_stop() has been called.
I have upgraded the system and applied the patch. Brief testing
indicates I can run the itimer program for more than 15 minutes without
a crash.
> ---------------------------
> Index: sys/kern/kern_time.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/kern/kern_time.c,v
> retrieving revision 1.101
> diff -u -r1.101 kern_time.c
> --- sys/kern/kern_time.c 26 Feb 2003 17:16:38 -0000 1.101
> +++ sys/kern/kern_time.c 10 May 2003 16:44:41 -0000
> @@ -527,6 +527,12 @@
>
> p = (struct proc *)arg;
> PROC_LOCK(p);
> + /* Check for callout being active */
> + if (callout_pending(&p->p_itcallout) ||
> + !callout_active(&p->p_itcallout)) {
> + PROC_UNLOCK(p);
> + return;
> + }
> psignal(p, SIGALRM);
> if (!timevalisset(&p->p_realtimer.it_interval)) {
> timevalclear(&p->p_realtimer.it_value);
> ---------------------------
More information about the freebsd-bugs
mailing list