Re: segmentation fault with simple UPDATE statement (postgres 10.5) - Mailing list pgsql-bugs

From Sergei Kornilov
Subject Re: segmentation fault with simple UPDATE statement (postgres 10.5)
Date
Msg-id 230361544631113@iva3-0d9a30469759.qloud-c.yandex.net
Whole thread Raw
In response to segmentation fault with simple UPDATE statement (postgres 10.5)  (Bezverhijs Eduards <Eduards.Bezverhijs@tieto.com>)
List pgsql-bugs
Hello

I can reproduce on my local PostgreSQL 10.6 (Debian 10.6-1.pgdg80+1)
But not on 11.1

GDB show backtrace:

#0  slot_getattr (slot=0x0, attnum=1, isnull=0x5585781963f8 "")
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/access/common/heaptuple.c:1143
#1  0x00005585774d72fc in ExecEvalExprSwitchContext (isNull=0x5585781963f8 "", 
    econtext=0x5585781977b8, state=<optimized out>)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/include/executor/executor.h:308
#2  ExecSetParamPlan (node=0x558578197a18, 
    econtext=econtext@entry=0x5585781977b8)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/executor/nodeSubplan.c:988
#3  0x00005585774ab928 in ExecEvalParamExec (state=state@entry=0x5585781a96d0, 
    op=op@entry=0x5585781a9798, econtext=econtext@entry=0x5585781977b8)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/executor/execExprInterp.c:1855
#4  0x00005585774ae596 in ExecInterpExpr (state=0x5585781a96d0, 
    econtext=0x5585781977b8, isnull=<optimized out>)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/executor/execExprInterp.c:1013
#5  0x00005585774d3241 in ExecEvalExprSwitchContext (isNull=0x7ffe0ab21437 "", 
    econtext=0x5585781977b8, state=0x5585781a96d0)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/include/executor/executor.h:308
#6  ExecProject (projInfo=0x5585781a96c8)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/include/executor/executor.h:342
#7  ExecResult (pstate=<optimized out>)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/executor/nodeResult.c:136
#8  0x00005585774cfcbd in ExecProcNode (node=0x558578197908)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/include/executor/executor.h:250
#9  ExecModifyTable (pstate=0x558578197418)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/executor/nodeModifyTable.c:1643
#10 0x00005585774b1d23 in ExecProcNode (node=0x558578197418)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/include/executor/executor.h:250
#11 ExecutePlan (execute_once=<optimized out>, dest=0x558578190158, 
    direction=<optimized out>, numberTuples=0, sendTuples=<optimized out>, 
    operation=CMD_UPDATE, use_parallel_mode=<optimized out>, 
    planstate=0x558578197418, estate=0x5585781961d8)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/executor/execMain.c:1723
#12 standard_ExecutorRun (queryDesc=0x558578170728, direction=<optimized out>, 
    count=0, execute_once=<optimized out>)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/executor/execMain.c:364
#13 0x00005585775ef735 in ProcessQuery (plan=<optimized out>, 
    sourceText=0x55857814f438 "UPDATE t1\n    SET (a) = (SELECT b FROM t2 WHERE t2.b = t1.a)\n    WHERE 'X' NOT IN
('Y','Z');", params=0x0, queryEnv=0x0, 
 
    dest=0x558578190158, completionTag=0x7ffe0ab218c0 "")
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/tcop/pquery.c:161
#14 0x00005585775ef98b in PortalRunMulti (portal=portal@entry=0x558578180178, 
    isTopLevel=isTopLevel@entry=1 '\001', 
    setHoldSnapshot=setHoldSnapshot@entry=0 '\000', 
    dest=dest@entry=0x558578190158, altdest=altdest@entry=0x558578190158, 
    completionTag=completionTag@entry=0x7ffe0ab218c0 "")
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/tcop/pquery.c:1286
#15 0x00005585775f0645 in PortalRun (portal=portal@entry=0x558578180178, 
    count=count@entry=9223372036854775807, 
    isTopLevel=isTopLevel@entry=1 '\001', run_once=run_once@entry=1 '\001', 
    dest=dest@entry=0x558578190158, altdest=altdest@entry=0x558578190158, 
    completionTag=0x7ffe0ab218c0 "")
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/tcop/pquery.c:799
#16 0x00005585775ec33c in exec_simple_query (
    query_string=0x55857814f438 "UPDATE t1\n    SET (a) = (SELECT b FROM t2 WHERE t2.b = t1.a)\n    WHERE 'X' NOT IN
('Y','Z');")
 
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/tcop/postgres.c:1122
#17 0x00005585775ee1cd in PostgresMain (argc=<optimized out>, 
    argv=argv@entry=0x5585780fb900, dbname=0x5585780fb7f8 "postgres", 
    username=<optimized out>)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/tcop/postgres.c:4117
#18 0x0000558577324500 in BackendRun (port=0x5585780f2060)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/postmaster/postmaster.c:4405
#19 BackendStartup (port=0x5585780f2060)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/postmaster/postmaster.c:4077
#20 ServerLoop ()
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/postmaster/postmaster.c:1755
#21 0x000055857757befd in PostmasterMain (argc=5, argv=<optimized out>)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/postmaster/postmaster.c:1363
#22 0x00005585773258eb in main (argc=5, argv=0x5585780b3760)
    at /build/postgresql-10-svt3W6/postgresql-10-10.6/build/../src/backend/main/

regards, Sergei


pgsql-bugs by date:

Previous
From: Bezverhijs Eduards
Date:
Subject: segmentation fault with simple UPDATE statement (postgres 10.5)
Next
From: Tom Lane
Date:
Subject: Re: segmentation fault with simple UPDATE statement (postgres 10.5)