Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbQl1-0005Hc-Om for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Sep 2015 10:13:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZbQl1-0008GU-6D for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Sep 2015 10:13:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZbQl0-0008Fk-Bc for pgsql-bugs@postgresql.org; Mon, 14 Sep 2015 10:13:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZbQkx-0003qw-MX for pgsql-bugs@postgresql.org; Mon, 14 Sep 2015 10:13:05 +0000 MIME-Version: 1.0 Subject: BUG #13618: terminated by exception 0xC0000005 To: pgsql-bugs@postgresql.org From: eelke@bolt.nl Date: Mon, 14 Sep 2015 10:12:49 +0000 Message-ID: <20150914101249.2680.11397@wrigleys.postgresql.org> X-Pg-Spam-Score: -0.9 (/) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13618 Logged by: Eelke Klein Email address: eelke@bolt.nl PostgreSQL version: 9.5alpha2 Operating system: Windows 7 Profession 64 bits Description: Using the installer provided by enterprise DB for the 64-bits version of 9.5alpha2 the server crashing when the script below is run doesn't matter if I connect to a populated database or a newly created empty database. I have done my best to remove all code from the original script that isn't needed to trigger the error. The crash goes away when you either simplify the first code block to do a simple RAISE NOTICE 'Hello'; or when you remove the declartion of the text variable in pg_temp.RandomString or when you remove the call password := pg_temp.RandomString(12); in the last code block. BEGIN; DO $CODE$ DECLARE versie text := '1.7'; BEGIN RAISE NOTICE 'Dit is versie % van het rechten-script.', versie; END $CODE$; CREATE OR REPLACE FUNCTION pg_temp.RandomString(length integer) RETURNS text AS $CODE$ DECLARE chars text[] := '{2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,P,Q,R,S,T,U,W,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,m,n,o,p,q,r,s,t,u,w,x,y,z}'; BEGIN RETURN 'bar'; END; $CODE$ LANGUAGE plpgsql; DO $CODE$ DECLARE password varchar; BEGIN password := pg_temp.RandomString(12); END $CODE$; COMMIT; Relevant part of the log: 2015-09-14 12:03:12 CEST LOG: server process (PID 8108) was terminated by exception 0xC0000005 2015-09-14 12:03:12 CEST DETAIL: Failed process was running: BEGIN; DO $CODE$ DECLARE versie text := '1.7'; BEGIN RAISE NOTICE 'Dit is versie % van het rechten-script.', versie; END $CODE$; CREATE OR REPLACE FUNCTION pg_temp.RandomString(length integer) RETURNS text AS $CODE$ DECLARE chars text[] := '{2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,P,Q,R,S,T,U,W,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,m,n,o,p,q,r,s,t,u,w,x,y,z}'; BEGIN RETURN 'bar'; END; $CODE$ LANGUAGE plpgsql; DO $CODE$ DECLARE password varchar; BEGIN password := pg_temp.RandomString(12); END $CODE$; COMMIT; 2015-09-14 12:03:12 CEST HINT: See C include file "ntstatus.h" for a description of the hexadecimal value. 2015-09-14 12:03:12 CEST LOG: terminating any other active server processes 2015-09-14 12:03:12 CEST WARNING: terminating connection because of crash of another server process 2015-09-14 12:03:12 CEST 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. 2015-09-14 12:03:12 CEST HINT: In a moment you should be able to reconnect to the database and repeat your command. 2015-09-14 12:03:12 CEST LOG: all server processes terminated; reinitializing 2015-09-14 12:03:22 CEST FATAL: pre-existing shared memory block is still in use 2015-09-14 12:03:22 CEST HINT: Check if there are any old server processes still running, and terminate them. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs