From owner-freebsd-bugs@FreeBSD.ORG Fri Aug 28 22:19:38 2009 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 072691065672 for ; Fri, 28 Aug 2009 22:19:38 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [66.246.138.153]) by mx1.freebsd.org (Postfix) with ESMTP id D3B1A8FC27 for ; Fri, 28 Aug 2009 22:19:37 +0000 (UTC) Received: from gluon.draftnet (87-194-158-129.bethere.co.uk [87.194.158.129]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id 223E4851A; Fri, 28 Aug 2009 22:01:22 +0000 (UTC) Date: Fri, 28 Aug 2009 23:01:08 +0100 From: Bruce Cran To: Chris St Denis Message-ID: <20090828230108.2ac0145b@gluon.draftnet> In-Reply-To: <200908281810.n7SIA6Oq066948@freefall.freebsd.org> References: <200908281810.n7SIA6Oq066948@freefall.freebsd.org> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.4; i386-portbld-freebsd7.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/130343: top(1): kvm_open: cannot open /proc/42997/mem corrupts screen output X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2009 22:19:38 -0000 It looks the "-a" option is triggering the fault. kvm_getargv (in lib/libkvm/kvm_proc.c) attempts to read the argv array using sysctl; if that fails then it calls kvm_doargv which attempts to read the array from the process' memory (via kvm_uread) by opening /proc/%d/mem (kvm_proc.c line 997). -- Bruce Cran