From owner-freebsd-bugs@FreeBSD.ORG Thu Jun 19 04:10:06 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B155410656FE for ; Thu, 19 Jun 2008 04:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 78F468FC18 for ; Thu, 19 Jun 2008 04:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m5J4A42k013356 for ; Thu, 19 Jun 2008 04:10:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m5J4A4Uw013354; Thu, 19 Jun 2008 04:10:04 GMT (envelope-from gnats) Date: Thu, 19 Jun 2008 04:10:04 GMT Message-Id: <200806190410.m5J4A4Uw013354@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: "Garrett Cooper" Cc: Subject: Re: bin/124724: netstat coredump on -stable X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Cooper List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2008 04:10:23 -0000 The following reply was made to PR bin/124724; it has been noted by GNATS. From: "Garrett Cooper" To: "K. Zolotukhin" Cc: freebsd-gnats-submit@freebsd.org Subject: Re: bin/124724: netstat coredump on -stable Date: Wed, 18 Jun 2008 21:03:49 -0700 > Same thing occurs on -CURRENT (backtrace): > > (gdb) bt > #0 0x280960ff in kvm_nlist () from /lib/libkvm.so.4 > #1 0x2809b25e in memstat_kvm_malloc () from /usr/lib/libmemstat.so.2 > #2 0x2809a0fa in memstat_kvm_all () from /usr/lib/libmemstat.so.2 > #3 0x08050aa8 in mbpr (kvmd=0x0, mbaddr=0) at mbuf.c:103 > #4 0x080500eb in main (argc=1, argv=0xbfbfec40) at main.c:510 After doing some reading it appears that netstat is passing in an invalid value to memstat_kvm_all, which subsequently calls memstat_kvm_malloc for mbuf.c (kvmd = NULL). Calling malloc with NULL for a pointer address of course is invalid coding. main.c:510 should probably be modified to print out an error message of some kind instead of: mbpr(NULL, 0); The maintainer (gnn@, net@?) should be assigned this bug. -Garrett