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.92) (envelope-from ) id 1jI05e-0007Up-Ur for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Mar 2020 01:16:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jI05d-0006tw-LL for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Mar 2020 01:16:45 +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 1jI05d-0006tp-2J for pgsql-hackers@lists.postgresql.org; Sat, 28 Mar 2020 01:16:45 +0000 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jI05W-0003t8-3R for pgsql-hackers@postgresql.org; Sat, 28 Mar 2020 01:16:43 +0000 Received: by mail-qt1-x835.google.com with SMTP id c9so10274205qtw.7 for ; Fri, 27 Mar 2020 18:16:37 -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=0wcxzrontsntsfJOY0Gss9NSt1H1RyTesM0RbGAU8Zs=; b=WJ9kJ9LxkzBC6yVoCAu22eooYuT5FwRsWvKPa1l9lON9hiOtrqURraclk8Kkw77TkA C+v5+fxMgDdNYotaB1Ard300RPRoRShhY39V+yG4cLnQo+C6ojy6zdAI6QvDZQkL+dIa +9Bq/NoxWgFlFBCx+ayZNOHrFci2RbRCLrFWiar/NcvX/ki7h+L9jYQrF3nDgk56zD5K 20vooWq4iHgLKqmqoaexyvIEKmBzhpHD4wto4XNNS4UZvyuJz8zGcnNnvUOlcgrln+84 OPoxGpZq/30Y88m1t38wXeP099LLn5HOgojL9szkO3hJOsjEDzYV0XV9yfglvM5Okif5 0qCQ== 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=0wcxzrontsntsfJOY0Gss9NSt1H1RyTesM0RbGAU8Zs=; b=UKtRNCFt12wTKn2H+cmQW9lJmMUZDkQO2j+Uy1xnzioph0niS9HujSZldoJqDfaeiM /6Zo96Ymg6WiZptQbqM91D6p81UaHTRmFi9dettDnZCxp6ruXECLIFaTBupz98EvGVDD XAcPFM2NENN+V0IFZtNd4uvDUN5N26kcTi0LxOzQGpW0C1oGFlx4EemXpgbbddu91Wii H+Cw8HAFE9e1QbjJ92K95Kw1UO2RZ7fEG3RWZd+6xsCaRzw7a5GfiBAtAJLb1q2MZ1Xd vRlKGU/2sF0yW3yYld6eMEoovXBMpo0ZQTfXbjHtYTFfj1e6pt9qDTY36Sbbfcp12AcF QMAA== X-Gm-Message-State: ANhLgQ2/0IQ435i26Vlu1sQ6mQwvsay5Q6BcsI0bI2QDvShm+hw0Wdss ZplM44HnN3k0Ca1man8y8pW46w== X-Google-Smtp-Source: ADFU+vvq6C4e3kugGod5ENfiEGjKcGCTcnKbIPcwFzbptzHFRHt8L78WrfkKIBD9meLbMsXt0x7tVg== X-Received: by 2002:ac8:37f8:: with SMTP id e53mr2135825qtc.280.1585358196992; Fri, 27 Mar 2020 18:16:36 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id s11sm5000199qke.97.2020.03.27.18.16.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Mar 2020 18:16:36 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id 06445800926; Fri, 27 Mar 2020 20:16:32 -0500 (CDT) Date: Fri, 27 Mar 2020 20:16:32 -0500 From: Justin Pryzby To: Amit Kapila Cc: Masahiko Sawada , Alvaro Herrera , Andres Freund , Michael Paquier , pgsql-hackers@postgresql.org Subject: Re: error context for vacuum to include block number Message-ID: <20200328011632.GY20103@telsasoft.com> References: <20200326150457.GB17431@telsasoft.com> <20200326221752.GR17431@telsasoft.com> <20200327044424.GD20103@telsasoft.com> <20200327061601.GE20103@telsasoft.com> <20200327190428.GS20103@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sat, Mar 28, 2020 at 06:28:38AM +0530, Amit Kapila wrote: > > Hm, but I caused a crash *without* adding CHECK_FOR_INTERRUPTS, just > > kill+sleep. The kill() could come from running pg_cancel_backend(). And the > > sleep() just encourages a context switch, which can happen at any time. > > pg_sleep internally uses CHECK_FOR_INTERRUPTS() due to which it would > have accepted the signal sent via pg_cancel_backend(). Can you try > your scenario by temporarily removing CHECK_FOR_INTERRUPTS from > pg_sleep() or maybe better by using OS Sleep call? Ah, that explains it. Right, I'm not able to induce a crash with usleep(). Do you want me to resend a patch without that change ? I feel like continuing to trade patches is more likely to introduce new errors or lose someone else's changes than to make much progress. The patch has been through enough iterations and it's very easy to miss an issue if I try to eyeball it. -- Justin