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 1iJuWY-0000H5-N1 for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Oct 2019 07:12:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iJiQA-0000EK-FL for pgsql-hackers@arkaria.postgresql.org; Sun, 13 Oct 2019 18:16:46 +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 1iJiOP-0000A1-M3 for pgsql-hackers@lists.postgresql.org; Sun, 13 Oct 2019 18:14:57 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iJiOM-0004h1-I9 for pgsql-hackers@lists.postgresql.org; Sun, 13 Oct 2019 18:14:56 +0000 Received: by mail-io1-xd30.google.com with SMTP id b136so32737342iof.3 for ; Sun, 13 Oct 2019 11:14:54 -0700 (PDT) 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=lriXg2kmFlMB6W74IWUYHJbXGXtkVbU0y+mq1M2eVUs=; b=jQgSZLImACVelZ54SWVGbD1tyVJp+FkTjIUbkBqad4XzCvtuGmHnkaD1tHkt2N05SE JecE447Y08Iu2c3UZSOtCmw3bIA8MdSgMD8F0kZ7g5bKwXq1yPKGI7bv51D2U4Vx0QKK L2vfu6HrsL2SqnHuoyc0Seii/Lvx32t9WMF1GMHw0m9Y1yU+V3UbJ5JRIg3OE6iDLKXF y6Rpa1I+pJCUu5i12Z8VZ0U25FzpY949at/qMRtVtD06+LMIBJh/ez+mcIemCnWuJHwD /WzlSE8OvyFzNG/CH4kJnX3dUFlWaVlfIGS76bcUvt/98q2UKwbDNR9iaW4nqNdxaojh L5fA== 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=lriXg2kmFlMB6W74IWUYHJbXGXtkVbU0y+mq1M2eVUs=; b=IDdAhRAe7qW9gkCf2oOvfVTMPc4pzE9efySkXvEfkeUQoAmmOrGdBYBdUm947Z92Aa LxjNE47yW/tqY8EJIARi16DrLjEInVE/uDaL/1gAKUa5rX/4/kpJ5+D5bR9503/IFXyc uI/eGILJxY3k5OLIuEF0NQ44JQbtnR5l83/S2HxmFfAPDtVjjAPSKhosEcoli/GvBG8K 4EBY6DsNAkfIHGUor5OuWpm77wYoN8ks871vl9nslp8j2WHg5FylTYy5Zg5uMc3FcprL giXaLeD3KrWjykqz97ume6/IjLVFrWnY1rFodgfU9lurhaxLUn/npfSS2Qv7YMO2xMEM /Zyg== X-Gm-Message-State: APjAAAXf7BPypkANAwjlMCCGZSv/29LCHLT1/D41IDlbtHvYUWpgH3tO lV8MvGDw3onF4sTJqfW+QtuE9Q== X-Google-Smtp-Source: APXvYqzSqktvCeb1I7jJQ6QMWwWmO/XiFsd3YSe88gS6zMzusb8cwivocxCoxFG0BDwhyEJokxMC5w== X-Received: by 2002:a02:9084:: with SMTP id x4mr32720913jaf.76.1570990493224; Sun, 13 Oct 2019 11:14:53 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id o26sm9729330ioo.61.2019.10.13.11.14.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Oct 2019 11:14:52 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id 1E93E8011CB; Sun, 13 Oct 2019 13:14:51 -0500 (CDT) Date: Sun, 13 Oct 2019 13:14:51 -0500 From: Justin Pryzby To: Alvaro Herrera Cc: Michael Paquier , pgsql-hackers@lists.postgresql.org, Peter Eisentraut , Andreas Karlsson Subject: Re: v12.0: segfault in reindex CONCURRENTLY Message-ID: <20191013181450.GG4475@telsasoft.com> References: <20191013162426.GF4475@telsasoft.com> <20191013181021.GA10785@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191013181021.GA10785@alvherre.pgsql> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sun, Oct 13, 2019 at 03:10:21PM -0300, Alvaro Herrera wrote: > On 2019-Oct-13, Justin Pryzby wrote: > > > Looks like it's a race condition and dereferencing *holder=NULL. The first > > crash was probably the same bug, due to report query running during "reindex > > CONCURRENTLY", and probably finished at nearly the same time as another locker. > > Ooh, right, makes sense. There's another spot with the same mistake ... > this patch should fix it. I would maybe chop off the 2nd sentence, since conditionalizing indicates that we do actually care. + * If requested, publish who we're going to wait for. This is not + * 100% accurate if they're already gone, but we don't care. Justin