Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIjDA-0003YF-EA for pgsql-general@arkaria.postgresql.org; Sat, 25 Nov 2017 22:46:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIjD9-0002HN-5d for pgsql-general@arkaria.postgresql.org; Sat, 25 Nov 2017 22:46:11 +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 1eIjD8-0002HC-QL for pgsql-general@lists.postgresql.org; Sat, 25 Nov 2017 22:46:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eIjD1-0000ZW-9L for pgsql-general@postgresql.org; Sat, 25 Nov 2017 22:46:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vAPMjxY6005669; Sat, 25 Nov 2017 17:45:59 -0500 From: Tom Lane To: Justin Pryzby cc: Andres Freund , pgsql-general@postgresql.org Subject: Re: backends stuck in "startup" In-reply-to: <20171122012541.GP5668@telsasoft.com> References: <20171122012541.GP5668@telsasoft.com> Comments: In-reply-to Justin Pryzby message dated "Tue, 21 Nov 2017 19:25:41 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5667.1511649959.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 25 Nov 2017 17:45:59 -0500 Message-ID: <5668.1511649959@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Justin Pryzby writes: > We never had any issue during the ~2 years running PG96 on this VM, unti= l > upgrading Monday to PG10.1, and we've now hit it 5+ times. > BTW this is a VM run on a hypervisor managed by our customer: > DMI: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platfo= rm, BIOS 6.00 06/22/2012 > Linux TS-DB 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x8= 6_64 x86_64 x86_64 GNU/Linux Actually ... I was focusing on the wrong part of that. It's not your hypervisor, it's your kernel. Running four-year-old kernels is seldom a great idea, and in this case, the one you're using contains the well-reported missed-futex-wakeups bug: https://bugs.centos.org/view.php?id=3D8371 While rebuilding PG so it doesn't use POSIX semaphores will dodge that bug, I think a kernel update would be a far better idea. There are lots of other known bugs in that version. Relevant to our discussion, the fix involves inserting a memory barrier into the kernel's futex call handling: https://github.com/torvalds/linux/commit/76835b0ebf8a7fe85beb03c75121419a7= dec52f0 regards, tom lane