pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Hugo Osvaldo Barrera <hugo@barrera.io>
Cc: pgsql-bugs@postgresql.org
Subject: Re: postgresql-server exiting abnormally after an OS upgrade
Date: Mon, 16 Feb 2015 19:38:17 -0500
Message-ID: <22592.1424133497@sss.pgh.pa.us> (raw)
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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Hugo Osvaldo Barrera <hugo@barrera.io> 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



view thread (8+ messages)  latest in thread

Message-ID: <22592.1424133497@sss.pgh.pa.us>
Permalink:  ../22592.1424133497@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22592.1424133497@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, hugo@barrera.io
  Subject: Re: postgresql-server exiting abnormally after an OS upgrade
  In-Reply-To: <22592.1424133497@sss.pgh.pa.us>
  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> <22592.1424133497@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox