From nobody@FreeBSD.org  Fri Apr 18 02:16:10 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C001D106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 18 Apr 2008 02:16:10 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 8C9768FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 18 Apr 2008 02:16:10 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m3I2Fvw8055362
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 18 Apr 2008 02:15:57 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m3I2FvLs055361;
	Fri, 18 Apr 2008 02:15:57 GMT
	(envelope-from nobody)
Message-Id: <200804180215.m3I2FvLs055361@www.freebsd.org>
Date: Fri, 18 Apr 2008 02:15:57 GMT
From: Bruce Becker <hostmaster@gts.infra-service.ca>
To: freebsd-gnats-submit@FreeBSD.org
Subject: "rstatd: Can't get namelist. 1" - fbsd 7.0-stable (works ok in 7.0-release)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         122875
>Category:       kern
>Synopsis:       [nfs] "rstatd: Can't get namelist. 1" - fbsd 7.0-stable (works ok in 7.0-release) [regression]
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jhb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 18 02:20:00 UTC 2008
>Closed-Date:    Fri Jun 27 02:23:53 UTC 2008
>Last-Modified:  Wed Jul 23 13:00:09 UTC 2008
>Originator:     Bruce Becker
>Release:        7.0-STABLE
>Organization:
G.T.S.
>Environment:
FreeBSD wesley 7.0-STABLE FreeBSD 7.0-STABLE #0: Thu Apr 17 13:28:11 EDT 2008 root@wesley:/usr/obj/usr/src/sys/WESLEY  i386

>Description:

rpc.rstatd fails to get "cp_time" from kvm_nlist() call

this has working fine for years until the last cvsup on 2008/04/16


>How-To-Repeat:

use rpc.rstatd

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Apr 20 01:17:35 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=122875 

From: hotlips Internet admin <hostmaster@GTS.Infra-service.CA>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/122875: "rstatd: Can't get namelist. 1" - fbsd 7.0-stable
 (works ok in 7.0-release)
Date: Fri, 25 Apr 2008 20:50:51 -0400 (EDT)

 On Fri, 18 Apr 2008 FreeBSD-gnats-submit@FreeBSD.org wrote:
 
 |Thank you very much for your problem report.
 |It has the internal identification `kern/122875'.
 |The individual assigned to look at your
 |report is: freebsd-bugs. 
 |
 |You can access the state of your problem report at any time
 |via this link:
 |
 |http://www.freebsd.org/cgi/query-pr.cgi?pr=122875
 |
 |>Category:       kern
 |>Responsible:    freebsd-bugs
 |>Synopsis:       "rstatd: Can't get namelist. 1" - fbsd 7.0-stable (works ok in 7.0-release)
 |>Arrival-Date:   Fri Apr 18 02:20:00 UTC 2008
 
 
 	this also happens in FreeBSD 6.3-STABLE
 
 
 	I depend heavily on rpc.rstatd as a part of monitoring
 	servers and firewalls etc., so this is a serious issue
 	for me until I can get a fix or work-around
 
 
 Bruce Becker			+1 416 410 0879
 GTS Network Administration	Toronto, Ont.
 Email:	hostmaster@GTS.Infra-service.CA

From: hotlips Internet admin <hostmaster@GTS.Infra-service.CA>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/122875: "rstatd: Can't get namelist. 1" - fbsd 7.0-stable
 (works ok in 7.0-release)
Date: Fri, 25 Apr 2008 20:50:51 -0400 (EDT)

 On Fri, 18 Apr 2008 FreeBSD-gnats-submit@FreeBSD.org wrote:
 
 |Thank you very much for your problem report.
 |It has the internal identification `kern/122875'.
 |The individual assigned to look at your
 |report is: freebsd-bugs. 
 |
 |You can access the state of your problem report at any time
 |via this link:
 |
 |http://www.freebsd.org/cgi/query-pr.cgi?pr=122875
 |
 |>Category:       kern
 |>Responsible:    freebsd-bugs
 |>Synopsis:       "rstatd: Can't get namelist. 1" - fbsd 7.0-stable (works ok in 7.0-release)
 |>Arrival-Date:   Fri Apr 18 02:20:00 UTC 2008
 
 
 	this also happens in FreeBSD 6.3-STABLE
 
 
 	I depend heavily on rpc.rstatd as a part of monitoring
 	servers and firewalls etc., so this is a serious issue
 	for me until I can get a fix or work-around
 
 
 Bruce Becker			+1 416 410 0879
 GTS Network Administration	Toronto, Ont.
 Email:	hostmaster@GTS.Infra-service.CA

From: hotlips Internet admin <hostmaster@GTS.Infra-service.CA>
To: Kris Kennaway <kris@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/122875: "rstatd: Can't get namelist. 1" - fbsd 7.0-stable
 (works ok in 7.0-release)
Date: Wed, 30 Apr 2008 14:32:56 -0400 (EDT)

 On Mon, 28 Apr 2008, Kris Kennaway wrote:
 |hotlips Internet admin wrote:
 |> The following reply was made to PR kern/122875; it has been noted by GNATS.
 |> 
 |> From: hotlips Internet admin <hostmaster@GTS.Infra-service.CA>
 |> To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
 |> Cc: bug-followup@FreeBSD.org
 |> Subject: Re: kern/122875: "rstatd: Can't get namelist. 1" - fbsd 7.0-stable
 |>  (works ok in 7.0-release)
 |> Date: Fri, 25 Apr 2008 20:50:51 -0400 (EDT)
 |> 
 |>  On Fri, 18 Apr 2008 FreeBSD-gnats-submit@FreeBSD.org wrote:
 |>   |Thank you very much for your problem report.
 |>  |It has the internal identification `kern/122875'.
 |>  |The individual assigned to look at your
 |>  |report is: freebsd-bugs.  |
 |>  |You can access the state of your problem report at any time
 |>  |via this link:
 |>  |
 |>  |http://www.freebsd.org/cgi/query-pr.cgi?pr=122875
 |>  |
 |>  |>Category:       kern
 |>  |>Responsible:    freebsd-bugs
 |>  |>Synopsis:       "rstatd: Can't get namelist. 1" - fbsd 7.0-stable (works
 |> ok in 7.0-release)
 |>  |>Arrival-Date:   Fri Apr 18 02:20:00 UTC 2008
 |>    	this also happens in FreeBSD 6.3-STABLE
 |>    	I depend heavily on rpc.rstatd as a part of monitoring
 |>  	servers and firewalls etc., so this is a serious issue
 |>  	for me until I can get a fix or work-around
 |
 |Revert the recent commits by Peter until a fix is applied.
 
 
 	I'm not sure if this is something i should do locally,
 	or whether those commites are being reverted in the
 	FBSD source tree
 
 
 	if it's someting to do locally, I would need to know
 	what to do in detail ...
 
 
 	this also seems related to PR ports/123146 btw ...
 
 
 Thanks,
 Bruce Becker			+1 416 410 0879
 GTS Network Administration	Toronto, Ont.
 Email:	hostmaster@GTS.Infra-service.CA

From: Kris Kennaway <kris@FreeBSD.org>
To: hotlips Internet admin <hostmaster@GTS.Infra-service.CA>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/122875: "rstatd: Can't get namelist. 1" - fbsd 7.0-stable
 (works ok in 7.0-release)
Date: Thu, 01 May 2008 10:22:39 +0200

 hotlips Internet admin wrote:
 > On Mon, 28 Apr 2008, Kris Kennaway wrote:
 > |hotlips Internet admin wrote:
 > |> The following reply was made to PR kern/122875; it has been noted by GNATS.
 > |> 
 > |> From: hotlips Internet admin <hostmaster@GTS.Infra-service.CA>
 > |> To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
 > |> Cc: bug-followup@FreeBSD.org
 > |> Subject: Re: kern/122875: "rstatd: Can't get namelist. 1" - fbsd 7.0-stable
 > |>  (works ok in 7.0-release)
 > |> Date: Fri, 25 Apr 2008 20:50:51 -0400 (EDT)
 > |> 
 > |>  On Fri, 18 Apr 2008 FreeBSD-gnats-submit@FreeBSD.org wrote:
 > |>   |Thank you very much for your problem report.
 > |>  |It has the internal identification `kern/122875'.
 > |>  |The individual assigned to look at your
 > |>  |report is: freebsd-bugs.  |
 > |>  |You can access the state of your problem report at any time
 > |>  |via this link:
 > |>  |
 > |>  |http://www.freebsd.org/cgi/query-pr.cgi?pr=122875
 > |>  |
 > |>  |>Category:       kern
 > |>  |>Responsible:    freebsd-bugs
 > |>  |>Synopsis:       "rstatd: Can't get namelist. 1" - fbsd 7.0-stable (works
 > |> ok in 7.0-release)
 > |>  |>Arrival-Date:   Fri Apr 18 02:20:00 UTC 2008
 > |>    	this also happens in FreeBSD 6.3-STABLE
 > |>    	I depend heavily on rpc.rstatd as a part of monitoring
 > |>  	servers and firewalls etc., so this is a serious issue
 > |>  	for me until I can get a fix or work-around
 > |
 > |Revert the recent commits by Peter until a fix is applied.
 > 
 > 
 > 	I'm not sure if this is something i should do locally,
 > 	or whether those commites are being reverted in the
 > 	FBSD source tree
 > 
 > 
 > 	if it's someting to do locally, I would need to know
 > 	what to do in detail ...
 > 
 > 
 > 	this also seems related to PR ports/123146 btw ...
 
 The easiest thing for you to do will be to revert to an older 6.3-STABLE 
 (or 6.3-RELEASE) until it is resolved in CVS.
 
 Kris
 
State-Changed-From-To: open->patched 
State-Changed-By: jhb 
State-Changed-When: Tue Jun 10 18:47:56 UTC 2008 
State-Changed-Why:  
Fix committed to HEAD. 


Responsible-Changed-From-To: freebsd-net->jhb 
Responsible-Changed-By: jhb 
Responsible-Changed-When: Tue Jun 10 18:47:56 UTC 2008 
Responsible-Changed-Why:  
Fix committed to HEAD. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=122875 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/122875: commit references a PR
Date: Tue, 10 Jun 2008 18:48:08 +0000 (UTC)

 jhb         2008-06-10 18:47:43 UTC
 
   FreeBSD src repository
 
   Modified files:
     libexec/rpc.rstatd   Makefile rstat_proc.c 
   Log:
   SVN rev 179710 on 2008-06-10 18:47:43Z by jhb
   
   Use sysctl to fetch stats from the kernel instead of reading variables
   directly via libkvm.
   
   PR:             kern/122875, bin/123014
   Tested by:      Danny Braniss  danny cs.huji.ac.il
   MFC after:      1 week
   
   Revision  Changes    Path
   1.9       +2 -2      src/libexec/rpc.rstatd/Makefile
   1.26      +17 -46    src/libexec/rpc.rstatd/rstat_proc.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: jhb 
State-Changed-When: Fri Jun 27 02:23:11 UTC 2008 
State-Changed-Why:  
Fix applied to RELENG_[67]. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=122875 

From: hotlips Internet admin <hostmaster@GTS.Infra-service.CA>
To: jhb@FreeBSD.org
Cc: bug-followup@FreeBSD.org, danny@cs.huji.ac.il
Subject: Re: kern/122875: [nfs] "rstatd: Can't get namelist. 1" - fbsd
 7.0-stable (works ok in 7.0-release) [regression]
Date: Fri, 27 Jun 2008 12:45:28 -0400 (EDT)

 On Fri, 27 Jun 2008 jhb@FreeBSD.org wrote:
 
 |Synopsis: [nfs] "rstatd: Can't get namelist. 1" - fbsd 7.0-stable (works ok in 7.0-release) [regression]
 |
 |State-Changed-From-To: patched->closed
 |State-Changed-By: jhb
 |State-Changed-When: Fri Jun 27 02:23:11 UTC 2008
 |State-Changed-Why: 
 |Fix applied to RELENG_[67].
 |
 |http://www.freebsd.org/cgi/query-pr.cgi?pr=122875
 
 
 	this is not the correct fix, although it "works"
 
 
 	the problem is the broken API, which has been fixed in
 	RELENG_^, but not RELENG_& for some reason.  Other tools
 	& ports are also affected by the broken API such as
 	net-snmp & vmstat.
 
 
 	I will be submitting a fix to RELENG_7 which mirrors
 	that for RELENG_6, to /sys/kern/kern_clock.c, in order
 	to make "cp_time" global again.
 
 
 	Please also note that this breaks an outstanding patch
 	to rpc.rstatd, kern/92412 .  without this patch, rpc.rstatd
 	is basically unusable.
 
 
 Bruce Becker			+1 416 410 0879
 GTS Network Administration	Toronto, Ont.
 Email:	hostmaster@GTS.Infra-service.CA

From: hotlips Internet admin <hostmaster@GTS.Infra-service.CA>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/122875: [nfs] "rstatd: Can't get namelist. 1" - fbsd
 7.0-stable (works ok in 7.0-release) [regression]
Date: Wed, 23 Jul 2008 08:57:37 -0400 (EDT)

 Recently kern/122875 bug report provoked a change to libexec/rpc.rstatd
 (rather than a still-needed fix to sys/kern/kern_clock.c for RELENG_7 & HEAD) -
 
 Below is an updated patch to re-establish the required fixes
 so that it works properly...
 
 
 Bruce Becker			+1 416 410 0879
 GTS Network Administration	Toronto, Ont.
 Email:	hostmaster@GTS.Infra-service.CA
 
  --------- 8< --------- 8< --------- 8< --------- 8< --------- 8< ---------
 
 --- rstat_proc.c.2008062600	2008-06-26 22:20:37.000000000 -0400
 +++ rstat_proc.c.2008070600	2008-07-06 15:36:25.000000000 -0400
 @@ -125,6 +125,7 @@
      if (! stat_is_init)
          stat_init();
      sincelastreq = 0;
 +    stats_all.s2.if_opackets = stats_all.s3.if_opackets;
      return(&stats_all.s2);
  }
 
 @@ -134,6 +135,7 @@
      if (! stat_is_init)
          stat_init();
      sincelastreq = 0;
 +    stats_all.s1.if_opackets = stats_all.s3.if_opackets;
      return(&stats_all.s1);
  }
 
 @@ -205,13 +207,13 @@
  		exit(1);
  	}
  	for(i = 0; i < RSTAT_CPUSTATES ; i++)
 -		stats_all.s1.cp_time[i] = bsd_cp_time[cp_time_xlat[i]];
 +		stats_all.s3.cp_time[i] = bsd_cp_time[cp_time_xlat[i]];
 
          (void)getloadavg(avrun, sizeof(avrun) / sizeof(avrun[0]));
 
 -	stats_all.s2.avenrun[0] = avrun[0] * FSCALE;
 -	stats_all.s2.avenrun[1] = avrun[1] * FSCALE;
 -	stats_all.s2.avenrun[2] = avrun[2] * FSCALE;
 +	stats_all.s3.avenrun[0] = avrun[0] * FSCALE;
 +	stats_all.s3.avenrun[1] = avrun[1] * FSCALE;
 +	stats_all.s3.avenrun[2] = avrun[2] * FSCALE;
 
  	mib[0] = CTL_KERN;
  	mib[1] = KERN_BOOTTIME;
 @@ -221,13 +223,13 @@
  		exit(1);
  	}
 
 -	stats_all.s2.boottime.tv_sec = btm.tv_sec;
 -	stats_all.s2.boottime.tv_usec = btm.tv_usec;
 +	stats_all.s3.boottime.tv_sec = btm.tv_sec;
 +	stats_all.s3.boottime.tv_usec = btm.tv_usec;
 
 
  #ifdef DEBUG
 -	fprintf(stderr, "%d %d %d %d\n", stats_all.s1.cp_time[0],
 -	    stats_all.s1.cp_time[1], stats_all.s1.cp_time[2],
 stats_all.s1.cp_time[3]);
 +	fprintf(stderr, "%d %d %d %d\n", stats_all.s3.cp_time[0],
 +	    stats_all.s3.cp_time[1], stats_all.s3.cp_time[2],
 stats_all.s3.cp_time[3]);
  #endif
 
  #define	FETCH_CNT(stat, cnt) do {
 \
 @@ -238,12 +240,12 @@
  	}								\
  } while (0)
 
 -	FETCH_CNT(stats_all.s1.v_pgpgin, vm.v_vnodepgsin);
 -	FETCH_CNT(stats_all.s1.v_pgpgout, vm.v_vnodepgsout);
 -	FETCH_CNT(stats_all.s1.v_pswpin, vm.v_swappgsin);
 -	FETCH_CNT(stats_all.s1.v_pswpout, vm.v_swappgsout);
 -	FETCH_CNT(stats_all.s1.v_intr, sys.v_intr);
 -	FETCH_CNT(stats_all.s2.v_swtch, sys.v_swtch);
 +	FETCH_CNT(stats_all.s3.v_pgpgin, vm.v_vnodepgsin);
 +	FETCH_CNT(stats_all.s3.v_pgpgout, vm.v_vnodepgsout);
 +	FETCH_CNT(stats_all.s3.v_pswpin, vm.v_swappgsin);
 +	FETCH_CNT(stats_all.s3.v_pswpout, vm.v_swappgsout);
 +	FETCH_CNT(stats_all.s3.v_intr, sys.v_intr);
 +	FETCH_CNT(stats_all.s3.v_swtch, sys.v_swtch);
  	gettimeofday(&tm, (struct timezone *) 0);
  	stats_all.s1.v_intr -= hz*(tm.tv_sec - btm.tv_sec) +
  	    hz*(tm.tv_usec - btm.tv_usec)/1000000;
 @@ -262,11 +264,11 @@
  		exit(1);
  	}
 
 -	stats_all.s1.if_ipackets = 0;
 -	stats_all.s1.if_opackets = 0;
 -	stats_all.s1.if_ierrors = 0;
 -	stats_all.s1.if_oerrors = 0;
 -	stats_all.s1.if_collisions = 0;
 +	stats_all.s3.if_ipackets = 0;
 +	stats_all.s3.if_opackets = 0;
 +	stats_all.s3.if_ierrors = 0;
 +	stats_all.s3.if_oerrors = 0;
 +	stats_all.s3.if_collisions = 0;
  	for (i = 1; i <= ifcount; i++) {
  		len = sizeof ifmd;
  		mib[3] = IFMIB_IFDATA;
 @@ -281,11 +283,11 @@
  			exit(1);
  		}
 
 -		stats_all.s1.if_ipackets += ifmd.ifmd_data.ifi_ipackets;
 -		stats_all.s1.if_opackets += ifmd.ifmd_data.ifi_opackets;
 -		stats_all.s1.if_ierrors += ifmd.ifmd_data.ifi_ierrors;
 -		stats_all.s1.if_oerrors += ifmd.ifmd_data.ifi_oerrors;
 -		stats_all.s1.if_collisions += ifmd.ifmd_data.ifi_collisions;
 +		stats_all.s3.if_ipackets += ifmd.ifmd_data.ifi_ipackets;
 +		stats_all.s3.if_opackets += ifmd.ifmd_data.ifi_opackets;
 +		stats_all.s3.if_ierrors += ifmd.ifmd_data.ifi_ierrors;
 +		stats_all.s3.if_oerrors += ifmd.ifmd_data.ifi_oerrors;
 +		stats_all.s3.if_collisions += ifmd.ifmd_data.ifi_collisions;
  	}
  	gettimeofday((struct timeval *)&stats_all.s3.curtime,
  		(struct timezone *) 0);
 
>Unformatted:
