pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Mike Yeap <wkk1020@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-general@postgresql.org
Subject: Re: LDAP authenticated session terminated by signal 11: Segmentation fault, PostgresSQL server terminates other active server processes
Date: Wed, 13 Mar 2019 22:42:54 -0700
Message-ID: <20190314054254.GC2512737@rfd.leadboat.com> (raw)
In-Reply-To: <CA+hUKGK9VaQu7ZJXcicY17fD0Ju0wLRex75V6M-mQky2zZJZSA@mail.gmail.com>
References: <CAMVYW_6XyjFM1JCg3Rs32ocFZf_zHqhyxQcnx8mrFsnxDm-1uA@mail.gmail.com>
	<CA+hUKG+m5XbDDUNQwZB1=edGdrmm30OJHR3Dit6mMwyX-54FRg@mail.gmail.com>
	<CAMVYW_7F2=CtgDuAOjXQyOt6_h5sqyDSdJz9eBZemzSxotz86g@mail.gmail.com>
	<CA+hUKGLeWiHCwq00GbLJ0ZLfqei89L8suj1R1PGZ=niJEfaXzg@mail.gmail.com>
	<6823.1551193055@sss.pgh.pa.us>
	<CA+hUKGLuHS+FYJcMfYFo1NzfKFqyCM1Sv1y+r2Q_3LgO4QWnEQ@mail.gmail.com>
	<14938.1551220103@sss.pgh.pa.us>
	<CA+hUKG+cH_c7oBDROdLMF1k1Lt0H-UyAAm5dWxri531bGQUbeg@mail.gmail.com>
	<20190307031954.GA1797215@rfd.leadboat.com>
	<CA+hUKGK9VaQu7ZJXcicY17fD0Ju0wLRex75V6M-mQky2zZJZSA@mail.gmail.com>

On Thu, Mar 14, 2019 at 05:18:49PM +1300, Thomas Munro wrote:
> On Thu, Mar 7, 2019 at 4:19 PM Noah Misch <noah@leadboat.com> wrote:
> > Has anyone else reproduced this?
> 
> I tried, but could not reproduce this problem on "CentOS Linux release
> 7.6.1810 (Core)" using OpenLDAP "2.4.44-21.el7_6" (same as Mike
> reported, what yum install is currently serving up).

> When exiting the session, I was expecting the backend to crash,
> because it had executed libldap.so code during authentication, and
> then it had linked in libldap_r.so via libpq.so while connecting via
> postgres_fdw.  But it doesn't crash.  I wonder what is different for
> Mike; am I missing something, or is there non-determinism here?

The test is deterministic.  I'm guessing Mike's system is finding ldap
libraries other than the usual system ones.  Mike, would you check as follows?

$ echo "select pg_backend_pid(); load 'dblink'; select pg_sleep(100)" | psql -X &
[1] 2530123
  pg_backend_pid
----------------
        2530124
(1 row)

LOAD

$ gdb --batch --pid 2530124 -ex 'info sharedlibrary ldap'
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007ffff6303463 in __epoll_wait_nocancel () from /lib64/libc.so.6


view thread (27+ messages)  latest in thread

Message-ID: <20190314054254.GC2512737@rfd.leadboat.com>
Permalink:  ../20190314054254.GC2512737@rfd.leadboat.com/
Also on:    postgresql.org/message-id/20190314054254.GC2512737@rfd.leadboat.com

 · 

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-general@postgresql.org
  Cc: noah@leadboat.com, wkk1020@gmail.com, thomas.munro@gmail.com, tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at
  Subject: Re: LDAP authenticated session terminated by signal 11: Segmentation fault, PostgresSQL server terminates other active server processes
  In-Reply-To: <20190314054254.GC2512737@rfd.leadboat.com>
  References: <CAMVYW_6XyjFM1JCg3Rs32ocFZf_zHqhyxQcnx8mrFsnxDm-1uA@mail.gmail.com> <CA+hUKG+m5XbDDUNQwZB1=edGdrmm30OJHR3Dit6mMwyX-54FRg@mail.gmail.com> <CAMVYW_7F2=CtgDuAOjXQyOt6_h5sqyDSdJz9eBZemzSxotz86g@mail.gmail.com> <CA+hUKGLeWiHCwq00GbLJ0ZLfqei89L8suj1R1PGZ=niJEfaXzg@mail.gmail.com> <6823.1551193055@sss.pgh.pa.us> <CA+hUKGLuHS+FYJcMfYFo1NzfKFqyCM1Sv1y+r2Q_3LgO4QWnEQ@mail.gmail.com> <14938.1551220103@sss.pgh.pa.us> <CA+hUKG+cH_c7oBDROdLMF1k1Lt0H-UyAAm5dWxri531bGQUbeg@mail.gmail.com> <20190307031954.GA1797215@rfd.leadboat.com> <CA+hUKGK9VaQu7ZJXcicY17fD0Ju0wLRex75V6M-mQky2zZJZSA@mail.gmail.com> <20190314054254.GC2512737@rfd.leadboat.com>

* 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