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 1h4J91-0007WN-AC for pgsql-general@arkaria.postgresql.org; Thu, 14 Mar 2019 05:43:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h4J8x-0001ae-LW for pgsql-general@arkaria.postgresql.org; Thu, 14 Mar 2019 05:43:03 +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 1h4J8w-0001Vr-S7 for pgsql-general@lists.postgresql.org; Thu, 14 Mar 2019 05:43:03 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4J8t-00068T-Ce for pgsql-general@postgresql.org; Thu, 14 Mar 2019 05:43:01 +0000 Received: by mail-pf1-x441.google.com with SMTP id j5so3102604pfa.2 for ; Wed, 13 Mar 2019 22:42:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=EIiNf/XiPiqBkau4epeYQFfBo6uLgeZlVDnQJ23X7Iw=; b=JAZXjLJNk9wxYlqo3lnhvZTSBNXi6SEaCLQjw2pbVHefHHH33Ukxvqi0IoTw24oYJh gc6VZQ7vTJFzacCFk/xV4lRKrzFv6/hfyxgfUsV55EGCnzCMg/zZv/IoZxS2WM3ox19F SWjTJ6YHyz0L4PTMuN3WkzS03KJPU4TLhHh6E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=EIiNf/XiPiqBkau4epeYQFfBo6uLgeZlVDnQJ23X7Iw=; b=RPbR4GViRwctJ1qUTjIs482TBuzuBfheEB1PWImr+M/m9az54RyGMrMgOr+r71HnCn qWqok93d/1Onb7UHF3S6+VSGtthPtAPszTHN2acnL5/1bqtF45CTP4+IrPVd8MLXw7ML gwPp3wnaLcajtceWf9++MZVE1j4E/2QLJtoFEbIYAO3LUseSoCJnvaGM9sy/HdTnNLmo lkEmqL9tDdW9/eLY306OiNN9D8vYaENS3WdsT+VdS4qV0nX5wFyFLI4+waB26t3KINRj GORHKBOuHn9VCQ8PgqO9wZj/bLWn4Ctesvgu4V8MIIyLW/Nc2qtv/AzuER+UAOwgsFwh DRlA== X-Gm-Message-State: APjAAAWfD44sz95x9sG2WN1t0t0qhkiXBjZ9blA8zn+vD6qnxDAFx6ZO q6Nbav/A2BlLaaR/jDxT7SC8cw== X-Google-Smtp-Source: APXvYqzHB24PwioATpyjsr+jncwFZefnWLYDTBcs3EDKFnKy0u3zOywe4K2aO4AG/Qq8fkfA3Qp70g== X-Received: by 2002:a63:c0e:: with SMTP id b14mr43650631pgl.236.1552542178244; Wed, 13 Mar 2019 22:42:58 -0700 (PDT) Received: from rfd.leadboat.com (108-233-125-46.lightspeed.sntcca.sbcglobal.net. [108.233.125.46]) by smtp.gmail.com with ESMTPSA id v8sm18946318pfm.174.2019.03.13.22.42.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Mar 2019 22:42:57 -0700 (PDT) Date: Wed, 13 Mar 2019 22:42:54 -0700 From: Noah Misch To: Mike Yeap , Thomas Munro Cc: Tom Lane , Laurenz Albe , pgsql-general@postgresql.org Subject: Re: LDAP authenticated session terminated by signal 11: Segmentation fault, PostgresSQL server terminates other active server processes Message-ID: <20190314054254.GC2512737@rfd.leadboat.com> References: <6823.1551193055@sss.pgh.pa.us> <14938.1551220103@sss.pgh.pa.us> <20190307031954.GA1797215@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Mar 14, 2019 at 05:18:49PM +1300, Thomas Munro wrote: > On Thu, Mar 7, 2019 at 4:19 PM Noah Misch 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