BUG #16711: Access violation exception when call procedure

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: dcb(dot)bandos(at)gmail(dot)com
Subject: BUG #16711: Access violation exception when call procedure
Date: 2020-11-12 08:00:52
Message-ID: 16711-1ba7b36fd012d7fa@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16711
Logged by: Dmitry Vasilyev
Email address: dcb(dot)bandos(at)gmail(dot)com
PostgreSQL version: 13.0
Operating system: Windows 10
Description:

I have a procedure:
CREATE OR REPLACE PROCEDURE TestingRollbackProc(_id uuid, _title text)
AS $$
begin
INSERT INTO testtable values(_id, _title);
ROLLBACK;
end
$$ language plpgsql;

When I've called this procedure(Npgsql 4.1.4) I got an Access violation
0xC0000005 exception

call TestingRollbackProc(uuid_generate_v4(), 'asdf')

2020-11-11 14:33:13.873 CET [6800] LOG: server process (PID 34208) was
terminated by exception 0xC0000005
2020-11-11 14:33:13.873 CET [6800] DETAIL: Failed process was running: CALL
"testingrollbackproc"($1,$2)
2020-11-11 14:33:13.873 CET [6800] HINT: See C include file "ntstatus.h"
for a description of the hexadecimal value.
2020-11-11 14:33:13.875 CET [6800] LOG: terminating any other active server
processes
2020-11-11 14:33:13.877 CET [42964] WARNING: terminating connection because
of crash of another server process
2020-11-11 14:33:13.877 CET [42964] DETAIL: The postmaster has commanded
this server process to roll back the current transaction and exit, because
another server process exited abnormally and possibly corrupted shared
memory.
2020-11-11 14:33:13.877 CET [42964] HINT: In a moment you should be able to
reconnect to the database and repeat your command.
2020-11-11 14:33:13.877 CET [5356] WARNING: terminating connection because
of crash of another server process
2020-11-11 14:33:13.877 CET [5356] DETAIL: The postmaster has commanded
this server process to roll back the current transaction and exit, because
another server process exited abnormally and possibly corrupted shared
memory.
2020-11-11 14:33:13.877 CET [5356] HINT: In a moment you should be able to
reconnect to the database and repeat your command.

call stack:
> postgres.exe!PortalRunMulti(PortalData * portal, bool isTopLevel, bool
setHoldSnapshot, _DestReceiver * dest, _DestReceiver * altdest,
QueryCompletion * qc) Line 1319 C
postgres.exe!PortalRun(PortalData * portal, long count, bool isTopLevel,
bool run_once, _DestReceiver * dest, _DestReceiver * altdest,
QueryCompletion * qc) Line 783 C
postgres.exe!exec_execute_message(const char * portal_name, long max_rows)
Line 2203 C
postgres.exe!PostgresMain(int argc, char * * argv, const char * dbname,
const char * username) Line 4378 C
[Inline Frame] postgres.exe!BackendRun(Port *) Line 4536 C
postgres.exe!SubPostmasterMain(int argc, char * * argv) Line 5059 C
postgres.exe!main(int argc, char * * argv) Line 198 C
[Inline Frame] postgres.exe!invoke_main() Line 78 C++
postgres.exe!__scrt_common_main_seh() Line 283 C++
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown

pquery.c:
/*
* Increment command counter between queries, but not after the last
* one.
*/
if (lnext(portal->stmts, stmtlist_item) != NULL)
CommandCounterIncrement();

portal->stmts is nullptr

Browse pgsql-bugs by date

  From Date Subject
Next Message Kieran McCusker 2020-11-12 10:16:44 Problem with gdal
Previous Message Dave Cramer 2020-11-11 23:24:02 Re: spring context cannot load when I use postgres 42.2.15 or higher