Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jul 2012 01:40:04 +0400
From:      Andrey Zonov <andrey@zonov.org>
To:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Re: panic: negative refcount 0xfffffe0007f1b4d4
Message-ID:  <50048A34.10304@zonov.org>
In-Reply-To: <5003EDC4.3050100@zonov.org>
References:  <5003EDC4.3050100@zonov.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50048A34.10304>