Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Feb 1997 15:56:53 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        smp@csn.net (Steve Passe)
Cc:        rg@gds.de, freebsd-smp@FreeBSD.ORG
Subject:   Re: kvm_read: bad address
Message-ID:  <199702112256.PAA29240@phaeton.artisoft.com>
In-Reply-To: <199702112122.OAA11253@clem.systemsix.com> from "Steve Passe" at Feb 11, 97 02:22:51 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> >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.



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