Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Alexander Turenko <alexander.turenko@tarantool.org>,
	tml <tarantool-patches@freelists.org>
Subject: Re: [PATCH v2] box/memtx: Allow to skip tuple memory from coredump
Date: Wed, 15 May 2019 15:45:58 +0300	[thread overview]
Message-ID: <20190515124558.7k6advlhcrr5r4dt@esperanza> (raw)
In-Reply-To: <20190513222053.GF2544@uranus.lan>

On Tue, May 14, 2019 at 01:20:53AM +0300, Cyrill Gorcunov wrote:
> In case if there are huge amount of tuples the whole
> memory goes to coredump file even if we don't need it
> for problem investigation. In result coredump may
> blow up to gigabytes in size.
> 
> Lets allow to exclude this memory from dumping via
> box.cfg::strip_core boolean parameter.
> 
> Note that the tuple's arena is used not only for tuples
> themselves but for memtx->index_extent_pool and
> memtx->iterator_pool as well, so they are affected
> too.
> 
> Fixes #3509
> 
> @TarantoolBot document
> Title: Document box.cfg.strip_core
> 
> When Tarantool runs under a heavy load the memory allocated
> for tuples may be very huge in size and to eliminate this
> memory from being present in `coredump` file the `box.cfg.strip_core`
> parameter should be set to `true`.
> 
> The default value is `false`.
> ---
> v2:
>  - Use strip_core name for box parameter
>  - Pass cfg_geti directly to functions
>  - vy_mem_env_create for now left as it was,
>    simply because we can't use cfg_geti there
>    (linking with library fails), I think we can
>    address it on top later

Please patch all places to use the new API. This better be done in a
separate patch. Call it "Update small submodule". Then I will squash
submodule sha update in it once we are done.

I checked - it turns out that SLAB_DONTDUMP path in madvise_checked is
executed even if box.cfg.strip_core is false. Looks like flags aren't
initialized properly somewhere. Please fix.

Please double-check (manually) that this new option does reduce core
size. Try setting box.cfg.memtx_memory, writing some data to a space,
then increasing box.cfg.memtx_memory, writing more, crashing the app,
and checking that the core size is significantly smaller with strip_core
set.

Also, as I mentioned in the comment to the previous patch, we should
emit a warning in case MADV_DONTDUMP is unavailable while strip_core is
set. This probably better be done here, in Tarantool, using say_warn.

  reply	other threads:[~2019-05-15 12:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-13 22:20 Cyrill Gorcunov
2019-05-15 12:45 ` Vladimir Davydov [this message]
2019-05-15 12:54   ` Cyrill Gorcunov

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=20190515124558.7k6advlhcrr5r4dt@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=alexander.turenko@tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH v2] box/memtx: Allow to skip tuple memory from coredump' \
    /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