[prev in list] [next in list] [prev in thread] [next in thread]
List: opensolaris-code
Subject: Re: [osol-code] [on-discuss] rev 8941 and memory leaks
From: Piotr Jasiukajtis <estseg () gmail ! com>
Date: 2009-03-15 12:37:49
Message-ID: 83c964400903150537w3093625cw136f7c60d159ef0 () mail ! gmail ! com
[Download RAW message or body]
Hello,
FYI, It seems the BUG is fixed by commit 9041:
6813215 cred reference leak in tsol_get_packet_label
At least on my laptop :)
On Wed, Mar 4, 2009 at 9:09 PM, Piotr Jasiukajtis <estseg@gmail.com> wrote:
> On Wed, Mar 4, 2009 at 8:55 PM, Bill Sommerfeld <sommerfeld@sun.com> wrote:
>>
>> On Wed, 2009-03-04 at 20:23 +0100, Piotr Jasiukajtis wrote:
>>> > ffffff0192255bf8::bufctl
>>> ADDR BUFADDR TIMESTAMP THREAD CALLER
>>> ffffff0192255bf8 ffffff0191535ea8 13a7ce2ccd ffffff0007c07c60 labelalloc+0x2f
>>> > ffffff0192255bf8::bufctl -v
>>> ADDR BUFADDR TIMESTAMP THREAD
>>> CACHE LASTLOG CONTENTS
>>> ffffff0192255bf8 ffffff0191535ea8 13a7ce2ccd ffffff0007c07c60
>>> ffffff019131fb20 ffffff0188af8440 0
>>> kmem_cache_alloc_debug+0x288
>>> kmem_cache_alloc+0x166
>>> labelalloc+0x2f
>>> newcred_from_bslabel+0x23
>>> tsol_get_pkt_label+0x42a
>>> ip_input+0x51b
>>> mac_rx_soft_ring_drain+0xf6
>>> mac_soft_ring_worker+0x140
>>> thread_start+8
>>
>> I think I see what the problem is -- my project's testing uncovered the
>> same leak.
>>
>> tsol_get_pkt_label constructs a new cred using "newcred_from_bslabel",
>> and creates it with a refcount of 1.
>>
>> it then gets passed to mblk_setcred(), which does a crhold on it,
>> setting the refcount to 2.
>>
>> tsol_get_pkt_label never drops the original reference, so that when the
>> dblk is freed, the cred refcount drops back to 1, and the cred is leaked
>> and never freed.
>>
>> it looks like this bug may have been introduced in this recent
>> changeset:
>>
>> changeset: 8778:b4169d2ab299
>> user: Erik Nordmark <Erik.Nordmark@Sun.COM>
>> date: Thu Feb 12 08:42:06 2009 -0800
>>
>> PSARC 2007/670 db_credp update
>> 6619593 Simplify and strengthen db_credp handling
>> 6619596 Add getpeerucred() support to SCTP SOCK_STREAM
>>
>> I'll file a bug.
> Could you add my email address to the bug report?
>
> Thanks.
>
>
> --
> Regards,
> Piotr Jasiukajtis | estibi | SCA OS0072
> http://estseg.blogspot.com
>
--
Regards,
Piotr Jasiukajtis | estibi | SCA OS0072
http://estseg.blogspot.com
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic