From dima@unixfreak.org  Fri Feb  2 21:01:41 2001
Return-Path: <dima@unixfreak.org>
Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138])
	by hub.freebsd.org (Postfix) with ESMTP id AE22937B491
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  2 Feb 2001 21:01:40 -0800 (PST)
Received: from hornet.unixfreak.org (hornet [63.198.170.140])
	by bazooka.unixfreak.org (Postfix) with ESMTP id 7A9933E02
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  2 Feb 2001 21:01:40 -0800 (PST)
Received: (from dima@localhost)
	by hornet.unixfreak.org (8.11.1/8.11.1) id f1351eI92415;
	Fri, 2 Feb 2001 21:01:40 -0800 (PST)
	(envelope-from dima)
Message-Id: <200102030501.f1351eI92415@hornet.unixfreak.org>
Date: Fri, 2 Feb 2001 21:01:40 -0800 (PST)
From: dima@unixfreak.org
Reply-To: dima@unixfreak.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] New FAQ entry about top(1) not working (``nlist'' errors)
X-Send-Pr-Version: 3.2

>Number:         24823
>Category:       docs
>Synopsis:       [PATCH] New FAQ entry about top(1) not working (``nlist'' errors)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 02 21:10:01 PST 2001
>Closed-Date:    Mon Feb 5 16:28:48 PST 2001
>Last-Modified:  Mon Feb 05 16:30:29 PST 2001
>Originator:     Dima Dorfman
>Release:        FreeBSD 4.2-20010102-STABLE i386
>Organization:
Private
>Environment:

Not relevant.

>Description:

If one loads the kernel directly from boot0 (not using /boot/loader),
or if one screws up an upgrade and the kernel is out of synch with the
userland, one can get weird errors from top(1) and some other programs
about certain kernel symbols not being found.  This seems to come up
on -questions every few weeks; this FAQ entry should explain the cause
and solution.

>How-To-Repeat:

Read -questions.

>Fix:

Apply the following to doc/en_US.ISO_8859-1/books/faq/book.sgml.

Index: book.sgml
===================================================================
RCS file: /st/src/FreeBSD/doc/en_US.ISO_8859-1/books/faq/book.sgml,v
retrieving revision 1.140
diff -u -r1.140 book.sgml
--- book.sgml	2001/01/18 01:14:24	1.140
+++ book.sgml	2001/01/30 01:34:16
@@ -4166,6 +4166,41 @@
 
         </answer>
       </qandaentry>
+
+      <qandaentry>
+        <question>
+          <para>I get the error <literal>nlist failed</literal> when running,
+            for example, <command>top</command> or
+            <command>systat</command>.</para>
+        </question>
+
+        <answer>
+          <para>The problem is that the application you are trying to run is
+            looking for a specific kernel symbol, but, for whatever reason,
+            cannot find it; this error stems from one of two problems:</para>
+
+          <itemizedlist>
+            <listitem>
+              <para>Your kernel and userland are not synchronized (i.e., you
+                built a new kernel but did not do an installworld, or vice
+                versa), and thus the symbol table is different from what the
+                user application thinks it is.  If this is the case, simply
+                complete the upgrade process (see
+                <filename>/usr/src/UPDATING</filename> for the correct
+                sequence).</para>
+            </listitem>
+
+            <listitem>
+              <para>You are not using <command>/boot/loader</command> to load
+                your kernel, but doing it directly from boot0 (see
+                &man.boot.8;).  While there is nothing wrong with bypassing
+                <command>/boot/loader</command>, it generally does a better
+                job of making the kernel symbols available to user
+                applications.</para>
+            </listitem>
+          </itemizedlist>
+        </answer>
+      </qandaentry>
     </qandaset>
   </chapter>



>Release-Note:
>Audit-Trail:

From: John Baldwin <jhb@FreeBSD.org>
To: dima@unixfreak.org
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: RE: docs/24823: [PATCH] New FAQ entry about top(1) not working (
Date: Fri, 02 Feb 2001 21:43:34 -0800 (PST)

 On 03-Feb-01 dima@unixfreak.org wrote:
 > 
 >>Number:         24823
 >>Category:       docs
 >>Synopsis:       [PATCH] New FAQ entry about top(1) not working (``nlist''
 >>errors)
 >>Confidential:   no
 >>Severity:       non-critical
 >>Priority:       low
 >>Responsible:    freebsd-doc
 >>State:          open
 >>Quarter:        
 >>Keywords:       
 >>Date-Required:
 >>Class:          change-request
 >>Submitter-Id:   current-users
 >>Arrival-Date:   Fri Feb 02 21:10:01 PST 2001
 >>Closed-Date:
 >>Last-Modified:
 >>Originator:     Dima Dorfman
 >>Release:        FreeBSD 4.2-20010102-STABLE i386
 >>Organization:
 > Private
 >>Environment:
 > 
 > Not relevant.
 > 
 >>Description:
 > 
 > If one loads the kernel directly from boot0 (not using /boot/loader),
 > or if one screws up an upgrade and the kernel is out of synch with the
 > userland, one can get weird errors from top(1) and some other programs
 > about certain kernel symbols not being found.  This seems to come up
 > on -questions every few weeks; this FAQ entry should explain the cause
 > and solution.
 
 s/boot0/boot2/g please.  boot0 is what you hit Fx at to choose slices, boot1 is
 a small assembly stub you never see anything from, and boot2 is what you can
 interrupt to load a kernel w/o loading the loader.
 
 -- 
 
 John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
 PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
 "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
 

From: Dima Dorfman <dima@unixfreak.org>
To: John Baldwin <jhb@FreeBSD.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: docs/24823: [PATCH] New FAQ entry about top(1) not working ( 
Date: Fri, 02 Feb 2001 21:59:41 -0800

 > On 03-Feb-01 dima@unixfreak.org wrote:
 > > If one loads the kernel directly from boot0 (not using /boot/loader),
 > > or if one screws up an upgrade and the kernel is out of synch with the
 > > userland, one can get weird errors from top(1) and some other programs
 > > about certain kernel symbols not being found.  This seems to come up
 > > on -questions every few weeks; this FAQ entry should explain the cause
 > > and solution.
 > 
 > s/boot0/boot2/g please.  boot0 is what you hit Fx at to choose
 > slices, boot1 is a small assembly stub you never see anything from,
 > and boot2 is what you can interrupt to load a kernel w/o loading the
 > loader.
 
 Thanks!  Good to see that someone more knowledgeable than me is
 actually reading this stuff!  Here's a patch against the patch (how
 convenient, eh?); or you can find the corrected version at:
 http://www.unixfreak.org/~dima/home/nlist-faq2.diff
 
 Thanks again!
 
 					Dima Dorfman
 					dima@unixfreak.org
 
 
 --- nlist-faq.diff	Mon Jan 29 17:34:27 2001
 +++ nlist-faq2.diff	Fri Feb  2 21:53:06 2001
 @@ -35,7 +35,7 @@
  +
  +            <listitem>
  +              <para>You are not using <command>/boot/loader</command> to load
 -+                your kernel, but doing it directly from boot0 (see
 ++                your kernel, but doing it directly from boot2 (see
  +                &man.boot.8;).  While there is nothing wrong with bypassing
  +                <command>/boot/loader</command>, it generally does a better
  +                job of making the kernel symbols available to user
 
State-Changed-From-To: open->closed 
State-Changed-By: nik 
State-Changed-When: Mon Feb 5 16:28:48 PST 2001 
State-Changed-Why:  
Committed, with two changes: 

1.  Use <errorname> for the error message text. 

2.  Use <maketarget> for the 'installworld' text. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24823 
>Unformatted:
