----- Original Message -----
From: "Geoffrey T. Falk" <gtf@cirp.org>
To: <freebsd-stable@freebsd.org>
Cc: <tegge@freebsd.org>
Sent: Tuesday, June 24, 2003 9:51 AM
Subject: lsof builds but doesn't run under 4-STABLE
> Hi,
>
> I noticed this today. If I build lsof on my 4-STABLE box, then it
> doesn't run:
>
> boojum# lsof
> lsof: PID 0, no file * space
>
> If I build the lsof binary under 4.8-STABLE, then it runs fine under
> 4.8-STABLE and 4-STABLE.
>
> Upon investigation it appears that the variable fd in the file dproc.c
> is being used uninitialized in gather_proc_info(). The problem seems to
> be related to some changes to struct filedesc
> (/usr/include/sys/filedesc.c) from some recent commits to the RELENG_4
> branch on /usr/src/sys/sys/filedesc.c... Anyone care to investigate
> further?
Kernel structures tend to change from time to time on the RELENG_4 branch,
and because lsof is built against your current /usr/src/sys, it is most
likely using different structures than your running kernel.
To fix:
1) Reboot with a kernel built from the same sources that lsof was built
against.
2) CVSup your src to the same date your running kernel was built, then
recompile lsof.
Regards,
-Andy