pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: dcb.bandos@gmail.com
Subject: BUG #16711: Access violation exception when call procedure
Date: Thu, 12 Nov 2020 08:00:52 +0000
Message-ID: <16711-1ba7b36fd012d7fa@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      16711
Logged by:          Dmitry Vasilyev
Email address:      dcb.bandos@gmail.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



Message-ID: <16711-1ba7b36fd012d7fa@postgresql.org>
Permalink:  ../16711-1ba7b36fd012d7fa@postgresql.org/
Also on:    postgresql.org/message-id/16711-1ba7b36fd012d7fa@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, dcb.bandos@gmail.com
  Subject: Re: BUG #16711: Access violation exception when call procedure
  In-Reply-To: <16711-1ba7b36fd012d7fa@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox