Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jan 2002 13:00:58 -0500
From:      Norwin Malmberg <malmberg@usmd.edu>
To:        FreeBSD Stable <freebsd-stable@freebsd.org>
Subject:   vmstat broken in 4.5-PRERELEASE (and possibly RC1)
Message-ID:  <3C3DD6DA.76E3096A@usmd.edu>

next in thread | raw e-mail | index | archive | help
I did a CVSUP at ~7:00 PM EST (UTC-5:00) last night (09/01/2002), and 
then did buildworld/buildkernel.  When I used this to update a machine 
this morning, I find that vmstat has quit working:

% vmstat 5
vmstat: undefined symbols:
 _kmemstatistics _bucket _zlist

% uname -a
FreeBSD news.ums.edu 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #0: 
Wed Jan  9 18:04:43 EST 2002 malmberg@cvsup.usmh.usmd.edu:/usr/src/sys/compile/NEWS  i386

I spent a while trying to figure out what library was missing, until 
I looked the source for vmstat -- the symbols are missing from the 
kernel symbol table.  I believe the problem relates to making kernel 
global variables static where possible -- these three need to be 
available outside the kernel.

I'm doing a new build with the changes below to see if they fix the 
problem.

In /usr/src/sys/vm:

--- vm_zone.c.orig      Thu Jan 10 11:43:56 2002
+++ vm_zone.c   Thu Jan 10 11:46:25 2002
@@ -102,7 +102,7 @@
  * zalloci, zfreei, are the interrupt/lock safe allocation/free routines.
  */

-static struct vm_zone *zlist;
+struct vm_zone *zlist;  /* Used by vmstat */
 static int sysctl_vm_zone(SYSCTL_HANDLER_ARGS);
 static int zone_kmem_pages, zone_kern_pages, zone_kmem_kvaspace;

In /usr/src/sys/kern:

--- kern_malloc.c.orig  Thu Jan 10 11:45:08 2002
+++ kern_malloc.c       Thu Jan 10 11:46:06 2002
@@ -67,8 +67,8 @@

 static MALLOC_DEFINE(M_FREE, "free", "should be on free list");

-static struct malloc_type *kmemstatistics;
-static struct kmembuckets bucket[MINBUCKET + 16];
+struct malloc_type *kmemstatistics;  /* Used by vmstat */
+struct kmembuckets bucket[MINBUCKET + 16];  /* Used by vmstat */
 static struct kmemusage *kmemusage;
 static char *kmembase;
 static char *kmemlimit;

Norwin Malmberg
Technical Support
University System of Maryland
malmberg@usmd.edu
+1-301-445-2758

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?3C3DD6DA.76E3096A>