Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables

From: Jeremy Evans <code(at)jeremyevans(dot)net>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables
Date: 2018-09-07 17:55:18
Message-ID: 20180907175518.GI17425@jeremyevans.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 09/07 09:51, Jeremy Evans wrote:
> I hadn't yet had time to install debug symbols on the production server,
> but since I think I have a better idea on how to recreate this issue, I
> will try recreating this on a test cluster with debug symbols.

Thankfully, I was able to recreate this on a test server with debug
symbols, by using \watch in psql to run the foreign query while running
the database changes on a separate database in a loop.

Here's the backtrace:

#1 0x000017c254721a8e in _libc_abort () at /usr/src/lib/libc/stdlib/abort.c:51
#2 0x000017c2547303b9 in wrterror (d=Variable "d" is not available.) at /usr/src/lib/libc/stdlib/malloc.c:288
#3 0x000017c2547306df in ofree (argpool=Variable "argpool" is not available.) at /usr/src/lib/libc/stdlib/malloc.c:1298
#4 0x000017c254730499 in free (ptr=0x17c1ee153398) at /usr/src/lib/libc/stdlib/malloc.c:1416
#5 0x000017c20a6b8b00 in pg_fe_scram_free (opaq=0x17c223712000) at fe-auth-scram.c:127
#6 0x000017c20a6b9d20 in pqDropConnection (conn=0x17c1dac61800, flushInput=1 '\001') at fe-connect.c:479
#7 0x000017c20a6bf95e in closePGconn (conn=0x17c1dac61800) at fe-connect.c:3710
#8 0x000017c20a6ba230 in PQfinish (conn=0x17c1dac61800) at fe-connect.c:3731
#9 0x000017c2c276a838 in disconnect_pg_server (entry=0x17c25b118658) at connection.c:312
#10 0x000017c2c2769dba in GetConnection (user=0x17c2c2285c50, will_prep_stmt=0 '\0') at connection.c:169
#11 0x000017c2c275c597 in postgresBeginForeignScan (node=0x17c2d8b18028, eflags=16) at postgres_fdw.c:1325
#12 0x000017bfd91aaa24 in ExecInitForeignScan (node=0x17c26c166408, estate=0x17c2d8b17038, eflags=16) at nodeForeignscan.c:231
#13 0x000017bfd9177f9a in ExecInitNode (node=0x17c26c166408, estate=0x17c2d8b17038, eflags=16) at execProcnode.c:277
#14 0x000017bfd9190f84 in ExecInitHashJoin (node=0x17c26c16a050, estate=0x17c2d8b17038, eflags=16) at nodeHashjoin.c:433
#15 0x000017bfd917800a in ExecInitNode (node=0x17c26c16a050, estate=0x17c2d8b17038, eflags=16) at execProcnode.c:300
#16 0x000017bfd91a4ae0 in ExecInitSort (node=0x17c26c168c50, estate=0x17c2d8b17038, eflags=16) at nodeSort.c:207
#17 0x000017bfd9178042 in ExecInitNode (node=0x17c26c168c50, estate=0x17c2d8b17038, eflags=16) at execProcnode.c:313
#18 0x000017bfd917114b in InitPlan (queryDesc=0x17c1e8fce038, eflags=16) at execMain.c:1045
#19 0x000017bfd9170920 in standard_ExecutorStart (queryDesc=0x17c1e8fce038, eflags=16) at execMain.c:264
#20 0x000017bfd91706ee in ExecutorStart (queryDesc=0x17c1e8fce038, eflags=0) at execMain.c:152
#21 0x000017bfd935a604 in PortalStart (portal=0x17c1dac5f038, params=0x0, eflags=0, snapshot=0x0) at pquery.c:520
#22 0x000017bfd935682d in exec_simple_query ( query_string=0x17c1dbf45038 "SELECT "...) at postgres.c:1060
#23 0x000017bfd9355d13 in PostgresMain (argc=1, argv=0x17c2460a1180, dbname=0x17c2528b2ff8 "bsawww", username=0x17c2528b2fc8 "recommendations_public") at postgres.c:4088
#24 0x000017bfd92adb29 in BackendRun (port=0x17c2bf214800) at postmaster.c:4405
#25 0x000017bfd92aceb3 in BackendStartup (port=0x17c2bf214800) at postmaster.c:4077
#26 0x000017bfd92abf3a in ServerLoop () at postmaster.c:1755
#27 0x000017bfd92a9b46 in PostmasterMain (argc=3, argv=0x7f7ffffc1c58) at postmaster.c:1363
#28 0x000017bfd91d6f57 in main (argc=3, argv=0x7f7ffffc1c58) at main.c:228

Hopefully this helps. If you need more information, please let me know.

Thanks,
Jeremy

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2018-09-07 18:15:22 Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables
Previous Message Jeremy Evans 2018-09-07 16:51:03 Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables