Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wI9Cj-007pZu-06 for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Apr 2026 18:00:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wI9Cg-004bg2-10 for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Apr 2026 18:00:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wI9Cf-004bfs-36 for pgsql-hackers@lists.postgresql.org; Wed, 29 Apr 2026 18:00:06 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wI9Cd-00000003Nki-3Hi4 for pgsql-hackers@lists.postgresql.org; Wed, 29 Apr 2026 18:00:05 +0000 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-38e84ed22bdso412591fa.2 for ; Wed, 29 Apr 2026 11:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777485602; x=1778090402; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=5bChsfstWXz5N7GPVbOlMyJTVFconNA8QUCwdZqRWZA=; b=CSuHjw8eKOFjWm/a+ZWy1xDqLDztQClSwyEANYRqiAcicMD4Jv6aaAGaYLX0XPO2Pu LiQf8hEmJU7eROR/7h5sB9JWQLSiIeRvjUkexYxyWuAaYwKaNUubxCbSVPqh7Gaj9VC1 ZQZugNKKehcBKEmL2CcDNnMAVEE5rUpSTh/lMd6exnGKothUj1580PRZnLtRiSFX6iTv /xqnlf+69JWyWXNyTzTZREHOU+MwyT6Kki5s7FgU+VOUv0z15y6aAxJQ+/AYzjY2j9v7 neF3/eXSPo4umy3eOJd+9awgnVPn3Waz1KiU1Pk2IUm9GY5LlJrmzW0q7BR8/t1YBTAP wpoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777485602; x=1778090402; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5bChsfstWXz5N7GPVbOlMyJTVFconNA8QUCwdZqRWZA=; b=dZSayDiQZAXtECyIk0/Dyvb7NI27e8KwsPCrlzzJZbIXsgN7PY8IwpsgA4xcchnYyV DfBIMC6Rd54x2pJHFBq+2SgVBJQqOUw4hmBjvvKeHqt+7vnCXFjErerHza36Ze8nSvo2 Imw7SUo/vuX/EQh0wOG6KrEjd7Vbq6+KTcRy/itvY/S6R28lLFheaOeDEIfXZGbzF5Zw mJkXLZ5aAbWwYaMPYd7+msAx9KDWlms3gGUgCPFk27s121KDtRRJENJycTaFgd8JI6T5 Y68y8efGf1X0ynuFMZZ3QmQE0tJD5ayLVEl3IRYDzC3bsS13I/wnnDSgyByDzo4JTijp 3HsQ== X-Forwarded-Encrypted: i=1; AFNElJ//Npn2uRjVMCCUbdnUsBkU9j2uokp1z9OHm2Ix3x8uGZjGdBebO7P5RZ7XmdUaeIlo43LRyTsBx0lDkgO2@lists.postgresql.org X-Gm-Message-State: AOJu0YxNrsVCxlS9eyJI+sIIJv6xyL+74rk6aEgjXmbElJG17gWpPkG4 nCQPVc7h9LDpg5Tiv++gW5OnUXvxlHHmK9OTgBgKRSF65lkIFbE7G8WU X-Gm-Gg: AeBDievEK+uUv1CBvXqEJiJ5ZdefDWi+ihnLabna9Mfe7Zpd+LodHzOk57n9Tjc3gtu PfolyPHBVUO8EkfWd1Yteef4t8oYeQOJTHUkSx4mp2Db+5qysRtLlCMtb06wXObPZRaorIVjPrV 1TwKmahB0OgIKv7ZKKfHcCcEfJbd5DkypYKp+613ACJJnuwl1WNStUU1BDcE2v0zD+lZ05KQDX1 35TpBnzdOXizK4pER+sNKXPhZHTKc0+15/Fj2vagB1hoj6fbBb4xUdeFwSfGCvP4nJJnPPMPrDC dJHd7OU2XBc0xPKHswr96+zF1dwFMGlfoxiVTLzwi+WOfL/Z0eorDlG/ipuC59ZNXRBa70SBWIW Ls6F/EsO63tSr7xMMwBNTbj4qpcuAoaiD8E677iOWaW3DwGHzbSZ5b3beKxPdFHp9Muqfp+laBA thKZ2UIBB0qtzIvB1jmKoYF/uc8I3or1mcpYA= X-Received: by 2002:a05:651c:324b:b0:38e:d8a3:e08a with SMTP id 38308e7fff4ca-39240cc2d26mr32405321fa.3.1777485602208; Wed, 29 Apr 2026 11:00:02 -0700 (PDT) Received: from [192.168.0.50] ([89.149.68.143]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3924f9484e3sm7042611fa.5.2026.04.29.11.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2026 11:00:01 -0700 (PDT) Message-ID: <2a199ba7-1d18-438a-847e-5241b7dac514@gmail.com> Date: Wed, 29 Apr 2026 21:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Startup process deadlock: WaitForProcSignalBarriers vs aux process To: Masahiko Sawada Cc: Andres Freund , Matthias van de Meent , Thomas Munro , PostgreSQL Hackers , Heikki Linnakangas References: <4358bd85-f6b4-4da6-9909-74428fe3c8f7@gmail.com> Content-Language: en-US From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dear Sawada-san, 28.04.2026 22:27, Masahiko Sawada wrote: > On Mon, Apr 27, 2026 at 11:00 AM Alexander Lakhin wrote: >> I've been puzzled by a buildfarm failure [1] with such symptoms for a while >> and even reproduced it locally once, but couldn't gather more information >> that time. But now that you have described the scenario, I can easily >> reproduce the same test failure with: >> --- a/src/backend/storage/ipc/procsignal.c >> +++ b/src/backend/storage/ipc/procsignal.c >> @@ -206,6 +206,7 @@ ProcSignalInit(const uint8 *cancel_key, int cancel_key_len) >> if (cancel_key_len > 0) >> memcpy(slot->pss_cancel_key, cancel_key, cancel_key_len); >> slot->pss_cancel_key_len = cancel_key_len; >> +pg_usleep(10000); >> pg_atomic_write_u32(&slot->pss_pid, MyProcPid); > Thank you for testing this. > > I've attached a patch to address the issue. I haven't verified it > across all versions yet, but I suspect it exists in the stable > branches as well... Thank you for the fix! It works for me too. I was wondering why is that failure the only one of this kind on buildfarm (in last two years, at least), so I've tried to reproduce it on REL_18_STABLE... and failed. Then I've bisected it on the master branch and found (your) commit that introduced this behavior: 67c20979c from 2025-12-23. Best regards, Alexander