From owner-freebsd-smp Tue Feb 11 15:03:19 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id PAA27227 for smp-outgoing; Tue, 11 Feb 1997 15:03:19 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id PAA27205 for ; Tue, 11 Feb 1997 15:02:56 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id PAA29240; Tue, 11 Feb 1997 15:56:54 -0700 From: Terry Lambert Message-Id: <199702112256.PAA29240@phaeton.artisoft.com> Subject: Re: kvm_read: bad address To: smp@csn.net (Steve Passe) Date: Tue, 11 Feb 1997 15:56:53 -0700 (MST) Cc: rg@gds.de, freebsd-smp@FreeBSD.ORG In-Reply-To: <199702112122.OAA11253@clem.systemsix.com> from "Steve Passe" at Feb 11, 97 02:22:51 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-smp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > >I am running the SMP kernel on a 3.0-970124-SNAP system and a > >Gigabyte GA586DX Dual motherboard with 2 x P5 / 200 MHz and 96 MB > >RAM. The machine runs mostly OK for several days. Only under heavy > >load it breaks down quite immadiatelly. It seems that there is a > >problem with swap. Some apps cannot be started and show the message > >kvm_read kvm_read: bad address". One of these apps is "dmesg". If you boot with a kernel other than the default kernel, the symbol table reference for "/kernel" will be wrong for most utilities. If the utility uses the path value rather than the sysctl() value for the running kernel, it will have this problem. If you boot with a kernel other than the default kernel, and the kernel header files (like proc.h) declare critical system structures to be a different size or layout than expected, then when the utility goes to read form /dev/kmem using valid symbol offsets, the relative pointer values in the returned structure will contain invalid data. Most utilities, "ps", "w", and so on, detect proc structure size changes automatically. Not all do. If you use a utility that does not detect structure size changes, then you will get these errors. You need to recompile *all* kernel structure dependent programs which link to libkvm, or which read /dev/kmem or /dev/mem directly, each tim you change which kernel you are using. For instance, if the "swap" structure changes, or the network interface structure changes, you will have to recompile "swapon" and "vmstat", or "netstat" and "ifconfig", and so on, respectively. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.