From owner-freebsd-hackers Mon May 17 22:33: 1 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from alive.znep.com (sense-sea-MegaSub-1-222.oz.net [216.39.144.222]) by hub.freebsd.org (Postfix) with ESMTP id 67BD214E46 for ; Mon, 17 May 1999 22:32:51 -0700 (PDT) (envelope-from marcs@znep.com) Received: from localhost (marcs@localhost) by alive.znep.com (8.9.1/8.9.1) with ESMTP id WAA21979 for ; Mon, 17 May 1999 22:37:23 -0700 (PDT) (envelope-from marcs@znep.com) Date: Mon, 17 May 1999 22:37:23 -0700 (PDT) From: Marc Slemko To: hackers@freebsd.org Subject: libkvm sucks Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The premise: libkvm is fatally flawed by design, and fixing it is not an easy proposition. The reasoning: reading from kernel data structures without any locking has obvious race conditions. This is why any identd that uses libkvm sucks and gets into loops all the time, etc. This is why netstat will often bail out in the middle with kvm errors on a busy machine with lots of TCP connections, especially if you slow it down by doing hostname lookups. In fact, on BSDI systems I have even seen identd hang the entire machine hard by reading from the wrong address that the IO APIC is mapped at (BSDI maps it starting at 0xffff0000, which much worse than a random address for accidental reads). In general, I'm no fan of the Linux style proc (by "Linux style" I mean going crazy with the types of info there and the huge amount of formatting done in the kernel), but in this case it can work a whole lot better, even if it is somewhat less efficient. I'm sure this isn't a new problem, but I don't recall hearing of any suggested solutions and I'm not aware of any alternative interface to get the same info on FreeBSD. Anyone? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message