Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YNWBL-0002l7-0H for pgsql-bugs@arkaria.postgresql.org; Tue, 17 Feb 2015 00:38:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YNWBK-0002m9-3c for pgsql-bugs@arkaria.postgresql.org; Tue, 17 Feb 2015 00:38:30 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YNWBI-0002lf-2c for pgsql-bugs@postgresql.org; Tue, 17 Feb 2015 00:38:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YNWBA-0001ma-H9 for pgsql-bugs@postgresql.org; Tue, 17 Feb 2015 00:38:26 +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 t1H0cHYV022593; Mon, 16 Feb 2015 19:38:17 -0500 From: Tom Lane To: Hugo Osvaldo Barrera cc: pgsql-bugs@postgresql.org Subject: Re: postgresql-server exiting abnormally after an OS upgrade In-reply-to: <20150216213130.GA28835@athena.barrera.io> References: <20150212224257.GA16161@athena.barrera.io> <54DDFC33.6090703@vmware.com> <20150216202138.GB20474@athena.barrera.io> <16513.1424120138@sss.pgh.pa.us> <20150216213130.GA28835@athena.barrera.io> Comments: In-reply-to Hugo Osvaldo Barrera message dated "Mon, 16 Feb 2015 18:31:30 -0300" Date: Mon, 16 Feb 2015 19:38:17 -0500 Message-ID: <22592.1424133497@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Hugo Osvaldo Barrera writes: > On 2015-02-16 15:55, Tom Lane wrote: >> Probably the reason why this was triggered by an OS upgrade is that your >> system is now choosing to make the DB connection over IPv6 not IPv4. >> Or maybe it was doing that right along but you now have a memcpy that is >> doing more checking of its arguments than before (this is evidently an >> argument sanity check and not a straight SIGSEGV). > My host has been configured to use IPv6 by default for some time now, but it > *is* possible that there has been some OS-level change during this upgrade that > affected this in some way. On further thought the answer almost certainly is that you now have a libc version in which memcpy() complains strenuously (ie, aborts) if given overlapping source and target areas. Such "helpfulness" is the new fad among libc maintainers :-( >> Anyway you could work around it for now by being sure to list IPv6 >> equivalent addresses before IPv4 addresses in your pg_hba.conf. >> We'll fix it properly in the next releases. > Do you mean IPv6 *before* IPv4? Wouldn't that add a preference to IPv6? No, not particularly, considering the cases are disjoint. An incoming connection is one or the other. > I currently have the stock out-of-the-box pg_hba: > # TYPE DATABASE USER ADDRESS METHOD > # "local" is for Unix domain socket connections only > local all all md5 > # IPv4 local connections: > host all all 127.0.0.1/32 md5 > # IPv6 local connections: > host all all ::1/128 md5 The problem comes when an incoming IPv6 connection is compared to that 127.0.0.1 line. If you're using only IPv6 anyway, you could just remove that line. Or you could do something like this: host all all ::1/128 md5 host all all ::0/0 reject host all all 127.0.0.1/32 md5 so that all IPv6 connections are either accepted or rejected before reaching the 127.0.0.1 line. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs