From owner-freebsd-net@FreeBSD.ORG Mon Jul 16 21:40:08 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A868106566B for ; Mon, 16 Jul 2012 21:40:08 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id C5EB68FC0A for ; Mon, 16 Jul 2012 21:40:07 +0000 (UTC) Received: by lbon10 with SMTP id n10so10024623lbo.13 for ; Mon, 16 Jul 2012 14:40:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=Hh0RWTB5ERfY8sOpjT5+ZiU86PoJF4RCz6Q7Nsew2ww=; b=hW0KS9LtZ2Aftjs5gYR+Jw8QyiZOAHZNtFksNW/8MboEQI+BhqxNsclMfxlPKTDNNB SglqKnp68QKEqeX5saMO/adHVexB9WwKvErlLx9oqkpz7w+G87EB97SlQjVodQs52Lry VSbvfyP6KxmSiGajFE65aIQ79I++BWlwNrFQh7ZDKzLqOuvog3XmLXaSaJHc/fs3gjl6 MSckw6zdS7Fynw4y2GzeF9r/A6438rAVZKtlSOfPlWzVIobVfbfdyrfXNtR6FZONi1BQ lvzSg2MVcNWDHSJzyoSEC1Is9xue499R5Shi+jGCWWK1DcBI287nvpQL5EoBarrz8WXP FmVg== Received: by 10.152.105.173 with SMTP id gn13mr3821926lab.20.1342474806773; Mon, 16 Jul 2012 14:40:06 -0700 (PDT) Received: from zont-osx.local (ppp95-165-138-37.pppoe.spdop.ru. [95.165.138.37]) by mx.google.com with ESMTPS id er3sm3731032lbb.16.2012.07.16.14.40.05 (version=SSLv3 cipher=OTHER); Mon, 16 Jul 2012 14:40:06 -0700 (PDT) Message-ID: <50048A34.10304@zonov.org> Date: Tue, 17 Jul 2012 01:40:04 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: "freebsd-net@freebsd.org" References: <5003EDC4.3050100@zonov.org> In-Reply-To: <5003EDC4.3050100@zonov.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmJKYZktsI1eEjbKl/nMzoTTbn6dafm6vGavFianQUdPbnBsiW7XKX0D3Paxcq2vQIlhErW Subject: Re: panic: negative refcount 0xfffffe0007f1b4d4 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2012 21:40:08 -0000 On 7/16/12 2:32 PM, Andrey Zonov wrote: > Hi, > > I've got about 30 machines which panic sometimes in different places but > with the same panic message: "negative refcount 0xfffffe0007f1b4d4". > They are running under 9.0-STABLE@r234600M. > [snip] > > Is this known issue? If it is not, I've got textdumps and can send to > anyone who wants to help me. > > Thanks in advance. > So, this is the one more ifa leak. # kgdb define print_ip set $_cp = (unsigned char *)$arg0 printf "%d.%d.%d.%d", $_cp[0], $_cp[1], $_cp[2], $_cp[3] end define print_sin set $_ip = &((struct sockaddr_in *)$arg0)->sin_addr print_ip $_ip end define refcnt set $ifp = ((struct ifnethead *) (vnet0->vnet_data_base + (long)&vnet_entry_ifnet)).tqh_first while ($ifp != 0) set $ifa = $ifp->if_addrhead.tqh_first while ($ifa != 0) if ($ifa->ifa_addr->sa_family == 2) printf "%s: inet", $ifp->if_xname print_sin $ifa->ifa_addr printf "\tcnt: %u \n", $ifa->ifa_refcnt end set $ifa = $ifa->ifa_link.tqe_next end set $ifp = $ifp->if_link.tqe_next end end (kgdb) refcnt em0: inet 77.88.6.34 cnt: 2746302764 lo0: inet 127.0.0.1 cnt: 28 (kgdb) refcnt em0: inet 77.88.6.34 cnt: 2746321183 lo0: inet 127.0.0.1 cnt: 28 (kgdb) refcnt em0: inet 77.88.6.34 cnt: 2746539500 lo0: inet 127.0.0.1 cnt: 28 Is there a method to detect such leaks? -- Andrey Zonov