Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6ozj-0007qd-IM for pgsql-general@arkaria.postgresql.org; Thu, 21 Mar 2019 04:07:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h6ozi-0003SX-7D for pgsql-general@arkaria.postgresql.org; Thu, 21 Mar 2019 04:07:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6ozh-0003SJ-Rn for pgsql-general@lists.postgresql.org; Thu, 21 Mar 2019 04:07:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6ozf-0001jM-8o for pgsql-general@postgresql.org; Thu, 21 Mar 2019 04:07:52 +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 x2L47ZoN023567; Thu, 21 Mar 2019 00:07:35 -0400 From: Tom Lane To: Thomas Munro cc: Noah Misch , Mike Yeap , Laurenz Albe , pgsql-general Subject: Re: LDAP authenticated session terminated by signal 11: Segmentation fault, PostgresSQL server terminates other active server processes In-reply-to: References: <6823.1551193055@sss.pgh.pa.us> <14938.1551220103@sss.pgh.pa.us> <20190307031954.GA1797215@rfd.leadboat.com> <20190314054254.GC2512737@rfd.leadboat.com> <20190315034631.GA2607362@rfd.leadboat.com> <31890.1553032259@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Thu, 21 Mar 2019 16:39:23 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23565.1553141255.1@sss.pgh.pa.us> Date: Thu, 21 Mar 2019 00:07:35 -0400 Message-ID: <23566.1553141255@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Munro writes: > On Wed, Mar 20, 2019 at 10:51 AM Tom Lane wrote: >> It's reasonable to assume that the proposed patch won't cause real issues >> on any modern platform, but I'm not sure we can assume that for old ones, >> so the whole thing is making me a bit nervous. > Sure, it's possible that some BF animal will fail to link the backend > for some reason that requires a bit of investigation and a follow-up > patch. Are you thinking of systems not covered by the BF? No, I'm thinking that a "followup patch" might be impossible. > Unless the server is being built with an extremely small set of > configure options enabled, it's almost certainly already linking > something that pulls in the platform's threading library (SSL, GSSAPI, > XML2, ...). Yeah, but if somebody is relying on LDAP and not any of those other things, they won't be happy. > If someone out there is not enabling any of that stuff > because their system doesn't like threads, they can use > --disable-thread-safety to avoid the effects of this change. No, that's nonsense; --disable-thread-safety only affects what happens on the frontend side. >> As far as the specifics of the patch go, I don't like that you didn't >> adjust any of the comments near pthread_is_threaded_np() usages. > Hmm. The comments seemed OK to me without adjustment, is there > something specific that bothered you? The comment at postmaster.c:1339 is very specific about how there's a problem with macOS's libintl. On the basis of that, nobody would expect that there's a need to do anything on any other platform. I think we should at least add something about how we're worried about libldap_r maybe causing the backend to become multithreaded. > The errhint about LC_ALL is > wrong though, it's macOS-specific. Yeah, but that's part and parcel with the comment. regards, tom lane