Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSn6X-0006CC-Gm for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Oct 2020 20:10:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kSn6V-0001g8-0u for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Oct 2020 20:10:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSn6U-0001g1-MH for pgsql-hackers@lists.postgresql.org; Wed, 14 Oct 2020 20:10:30 +0000 Received: from lahtoruutu.iki.fi ([185.185.170.37]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSn6Q-00030w-M5 for pgsql-hackers@lists.postgresql.org; Wed, 14 Oct 2020 20:10:29 +0000 Received: from [192.168.1.113] (dsl-hkibng22-54faa4-119.dhcp.inet.fi [84.250.164.119]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 9684B1B00084; Wed, 14 Oct 2020 23:10:22 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1602706222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FZXVskJs49pobYXpRXyfLhA7rD2K72Yn29e62YNvgwk=; b=UgZhLaWmbgjHUg3cQ1VvrFe5JdLlSttCow0bBl4gwgEtccw6srkRR5DqloiqqQILq6tC8S HoNH0cXtoHtMZQ0iscTO4D8edDHmz/RuBZyI5+GgAe71dX/+75eNhkkqHwoqWeFjJnAe0b Xrb/9GzJvdKsY8onM9MEAXvlwZ5ihgZdkR6Y2chXEF7igg4XgJiRyfY/bOrv6ouXdNvz3q v9K343H1o4y5Uh+O47M81YKEtPikw+0kv2+thD9fk1U2Kd0c52nWEbBuEMkloPpulQ9wVC onbzyW/BCNCVi92A+6LElYpdZ+XfZW00Kw/PCWghg84k25GFcuZ/uXGnvbWgKQ== Subject: Re: kevent latch paths don't handle postmaster death well To: Tom Lane , Thomas Munro Cc: pgsql-hackers@lists.postgresql.org References: <3624029.1602701929@sss.pgh.pa.us> From: Heikki Linnakangas Message-ID: <7d6fb32a-d6d2-0c09-372a-41e992d54dff@iki.fi> Date: Wed, 14 Oct 2020 23:10:22 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <3624029.1602701929@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1602706222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FZXVskJs49pobYXpRXyfLhA7rD2K72Yn29e62YNvgwk=; b=TiG+RWaoHvSgBX4iwZP/nRpLN1dq8jXTgGs2aKuz3y42pxHlpouO7ZeRhK9YdcwilLBSII ibRLCNbCPK1EPMBqUhI/41IBBRMOVrN4tDJ0LxS/BL+d/KNx5t6M4LsNcvsk2nW2CXcElC hWSVsqgjpSRniyA/GN/wkTGV49rCeVpdcbU5n6kuPReu/89CVBlHUwDn396Axh4s+yIeau ACdTvv0OO7gkuMQercVF8sCkHMXmj/CX2n+p5NWQ6Ej3fAlvAAAOc5SL3PRWADKMEGK2ah c2qsiy6wCpXMIymgbs1yObf8B02v639ZU0p/jf2WTlGngyOPYA35Nr/YaGGZLw== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1602706222; a=rsa-sha256; cv=none; b=RjJ7tqpoA7oGDnQ3b4NPIWtIYx68XNiyXivFwoQFMK05z8oNwPViBUvk0yYV8vE+8yRHX1 H0Q5FQAtF4253XO8LN2RoSFKHq6QSrkpmUGZePSjSl0/zjKXXRHAFOm7sDs8JqI//qBANf 3LWUdwtpjH4IdT3b2l+yyfHcOeeJZTOAMW7U2lg+pCIMWvGkblvQ1z0SnznmFHCHnSAp/f mjuRc6UZi8f2fQkUl4kDpB8qCsbcoSfv/6T9YnTwEuSHsdA56Mgbx+UE6q0hoL+DOvc2xy miJmHpWBIq7SSUYtUTa5vfJR46CDYHi/oFDM/N9bsYntmxh0cN5FgsKViOyHTg== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 14/10/2020 21:58, Tom Lane wrote: > I noticed that chipmunk failed [1] with a rather interesting log: > > 2020-10-14 08:57:01.661 EEST [27048:6] pg_regress/prepared_xacts LOG: statement: UPDATE pxtest1 SET foobar = 'bbb' WHERE foobar = 'aaa'; > 2020-10-14 08:57:01.721 EEST [27048:7] pg_regress/prepared_xacts LOG: statement: SELECT * FROM pxtest1; > 2020-10-14 08:57:01.823 EEST [27048:8] pg_regress/prepared_xacts FATAL: postmaster exited during a parallel transaction > TRAP: FailedAssertion("entry->trans == NULL", File: "pgstat.c", Line: 909, PID: 27048) > 2020-10-14 08:57:01.861 EEST [27051:1] ERROR: could not attach to dynamic shared area > 2020-10-14 08:57:01.861 EEST [27051:2] STATEMENT: SELECT * FROM pxtest1; > > I do not know what happened to the postmaster, but seeing that chipmunk > is a very small machine running a pretty old Linux kernel, it's plausible > to guess that the OOM killer decided to pick on the postmaster. (I wonder > whether Heikki has taken any steps to prevent that on that machine.) For the record, it was not the OOM killer. It was the buildfarm cron job that did it: Oct 14 08:57:01 raspberrypi /USR/SBIN/CRON[27050]: (pgbfarm) CMD (killall -q -9 postgres; cd /home/pgbfarm/build-farm-client/ && ./run_branches.pl --run-all) Apparently building and testing all the branches is now taking slightly more than 24 h on that system, so the next day's cron job kills the previous tests. I'm going to change the cron schedule so that it runs only every other day. - Heikki