Re: libpq crashing on macOS during connection startup - Mailing list pgsql-general

From John DeSoi
Subject Re: libpq crashing on macOS during connection startup
Date
Msg-id 0100018c22fc6f53-68a3de31-0c8c-4305-a889-fb23b5732596-000000@email.amazonses.com
Whole thread Raw
In response to Re: libpq crashing on macOS during connection startup  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: libpq crashing on macOS during connection startup  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general

> On Nov 30, 2023, at 2:07 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> What troubles me about that stack trace is the references to Heimdal.
> We gave up supporting Heimdal (and v16 explicitly rejects building
> with it) because its support for Kerberos credentials was too
> incomplete and flaky.  So I'm inclined to guess that you are running
> into some Heimdal bug.  Try to rebuild libpq using MIT Kerberos
> and see if things get better.


I'm using v16 on my development machine and it is crashing on me at times with the same backtrace. Restarting the web
serverfixes it for a while for some reason.  

Is there a way to simply disable GSSAPI authentication? I could not find it.

The builds are from homebrew (https://brew.sh/). I'll have to see if there is a way for me to override build options.

The otool output below shows that Apple's Kerberos is being used and I assume by extension, their Heimdal library. The
Heimdalproject told me as much - Apple has a fork and would not pull from their project. 

John DeSoi, Ph.D.




$ otool -L /usr/local/opt/postgresql@16/lib/libpq.5.dylib
/usr/local/opt/postgresql@16/lib/libpq.5.dylib:
    /usr/local/opt/postgresql@16/lib/libpq.5.dylib (compatibility version 5.0.0, current version 5.16.0)
    /usr/local/opt/gettext/lib/libintl.8.dylib (compatibility version 13.0.0, current version 13.0.0)
    /usr/local/opt/openssl@3/lib/libssl.3.dylib (compatibility version 3.0.0, current version 3.0.0)
    /usr/local/opt/openssl@3/lib/libcrypto.3.dylib (compatibility version 3.0.0, current version 3.0.0)
    /usr/local/opt/krb5/lib/libgssapi_krb5.2.2.dylib (compatibility version 2.0.0, current version 2.2.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
    /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP (compatibility version 1.0.0, current version 2.4.0)

$ otool -L /usr/local/opt/krb5/lib/libgssapi_krb5.2.2.dylib
/usr/local/opt/krb5/lib/libgssapi_krb5.2.2.dylib:
    /usr/local/opt/krb5/lib/libgssapi_krb5.2.2.dylib (compatibility version 2.0.0, current version 2.2.0)
    @loader_path/libkrb5.3.3.dylib (compatibility version 3.0.0, current version 3.3.0)
    @loader_path/libk5crypto.3.1.dylib (compatibility version 3.0.0, current version 3.1.0)
    @loader_path/libcom_err.3.0.dylib (compatibility version 3.0.0, current version 3.0.0)
    @loader_path/libkrb5support.1.1.dylib (compatibility version 1.0.0, current version 1.1.0)
    /usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)

$ otool -L /usr/local/opt/krb5/lib/libkrb5.3.3.dylib
/usr/local/opt/krb5/lib/libkrb5.3.3.dylib:
    /usr/local/opt/krb5/lib/libkrb5.3.3.dylib (compatibility version 3.0.0, current version 3.3.0)
    @loader_path/libk5crypto.3.1.dylib (compatibility version 3.0.0, current version 3.1.0)
    @loader_path/libcom_err.3.0.dylib (compatibility version 3.0.0, current version 3.0.0)
    @loader_path/libkrb5support.1.1.dylib (compatibility version 1.0.0, current version 1.1.0)
    /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version
6.0.0)
    /usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)


pgsql-general by date:

Previous
From: Atul Kumar
Date:
Subject: Re: replication strange behavior
Next
From: Tom Lane
Date:
Subject: Re: libpq crashing on macOS during connection startup