From: Kirill Yukhin <kyukhin@tarantool.org>
To: Alexander Turenko <alexander.turenko@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] test: stabilize flaky fiber memory leak detection
Date: Thu, 27 Feb 2020 23:22:29 +0300 [thread overview]
Message-ID: <20200227202229.hnz7w6c6hbqgf72z@tarantool.org> (raw)
In-Reply-To: <ad31974a5490dabd1bb1fb6de51f9c8bc54b52dd.1580304896.git.alexander.turenko@tarantool.org>
Hello,
On 29 янв 20:03, Alexander Turenko wrote:
> After #4736 regression fix (in fact it just reverts the new logic in
> small) it is possible again that a fiber's region may hold a memory for
> a while, but release it eventually. When the used memory exceeds 128 KiB
> threshold, fiber_gc() puts 'garbage' slabs back to slab_cache and
> subtracts them from region_used() metric. But until this point those
> slabs are accounted in region_used() and so in fiber.info() metrics.
>
> This commit fixes flakiness of test cases of the following kind:
>
> | fiber.info()[fiber.self().id()].memory.used -- should be zero
> | <...workload...>
> | fiber.info()[fiber.self().id()].memory.used -- should be zero
>
> The problem is that the first `<...>.memory.used` value may be non-zero.
> It depends of previous tests that were executed on this tarantool
> instance. It is resolved by restarting of a tarantool instance before
> such test cases to ensure that there are no 'garbage' slabs in a current
> fiber's region.
>
> Note: This works only if a test case reserves only one slab at the
> moment: otherwise some memory may be hold after the case (and so a
> memory check after a workload will fail). However it seems that our
> cases are small enough to don't trigger this situation.
>
> Call of region_free() would be enough, but we have no Lua API for it.
>
> Fixes #4750.
I've checked your patch into 2.2, 2.3 and master as temporary
workaround.
--
Regards, Kirill Yukhin
next prev parent reply other threads:[~2020-02-27 20:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-29 17:03 Alexander Turenko
2020-01-29 18:46 ` Nikita Pettik
2020-01-29 20:27 ` Alexander Turenko
2020-02-05 15:36 ` Nikita Pettik
2020-02-27 20:22 ` Kirill Yukhin [this message]
2020-02-27 22:58 ` Nikita Pettik
2020-02-27 23:07 ` 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=20200227202229.hnz7w6c6hbqgf72z@tarantool.org \
--to=kyukhin@tarantool.org \
--cc=alexander.turenko@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] test: stabilize flaky fiber memory leak detection' \
/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