Re: BUG #18974: Postgresql repeatable crash after pg_upgrade from 15 to 17.5 version in postgresql_fdw queries

From: Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>
To: maxim(dot)boguk(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18974: Postgresql repeatable crash after pg_upgrade from 15 to 17.5 version in postgresql_fdw queries
Date: 2025-07-02 00:03:00
Message-ID: CAK-MWwT683+wrt+twkRMLedMN_6y7Lj4k7CXr7sSHCV_GO5iLA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Jul 2, 2025 at 1:09 AM PG Bug reporting form <noreply(at)postgresql(dot)org>
wrote:

> The following bug has been logged on the website:
>
> Bug reference: 18974
> Logged by: Maxim Boguk
> Email address: maxim(dot)boguk(at)gmail(dot)com
> PostgreSQL version: 17.5
> Operating system: Ubuntu
> Description:
>
> Postgresql repeatable crash after pg_upgrade from 15 to 17.5 version in
> postgresql_fdw timeouted (via query_timeout) queries
> Backtrace data from core file:
> Core was generated by `postgres: 17/main: **.app **_data [local] SELECT
> '.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0 __strcmp_evex () at ../sysdeps/x86_64/multiarch/strcmp-evex.S:314
> warning: 314 ../sysdeps/x86_64/multiarch/strcmp-evex.S: No such file or
> directory
> (gdb) bt
> #0 __strcmp_evex () at ../sysdeps/x86_64/multiarch/strcmp-evex.S:314
> #1 0x0000780820fd2df7 in emitHostIdentityInfo (conn=0x5d89b19f6d80,
> host_addr=0x7ffd34c50c70 "10.100.103.4") at
>

(gdb) print ((PGconn *)0x5d89b19f6d80)->connhost[0]
$14 = {type = CHT_HOST_NAME, host = 0x0, hostaddr = 0x5d89b19c53b0
"10.100.103.4", port = 0x5d89b19c5390 "6503", password = 0x0}
As a result displayed_host = conn
<https://doxygen.postgresql.org/streamutil_8c.html#af4516154f33e07be1eadff88fab71465>
->connhost
<https://doxygen.postgresql.org/structpg__conn.html#af613581f3bb3ef9a64acf0346c3cd92b>
[conn
<https://doxygen.postgresql.org/streamutil_8c.html#af4516154f33e07be1eadff88fab71465>
->whichhost
<https://doxygen.postgresql.org/structpg__conn.html#aef258b7f6a1d241b2fad5728aa08a1ef>
].host
<https://doxygen.postgresql.org/structpg__conn__host.html#a112de1e777da00724075fe6f65aaf3be>
=
0x0
and crash in line strcmp(displayed_host, host_addr) != 0

related FDW definition:
FDW options | ( dbname '****', hostaddr '10.100.103.4', port
'6503')

--
Maxim Boguk
Senior Postgresql DBA

Phone UA: +380 99 143 0000
Phone AU: +61 45 218 5678

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andy Fan 2025-07-02 01:42:32 Re: BUG #16931: source code problem about commit_ts
Previous Message PG Bug reporting form 2025-07-01 23:10:12 BUG #18975: PostgreSQL server doesn't process SQL request correctly over Windows replica of Linux server