Segmentation fault on FreeBSD with GSSAPI authentication

From: Michał Kłeczek <michal(at)kleczek(dot)org>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Segmentation fault on FreeBSD with GSSAPI authentication
Date: 2024-01-27 12:45:23
Message-ID: 01704B7E-9948-4926-AD7D-D76C55FCF02A@kleczek.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi All,

I am trying to use GSSAPI (Kerberos auth) on FreeBSD.

After several attempts I was able to build PostgreSQL 16 from FreeBSD ports with GSSAPI support. The steps were:
1. Uninstall Heimdal
2. Install krb5 (MIT Kerberos)
3. Build Pg with GSSAPI support

I configured pg_hba.conf to require GSSAPI authentication for one of the users.

When trying to connect using “psql -h postgres” (postgres is the name of the host) I get:

psql: error: connection to server at “postgres.[domainname]” ([ipaddress]), port 5432 failed: connection to server at “postgres.[domainname]” ([ipaddress]), port 5432 failed: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

Configured Pg to debug log and here are the relevant syslog entries:

an 27 13:33:45 postgres postgres[61605]: [36-1] 2024-01-27 13:33:45.779 CET [61605] DEBUG: forked new backend, pid=61626 socket=10
Jan 27 13:33:45 postgres postgres[61605]: [37-1] 2024-01-27 13:33:45.786 CET [61605] DEBUG: forked new backend, pid=61627 socket=10
Jan 27 13:33:45 postgres postgres[61605]: [38-1] 2024-01-27 13:33:45.786 CET [61605] DEBUG: reaping dead processes
Jan 27 13:33:45 postgres postgres[61605]: [39-1] 2024-01-27 13:33:45.787 CET [61605] DEBUG: server process (PID 61626) was terminated by signal 11: Segmentation fault
Jan 27 13:33:45 postgres postgres[61605]: [40-1] 2024-01-27 13:33:45.787 CET [61605] LOG: server process (PID 61626) was terminated by signal 11: Segmentation fault
Jan 27 13:33:45 postgres postgres[61605]: [41-1] 2024-01-27 13:33:45.787 CET [61605] LOG: terminating any other active server processes
Jan 27 13:33:45 postgres postgres[61605]: [42-1] 2024-01-27 13:33:45.787 CET [61605] DEBUG: sending SIGQUIT to process 61611
Jan 27 13:33:45 postgres postgres[61605]: [43-1] 2024-01-27 13:33:45.787 CET [61605] DEBUG: sending SIGQUIT to process 61627
Jan 27 13:33:45 postgres postgres[61605]: [44-1] 2024-01-27 13:33:45.787 CET [61605] DEBUG: sending SIGQUIT to process 61607
Jan 27 13:33:45 postgres postgres[61605]: [45-1] 2024-01-27 13:33:45.787 CET [61605] DEBUG: sending SIGQUIT to process 61606
Jan 27 13:33:45 postgres postgres[61605]: [46-1] 2024-01-27 13:33:45.787 CET [61605] DEBUG: sending SIGQUIT to process 61609
Jan 27 13:33:45 postgres postgres[61605]: [47-1] 2024-01-27 13:33:45.787 CET [61605] DEBUG: sending SIGQUIT to process 61610
Jan 27 13:33:45 postgres postgres[61605]: [48-1] 2024-01-27 13:33:45.789 CET [61605] DEBUG: reaping dead processes
Jan 27 13:33:45 postgres postgres[61605]: [49-1] 2024-01-27 13:33:45.789 CET [61605] DEBUG: server process (PID 61627) exited with exit code 2

I am not familiar enough with FreeBSD to be able to gather any crash dumps or backtraces, I am afraid.

--
Michal

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-01-27 14:43:01 Re: Segmentation fault on FreeBSD with GSSAPI authentication
Previous Message Jelte Fennema-Nio 2024-01-27 09:24:12 Re: proposal: psql: show current user in prompt