Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Sep 2000 10:42:29 -0700
From:      Alfred Perlstein <bright@wintelcom.net>
To:        David Kirchner <dpk@parodius.com>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: Strange procfs bug(?) 3.2-RELEASE
Message-ID:  <20000918104229.D15156@fw.wintelcom.net>
In-Reply-To: <Pine.BSF.4.21.0009181026240.51752-100000@pentarou.parodius.com>; from dpk@parodius.com on Mon, Sep 18, 2000 at 10:27:18AM -0700
References:  <20000911130912.N12231@fw.wintelcom.net> <Pine.BSF.4.21.0009181026240.51752-100000@pentarou.parodius.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Mon, 11 Sep 2000, Alfred Perlstein wrote:
> 
> > * David Kirchner <dpk@parodius.com> [000911 12:19] wrote:
> > >
> > > > Yes, there's a problem with procfs in 3.2 when you stress it heavily
> > > > like that, my suggestion is to get 4-stable running, or at least try
> > > > to get 3.5.1 up and running, but I'm unsure if it's fixed in 3.5.1.
> > > > 
> > > > -Alfred
> > > 
> > > Is this related? :
> > > 
> > > "Don't call calcru() on a swapped-out process. calcru() access p_stats,
> > > which is in U-area."
> > > 
> > > That's from CVSweb at file procfs_status.c, revision 1.14
> > 
> > I'm not really a procfs guru, I only know about your reported problem,
> > I've never heard of that message though.

* David Kirchner <dpk@parodius.com> [000918 10:27] wrote:
> 
> Does anyone know if the patch indicated below was committed to fix this
> FreeBSD 3.2 bug? I can't upgrade to a later release yet, but if this patch
> is it, I can hack it in.

You really ought to upgrade to 4.0, but if you can try this and
please do stress it then report back to me and i'll put it in place.

And why are you emailing -current about this?  It belong on -stable
or maybe -ancient (3.x blech) :-)


Index: procfs_status.c
===================================================================
RCS file: /home/ncvs/src/sys/miscfs/procfs/procfs_status.c,v
retrieving revision 1.12.2.3
diff -u -u -r1.12.2.3 procfs_status.c
--- procfs_status.c	1999/12/27 16:05:11	1.12.2.3
+++ procfs_status.c	2000/09/18 17:14:45
@@ -106,23 +106,17 @@
 	if (*sep != ',')
 		ps += sprintf(ps, "noflags");
 
-	if (p->p_flag & P_INMEM)
-		ps += sprintf(ps, " %ld,%ld",
-			p->p_stats->p_start.tv_sec,
-			p->p_stats->p_start.tv_usec);
-	else
-		ps += sprintf(ps, " -1,-1");
-
-	{
+	if (p->p_flag & P_INMEM) {
 		struct timeval ut, st;
 
-		calcru(p, &ut, &st, (void *) 0);
-		ps += sprintf(ps, " %ld,%ld %ld,%ld",
-			ut.tv_sec,
-			ut.tv_usec,
-			st.tv_sec,
-			st.tv_usec);
-	}
+		calcru(p, &ut, &st, (struct timeval *) NULL);
+		ps += sprintf(ps, " %ld,%ld %ld,%ld %ld,%ld",
+		    p->p_stats->p_start.tv_sec,
+		    p->p_stats->p_start.tv_usec,
+		    ut.tv_sec, ut.tv_usec,
+		    st.tv_sec, st.tv_usec);
+	} else
+		ps += sprintf(ps, " -1,-1 -1,-1 -1,-1");
 
 	ps += sprintf(ps, " %s",
 		(p->p_wchan && p->p_wmesg) ? p->p_wmesg : "nochan");




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000918104229.D15156>