Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtNvt-0005oS-TW for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Feb 2019 02:36:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gtNvs-0002wP-CP for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Feb 2019 02:36:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtNvr-0002vG-Tz for pgsql-hackers@lists.postgresql.org; Tue, 12 Feb 2019 02:36:24 +0000 Received: from mail-it1-x12c.google.com ([2607:f8b0:4864:20::12c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtNvl-0003XA-2p for pgsql-hackers@lists.postgresql.org; Tue, 12 Feb 2019 02:36:22 +0000 Received: by mail-it1-x12c.google.com with SMTP id y184so3634799itc.1 for ; Mon, 11 Feb 2019 18:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=NgfnVHA213sspLUoTpJTgpDxTXMwT7P0SU2duQ9VB98=; b=LhkLrH4qF6UdPnRpXqfV7M53tZPHVVLIJj4SfF+9O7o2Q5KV5LhlK2bhTgErkM+SR8 sV2/XyfeI6Dwhr/mDZuJ2rzFml8CKnv007QKxqe+b6hiIG2r1ijYLV2YFZnGiQkG7aG8 8D3jGJGkUhfGd/3NoR9dUDmGOCxQSS1D3AQ9puMYAxy5wKPGm7Dd52yYgUA0SxgVojZP Tvk0sJ3PYh5QfVDmR1CiruS/MYma7RFS9th2r4wILKUDE9togfxv0cfG0hor++v4adpy lGhvRBxWY6rFylJxvwAgx+FxIFeu4sydkWu7s3fDlcRv44l41Ng5F8ARa1fQ/m93caYn i7Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=NgfnVHA213sspLUoTpJTgpDxTXMwT7P0SU2duQ9VB98=; b=XQawJp886rRAD/aQnGSLHm5WT9WhTOcE7VSuvHqCM5k725M56NciFw7G42YyGtktja dR7vCj4NR1qwHGrmccFnddTr8O0Pk4wnulO6lURMEYx+Y1cUiNUaht//RAw2RHUzHnvv O6NYVdyeR2EfwXYdzVVwr4yATYPSbPVgG64jDQhZ4LLZWZ5T0y9nbh4HKPqOckQIcCdR 7w8OJ+tqYgFkEWj2v6Y4nVMMmov7LRCQl/bjIZsyaTea2x1Fy2T8BeUzX2XXXi2iFwvj F7y+p3n1UQQbLBdU9Q3nBmN9eDaaJ+/4HDdT3ZgNe/Tp+6hhW95PjvpKEmiJ3TCR62mz 0kEA== X-Gm-Message-State: AHQUAuZCGZBuV0V5UzcHdZmATLWx6R1+85zsaVit1zfwzSvVE3NZlkra t5RCEifJCPghyCvqrsfABhi1eQ== X-Google-Smtp-Source: AHgI3IY3PDPl6fodZ2zwrJ89R/hSpcKaerJxcKkM9ZlklXIVGm5FoNmo8XXieya6ruAdmlvg4fHklA== X-Received: by 2002:a24:2208:: with SMTP id o8mr642145ito.23.1549938976065; Mon, 11 Feb 2019 18:36:16 -0800 (PST) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id p11sm1517457ios.15.2019.02.11.18.36.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 18:36:15 -0800 (PST) Received: by pryzbyj (Postfix, from userid 1000) id 416A7800B9A; Mon, 11 Feb 2019 20:36:14 -0600 (CST) Date: Mon, 11 Feb 2019 20:36:14 -0600 From: Justin Pryzby To: Thomas Munro Cc: Sergei Kornilov , "pgsql-hackers@lists.postgresql.org" Subject: Re: pg11.1: dsa_area could not attach to segment Message-ID: <20190212023614.GB31721@telsasoft.com> References: <20190206070819.GA29720@telsasoft.com> <20190206071940.GB29720@telsasoft.com> <20190207014719.GJ29720@telsasoft.com> <20190211040132.GV31721@telsasoft.com> <67790871549896669@iva5-d3020dc3459d.qloud-c.yandex.net> <20190212021428.GA31721@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190212021428.GA31721@telsasoft.com> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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