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 1guJkH-0003Ha-SJ for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Feb 2019 16:20:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1guJkG-0008SK-JN for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Feb 2019 16:20:16 +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 1guJkG-0008RE-55 for pgsql-hackers@lists.postgresql.org; Thu, 14 Feb 2019 16:20:16 +0000 Received: from mail-it1-x12f.google.com ([2607:f8b0:4864:20::12f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1guJkD-0002Xi-Cw for pgsql-hackers@lists.postgresql.org; Thu, 14 Feb 2019 16:20:15 +0000 Received: by mail-it1-x12f.google.com with SMTP id h6so14420693itl.1 for ; Thu, 14 Feb 2019 08:20:13 -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=SXc3hv13OQnSXhVXenEWsQASnSye4+JRlVNviq1eh80=; b=DGVrShMXwDRkgYVEizeXrsk3s51QL7aXPRWCoCyxQeSjaaIyCYN4bCkNl1qlFhTMn5 Qt9jlxAPLm3pptptUP9qaOpcHOMumv/bk61F2mrYNIRPE026kN2PKmGUowFoTKthaNTl 2q/XUpQPuskzjjnzCWvJf4bPR5kEwgGtoOqFFeDTylUjLY/ayX/z2mqDfv8D3hmzgbDr kXfzK5OXddQMrIEy07/V6XkQJBmTxo/8hEgrNzQXLnMweVBKGqm9vVHHzjVckZWGTnpF ktFsMpUSwcv8nJwbprM78wZl9hYqGjhmZFYsqY85x6yYg8umtsGUw0Z22bPKSLpZZLGD /ZaQ== 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=SXc3hv13OQnSXhVXenEWsQASnSye4+JRlVNviq1eh80=; b=NGBzhD0zb7A0/jAqgOl5Ib4+a4mZLHgWoIcNKS9yh4snvDdmk9s8jQyuiYlzZmKCVB n9UOTAJFZDi2Ian4j1VOVVgesVarPvsNBONtKi1TKafZruExtD8OqqtwJx6c+wOcRkij YByzOu/s5bCdNzTsWY30hfYlYLXMa56oO+NsrJqwUPixPhSrMpUZNhfHD1NeyyOZMA3a kBpRzI0h0GxnssqEsSei6KPfh21ESn9bfebc055wcUO5m1gAWLCGM8dNxv4c2eCPncCI 4K8Qgi4UrYs/B4rSTt5IbKocpTf7KligJ8CLdHP1MjOXJ/n+6wjkCBWvpowBDtoHvgMK wSvg== X-Gm-Message-State: AHQUAubMTgdW5EQKMDryPnCV12RDLUNHFSJQ1E0qvdLHMnQMPO0bChzz njNjPhIpbL7K303foMq1EdMdzg== X-Google-Smtp-Source: AHgI3Iay0+Pmn4qbIU7F6Jc62rTnJJ+0bim7baF+eBxM9cIfM1GILeRMGCbwZJC6VSfmb3Ir5Ul7WQ== X-Received: by 2002:a24:7609:: with SMTP id z9mr2923386itb.66.1550161212381; Thu, 14 Feb 2019 08:20:12 -0800 (PST) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id f13sm1061416iol.82.2019.02.14.08.20.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 08:20:11 -0800 (PST) Received: by pryzbyj (Postfix, from userid 1000) id 97AF5800997; Thu, 14 Feb 2019 10:20:10 -0600 (CST) Date: Thu, 14 Feb 2019 10:20:10 -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: <20190214162010.GM30291@telsasoft.com> References: <20190206071940.GB29720@telsasoft.com> <20190207014719.GJ29720@telsasoft.com> <20190211040132.GV31721@telsasoft.com> <67790871549896669@iva5-d3020dc3459d.qloud-c.yandex.net> <20190212024314.GC31721@telsasoft.com> <20190212050058.GF31721@telsasoft.com> <2614901549962899@sas1-4b7566131ec9.qloud-c.yandex.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Feb 15, 2019 at 01:12:35AM +1300, Thomas Munro wrote: > The problem is that a DSM handle (ie a random number) can be reused > for a new segment immediately after the shared memory object has been > destroyed but before the DSM slot has been released. Now two DSM > slots have the same handle, and dsm_attach() can be confused by the > old segment and give up. > > Here's a draft patch to fix that. It also clears the handle in a case > where it wasn't previously cleared, but that wasn't strictly > necessary. It just made debugging less confusing. Thanks. Do you think that plausibly explains and resolves symptoms of bug#15585, too? Justin