Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mOMb0-0004a8-0a for pgsql-bugs@arkaria.postgresql.org; Thu, 09 Sep 2021 16:08:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mOMay-0004xn-LE for pgsql-bugs@arkaria.postgresql.org; Thu, 09 Sep 2021 16:08:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mOMay-0004xe-E0 for pgsql-bugs@lists.postgresql.org; Thu, 09 Sep 2021 16:08:12 +0000 Received: from forward501p.mail.yandex.net ([77.88.28.111]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mOMav-0003Sy-Bk for pgsql-bugs@postgresql.org; Thu, 09 Sep 2021 16:08:11 +0000 Received: from sas1-220b3000ec3a.qloud-c.yandex.net (sas1-220b3000ec3a.qloud-c.yandex.net [IPv6:2a02:6b8:c08:796:0:640:220b:3000]) by forward501p.mail.yandex.net (Yandex) with ESMTP id 9625B6212EAE; Thu, 9 Sep 2021 19:08:06 +0300 (MSK) Received: from 2a02:6b8:c08:b120:0:640:e9d1:d6a5 (2a02:6b8:c08:b120:0:640:e9d1:d6a5 [2a02:6b8:c08:b120:0:640:e9d1:d6a5]) by sas1-220b3000ec3a.qloud-c.yandex.net (mxback/Yandex) with HTTP id 58UFC83D6Ko1-85DmU6SG; Thu, 09 Sep 2021 19:08:05 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zsrv.org; s=mail; t=1631203685; bh=jV7zeu1RB6/QLEQr+LipSWBuh2YBP04deua10gnVH+Q=; h=References:Date:Message-Id:Subject:In-Reply-To:To:From; b=Av124ozCSQsVNb78nk9bP+dE77g6JBKmFmohR937Ir+ujXHknVDMUPshRlhDddp+G TvnbvS4lM0PqXj2g8XJbXK2LM6/lEWyGN0QSe5DMTQkaOTWsO3LB/jYXL2MxDqpUD5 pfB9PHjfwI9WSqMZZMMVidzdANRDchaMRF8CdgoA= Authentication-Results: sas1-220b3000ec3a.qloud-c.yandex.net; dkim=pass header.i=@zsrv.org Received: by sas2-e9d1d6a5422a.qloud-c.yandex.net with HTTP; Thu, 09 Sep 2021 19:08:05 +0300 From: Sergei Kornilov To: Tomas Barton , "pgsql-bugs@postgresql.org" In-Reply-To: References: Subject: Re: Segmentation fault on postgresql 13.4, 12.8 with function call in a cursor MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Thu, 09 Sep 2021 19:08:05 +0300 Message-Id: <215911631200653@mail.yandex.ru> Content-Transfer-Encoding: 7bit Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello I am able to reproduce on REL_13_STABLE. With assertions I got SIGABRT on COMMIT with following backtrace: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007fae23a82535 in __GI_abort () at abort.c:79 #2 0x00005598318b869a in ExceptionalCondition (conditionName=conditionName@entry=0x5598319d44ae "!TTS_EMPTY(slot)", errorType=errorType@entry=0x55983190f028 "FailedAssertion", fileName=fileName@entry=0x5598319f2007 "execTuples.c", lineNumber=lineNumber@entry=693) at assert.c:67 #3 0x000055983160788e in tts_buffer_heap_getsomeattrs (slot=0x559832aeb638, natts=) at execTuples.c:693 #4 0x000055983160a104 in slot_getsomeattrs_int (slot=slot@entry=0x559832aeb638, attnum=2) at execTuples.c:1912 #5 0x00005598315f66e7 in slot_getsomeattrs (attnum=, slot=0x559832aeb638) at ../../../src/include/executor/tuptable.h:344 #6 ExecInterpExpr (state=0x559832aec0d8, econtext=0x559832abba98, isnull=0x7ffc0d62e67f) at execExprInterp.c:482 #7 0x0000559831628da7 in ExecEvalExprSwitchContext (isNull=0x7ffc0d62e67f, econtext=0x559832abba98, state=0x559832aec0d8) at ../../../src/include/executor/executor.h:322 #8 ExecQual (econtext=0x559832abba98, state=0x559832aec0d8) at ../../../src/include/executor/executor.h:391 #9 MJFillInner (node=node@entry=0x559832abb880) at nodeMergejoin.c:494 #10 0x000055983162980e in ExecMergeJoin (pstate=0x559832abb880) at nodeMergejoin.c:1353 #11 0x00005598315fb971 in ExecProcNode (node=0x559832abb880) at ../../../src/include/executor/executor.h:248 #12 ExecutePlan (estate=estate@entry=0x559832abb630, planstate=0x559832abb880, use_parallel_mode=, operation=operation@entry=CMD_SELECT, sendTuples=sendTuples@entry=true, numberTuples=numberTuples@entry=0, direction=ForwardScanDirection, dest=0x559832ae29e0, execute_once=false) at execMain.c:1632 #13 0x00005598315fc653 in standard_ExecutorRun (queryDesc=0x559832ac50e8, direction=ForwardScanDirection, count=0, execute_once=execute_once@entry=false) at execMain.c:350 #14 0x00005598315fc71c in ExecutorRun (queryDesc=queryDesc@entry=0x559832ac50e8, direction=direction@entry=ForwardScanDirection, count=count@entry=0, execute_once=execute_once@entry=false) at execMain.c:294 #15 0x00005598315a5f23 in PersistHoldablePortal (portal=portal@entry=0x559832a1f3c8) at portalcmds.c:407 #16 0x00005598318e66f4 in HoldPortal (portal=portal@entry=0x559832a1f3c8) at portalmem.c:642 #17 0x00005598318e6fd6 in PreCommit_Portals (isPrepare=isPrepare@entry=false) at portalmem.c:738 #18 0x00005598314c0a2a in CommitTransaction () at xact.c:2087 #19 0x00005598314c18b8 in CommitTransactionCommand () at xact.c:2974 #20 0x000055983179342f in finish_xact_command () at postgres.c:2662 #21 0x000055983179590e in exec_simple_query (query_string=query_string@entry=0x5598329bdae0 "COMMIT;") at postgres.c:1264 #22 0x0000559831797b01 in PostgresMain (argc=, argv=argv@entry=0x5598329e9380, dbname=, username=) at postgres.c:4339 #23 0x0000559831706ff8 in BackendRun (port=port@entry=0x5598329e02e0) at postmaster.c:4526 #24 0x000055983170a0cd in BackendStartup (port=port@entry=0x5598329e02e0) at postmaster.c:4210 #25 0x000055983170a2e8 in ServerLoop () at postmaster.c:1739 #26 0x000055983170b7cf in PostmasterMain (argc=, argv=) at postmaster.c:1412 #27 0x0000559831654b68 in main (argc=3, argv=0x5598329b8200) at main.c:210 Git bisect points me to a c1fd756fd23f60fcac120c9cd36de2921144e3bd commit ( https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=c1fd756fd23f60fcac120c9cd36de2921144e3bd ) regards, Sergei