From: Justin Pryzby <pryzby@telsasoft.com>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Sergei Kornilov <sk@zsrv.org>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Subject: Re: pg11.1: dsa_area could not attach to segment
Date: Mon, 11 Feb 2019 20:36:14 -0600
Message-ID: <20190212023614.GB31721@telsasoft.com> (raw)
In-Reply-To: <20190212021428.GA31721@telsasoft.com>
References: <CAEepm=3rCe5L6ABWi74ZcJ_zz+n8nF3AyJZpMN=bhg+U0=W46Q@mail.gmail.com>
<20190206070819.GA29720@telsasoft.com>
<CAEepm=3Aq=R=3f8xtH1ipBeMFvrCXk6yobWN7B__ftfkWhxrAw@mail.gmail.com>
<20190206071940.GB29720@telsasoft.com>
<CAEepm=18oK3LCKnPbMQeYumFVM=ZPA_v_RmsVBaP1eeF6LOB7Q@mail.gmail.com>
<20190207014719.GJ29720@telsasoft.com>
<20190211040132.GV31721@telsasoft.com>
<67790871549896669@iva5-d3020dc3459d.qloud-c.yandex.net>
<CAEepm=2=BFXs_+8X-eEyNBpG0OddaWe190KQaOX2TE5aS8UL-A@mail.gmail.com>
<20190212021428.GA31721@telsasoft.com>
On Mon, Feb 11, 2019 at 08:14:28PM -0600, Justin Pryzby wrote:
> > Can we please see the stderr output of dsa_dump(area), added just
> > before the PANIC? Can we see the value of "handle" when the error is
> > raised, and the directory listing for /dev/shm (assuming Linux) after
> > the crash (maybe you need restart_after_crash = off to prevent
> > automatic cleanup)?
>
> PANIC: dsa_area could not attach to segment index:8 handle:1076305344
>
> I think it needs to be:
>
> | if (segment == NULL) {
> | LWLockRelease(DSA_AREA_LOCK(area));
> | dsa_dump(area);
> | elog(PANIC, "dsa_area could not attach to segment index:%zd handle:%d", index, handle);
> | }
>
> ..but that triggers recursion:
Here's my dsa_log (which is repeated many times and 400kB total)..
dsa_area handle 0:
max_total_segment_size: 18446744073709551615
total_segment_size: 15740928
refcnt: 2
pinned: f
segment bins:
segment bin 0 (at least -2147483648 contiguous pages free):
segment index 2, usable_pages = 256, contiguous_pages = 0, mapped at 0x7f56ff9d5000
segment index 0, usable_pages = 0, contiguous_pages = 0, mapped at 0x7f56ffbd6840
segment bin 3 (at least 4 contiguous pages free):
segment index 7, usable_pages = 510, contiguous_pages = 6, mapped at 0x7f56ff0b4000
segment index 6, usable_pages = 510, contiguous_pages = 6, mapped at 0x7f56ff2b4000
segment index 5, usable_pages = 510, contiguous_pages = 5, mapped at 0x7f56ff4b4000
segment index 4, usable_pages = 510, contiguous_pages = 5, mapped at 0x7f56ff6b4000
segment index 3, usable_pages = 255, contiguous_pages = 6, mapped at 0x7f56ff8b4000
segment index 1, usable_pages = 255, contiguous_pages = 6, mapped at 0x7f56ffad6000
segment bin 10 (at least 512 contiguous pages free):
Note negative pages. Let me know if you want more of it (span descriptors?)
Justin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pryzby@telsasoft.com, thomas.munro@enterprisedb.com, sk@zsrv.org, pgsql-hackers@lists.postgresql.org
Subject: Re: pg11.1: dsa_area could not attach to segment
In-Reply-To: <20190212023614.GB31721@telsasoft.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox