Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqTlu-0004SH-Ax for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Apr 2016 23:00:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aqTlt-0004Gi-TZ for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Apr 2016 23:00:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aqTlG-0002wA-KU for pgsql-bugs@postgresql.org; Wed, 13 Apr 2016 22:59:50 +0000 Received: from mx-out.zmailcloud.com ([192.198.85.98] helo=mx-out-1.zmailcloud.com) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqTlD-0008Kp-52 for pgsql-bugs@postgresql.org; Wed, 13 Apr 2016 22:59:49 +0000 Received: from smtp.01.com (smtp.01.com [10.10.0.43]) by mx-out-1.zmailcloud.com (Postfix) with ESMTP id 5D6A5563CDC for ; Wed, 13 Apr 2016 17:59:46 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 4D362601B5 for ; Wed, 13 Apr 2016 17:59:46 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6ahD9oDX6BOk for ; Wed, 13 Apr 2016 17:59:46 -0500 (CDT) Received: from smtp.01.com (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 25C5060239 for ; Wed, 13 Apr 2016 17:59:46 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 0FE7B6022C for ; Wed, 13 Apr 2016 17:59:46 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EGaJ-0UCBpD3 for ; Wed, 13 Apr 2016 17:59:45 -0500 (CDT) Received: from redhat.com (c-73-67-198-16.hsd1.or.comcast.net [73.67.198.16]) by smtp-out-2.01.com (Postfix) with ESMTPSA id BD0A6601B5 for ; Wed, 13 Apr 2016 17:59:45 -0500 (CDT) To: pgsql-bugs From: Josh berkus Subject: Lock pileup stuck processes Message-ID: <570ECF60.5040200@agliodbs.com> Date: Wed, 13 Apr 2016 15:59:44 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Folks, This is a "hard to reproduce" bug, so is being submitted to this list in order to accumulate evidence for eventual debugging when there are enough reports to figure something out. Since I've seen this on two different user applications now, I think it relates to some kind of persistent issue either in Postgres or in the OS. Summary: in some cases, "lock pileups" fail to resolve completely, and one or more orphan backends are left in permanent lock-waiting state. Versions observed: 9.2.14, 9.2.15, 9.3.5 Platforms: RHEL6, Fedora Observations: 1. A long-running transaction grabs one or more row locks. 2. Various queries, especially SELECT FOR UPDATE queries, pile up behind this lock request. 3. At peak, 30 or more backends are waiting for locks in a dependency chain. System load is high. 4. Original transaction ends. 5. Over 10 minutes most of the waiting backends complete their work and release. 6. 1 to 3 backends never come out of active/waiting state, remaining that way indefinitely. My attempts to reproduce this issue under synthetic circumstances have not been successful. strace of the stuck backends shows no activity. --=20 -- Josh Berkus Red Hat OSAS (any opinions are my own) --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs