From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Imeev Mergen <imeevma@tarantool.org>,
Kirill Yukhin <kyukhin@tarantool.org>
Cc: tarantool-patches@freelists.org, tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v1 1/1] netbox: fix memleak in lbox_tuple_format_new()
Date: Sat, 2 Nov 2019 17:26:49 +0100 [thread overview]
Message-ID: <4be44137-f646-ed77-d3aa-494cb887dcf3@tarantool.org> (raw)
In-Reply-To: <05dc9a5b-f3c8-37f9-3dd7-63cfc966bf11@tarantool.org>
Hi! Thanks for the fix!
LGTM.
On 31/10/2019 17:43, Imeev Mergen wrote:
>
> On 10/31/19 6:23 PM, Konstantin Osipov wrote:
>> * imeevma@tarantool.org <imeevma@tarantool.org> [19/10/30 14:03]:
>>> Memleak appeared due to the fact that when creating a dictionary
>>> its reference count is 1 from the beginning. Later, when the
>>> dictionary is used to create tuple_format, its reference counter
>>> increased by 1 and it became equal to 2. After removing
>>> tuple_format, the reference counter for dict decreased by one, so
>>> it became equal to 1. Since ref counter is not equal to 0, dict
>>> not deleted, causing a memory leak.
>>>
>>> Closes #4588
>> I wonder if you could come up with a test case? Is memory used by
>> dict accounted in any stats?
>>
> I did not find anything in box, and I did not see anything about
> the statistics in the tuple_dictionary_new() function. Doesn't
> look like we accounting this. At the moment, I can’t come up with
> a test.
>
> You think we should add this in stats?
>
There is no accounting for the heap memory. We tried to add it via
symbol replacement, but it didn't work properly. I think we can
omit a test here.
next prev parent reply other threads:[~2019-11-02 16:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 10:58 imeevma
2019-10-30 22:13 ` Vladislav Shpilevoy
2019-10-31 9:33 ` [Tarantool-patches] [tarantool-patches] " Mergen Imeev
2019-10-31 15:23 ` [Tarantool-patches] " Konstantin Osipov
2019-10-31 16:43 ` Imeev Mergen
2019-11-02 16:26 ` Vladislav Shpilevoy [this message]
2019-11-05 10:38 ` [Tarantool-patches] [tarantool-patches] " Kirill Yukhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4be44137-f646-ed77-d3aa-494cb887dcf3@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=imeevma@tarantool.org \
--cc=kyukhin@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [Tarantool-patches] [PATCH v1 1/1] netbox: fix memleak in lbox_tuple_format_new()' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox