Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WSTRR-000590-Ae for pgsql-bugs@arkaria.postgresql.org; Tue, 25 Mar 2014 15:39:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WSTRP-0004JB-Oj for pgsql-bugs@arkaria.postgresql.org; Tue, 25 Mar 2014 15:39:03 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WST7c-0000MV-20 for pgsql-bugs@postgresql.org; Tue, 25 Mar 2014 15:18:36 +0000 Received: from hahler.de ([188.40.33.212] helo=elfe.thequod.de) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WST7X-0000BN-2N for pgsql-bugs@postgresql.org; Tue, 25 Mar 2014 15:18:35 +0000 Received: from localhost (amavis [10.122.1.24]) by elfe.thequod.de (Postfix) with ESMTP id BAF2D620A0; Tue, 25 Mar 2014 16:18:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thequod.de; h= content-type:content-type:in-reply-to:references:subject:subject :mime-version:user-agent:from:from:date:date:message-id:received :received; s=postfix2; t=1395760708; bh=54Hy6AlAHcy13YKwgL91S3J1 kEKwnxjjCDB8foZhuy4=; b=hcuhLT8g5XaBw5Iw+TdjZwE8inHLmAKGvTydGVEi D3GNJlR9kZ8o4CVI0XZ5/trqGDaa1zrVOzezfNSeGjLdX9ID/lLXUz1DXaXBWGME Hxe9LAxkHimhM0mDaM4+mwvqF/kCeCAB9objp6lnqg5IzbxDnO/iLDvWmDZFNE4T oMg= X-Virus-Scanned: Debian amavisd-new at amavis.thequod.de Received: from elfe.thequod.de ([10.122.1.25]) by localhost (amavis.thequod.de [10.122.1.24]) (amavisd-new, port 10026) with ESMTP id dy6NTGO0b9kZ; Tue, 25 Mar 2014 16:18:28 +0100 (CET) Received: from lenny.thequod.de (91-65-218-186-dynip.superkabel.de [91.65.218.186]) (Authenticated sender: daniel@hahler.de) by elfe.thequod.de (Postfix) with ESMTPSA; Tue, 25 Mar 2014 16:18:28 +0100 (CET) Message-ID: <53319E20.9030006@thequod.de> Date: Tue, 25 Mar 2014 16:17:52 +0100 From: Daniel Hahler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Alvaro Herrera , Tom Lane CC: pgsql-bugs@postgresql.org Subject: Re: BUG #9721: Fatal error on startup: no free slots in PMChildFlags array References: <20140325115930.17060.24684@wrigleys.postgresql.org> <13133.1395757616@sss.pgh.pa.us> <20140325143647.GE9567@eldon.alvh.no-ip.org> In-Reply-To: <20140325143647.GE9567@eldon.alvh.no-ip.org> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nT1mDSE4xqjI0cxdu45nNpaX9EfVaeACr" X-Pg-Spam-Score: -2.0 (--) 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 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --nT1mDSE4xqjI0cxdu45nNpaX9EfVaeACr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 25.03.2014 15:36, Alvaro Herrera wrote: > Tom Lane wrote: >> postgresql@thequod.de writes: >>> PostgreSQL just failed to startup after a reboot (which was forced vi= a >>> remote Ctrl-Alt-Delete on the PostgreSQL's containers host): >> >>> 2014-03-24 13:32:47 CET LOG: could not receive data from client: Con= nection >>> reset by peer >>> 2014-03-25 12:32:17 CET FATAL: no free slots in PMChildFlags array >>> 2014-03-25 12:32:17 CET LOG: process 9975 releasing ProcSignal slot = 108, >>> but it contains 0 >>> 2014-03-25 12:32:17 CET LOG: process 9974 releasing ProcSignal slot = 109, >>> but it contains 0 >>> 2014-03-25 12:32:17 CET LOG: process 9976 releasing ProcSignal slot = 110, >>> but it contains 0 >> >> That's odd (and as you say, unexpected) but this log extract doesn't g= ive >> much clue as to how we got into this state. What was going on before >> this? In particular, it's hard to call this "failure to start up" whe= n >> you evidently had a hundred or so postmaster child processes already. >> Could there have been some unexpected surge in the number of connectio= n >> attempts just after the database came up? Also, this extract doesn't = look >> like anything that would've caused the postmaster to decide to shut do= wn >> again, so what happened after that? Or in short, I want to see the re= st >> of the log not just this part. That was the whole log. The rotated one before has only: 2014-03-22 03:51:37 CET LOG: could not receive data from client: Connect= ion reset by peer 2014-03-22 03:52:25 CET LOG: could not receive data from client: Connect= ion reset by peer 2014-03-22 03:59:31 CET LOG: could not receive data from client: Connect= ion reset by peer 2014-03-22 04:00:18 CET LOG: could not receive data from client: Connect= ion reset by peer 2014-03-22 06:03:06 CET LOG: could not receive data from client: Connect= ion reset by peer Should I increase the logging verbosity, in case this happens again? If so, to what? (I have not configured logging yet, so it has the default= s from your Debian package). > Here's my guess --- this is a virtualized system that somehow dumped > some state to disk to hibernate while the host was being rebooted; and > then, when the host was up again, it tried to resurrect the virtual > machine and found things to be all inconsistent. Yes, the container was frozen during reboot: =46rom the host: Mar 25 11:54:48 HN kernel: [ 76.237452] CT: 144: started Mar 25 11:55:03 HN kernel: [ 91.201145] CT: 144: restored OpenVZ uses "suspend" by default to stop containers on host reboots. I will change this to "stop" for the PostgreSQL container, but still this= seems like something PostgreSQL should handle better. FWIW, I have just suspended and started the container manually, and Postg= reSQL kept running (upgraded to 9.3.4 in the meantime). Maybe it's a bug with OpenVZ and how it restores some resources after reb= ooting the host? Please also note that the PostgreSQL error happened half an hour after th= e reboot/resuming of the container. Thanks, Daniel. --=20 http://daniel.hahler.de/ --nT1mDSE4xqjI0cxdu45nNpaX9EfVaeACr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iD8DBQFTMZ4gfAK/hT/mPgARAi3YAJ9sH2SNhuKRS/Xrgx0IRBaWcEdrVwCgrKD1 yQCzGGy5VqmI3WncBJZKsSw= =PY+d -----END PGP SIGNATURE----- --nT1mDSE4xqjI0cxdu45nNpaX9EfVaeACr--