BUG #5556: "cannot drop active portal" and "ERRORDATA_STACK_SIZE exceeded" lead to server crash

From: "Robert Walker" <robwalker01(at)speedymail(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5556: "cannot drop active portal" and "ERRORDATA_STACK_SIZE exceeded" lead to server crash
Date: 2010-07-12 21:00:51
Message-ID: 201007122100.o6CL0pkk025899@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5556
Logged by: Robert Walker
Email address: robwalker01(at)speedymail(dot)org
PostgreSQL version: 9.0 beta3
Operating system: WinXP 32-bit
Description: "cannot drop active portal" and "ERRORDATA_STACK_SIZE
exceeded" lead to server crash
Details:

Since version 9.0 beta3 I've been having a problem with the backend crashing
that wasn't happening before in version 9.0 beta2.

Looking at the psql-bugs mailing list, I found two entries that might be
related:

http://archives.postgresql.org/pgsql-bugs/2010-06/msg00321.php
http://archives.postgresql.org/pgsql-bugs/2010-07/msg00022.php

The final patch introduced from the July 5th entry introduces changes that
in my situation eventually generates an error at portalmem.c line 419 (I
believe). I'm not sure where the problem is actually starting at though, as
I don't understand PostgreSQL's internals on that level. I assume it has to
do with the FOR LOOP in the plpgsql function I created using implied/unnamed
portals, and having problems with that.

The intent of what I was originally trying to do is to intentionally cause a
unique constraint violation for the sake of testing to ensure that I won't
get duplicate data in the final design. But when the unique violation
occurs, a series of other (possibly related?) errors occur that lead to the
crash.

-----------------------------------------
The following is the contents of the log:
-----------------------------------------

2010-07-12 15:23:11 CDT LOCATION: exec_simple_query,
.\src\backend\tcop\postgres.c:894
2010-07-12 15:23:25 CDT WARNING: 25P01: there is no transaction in
progress
2010-07-12 15:23:25 CDT LOCATION: EndTransactionBlock,
.\src\backend\access\transam\xact.c:3179
2010-07-12 15:23:28 CDT ERROR: 23505: duplicate key value violates unique
constraint "aisle_grid_columns_pkey"
2010-07-12 15:23:28 CDT DETAIL: Key (aisle_grid_column, aisle_id, area_id,
site_id)=(15, 1, 1, e435198e-f6b8-11dd-a076-0ba58160eb99) already exists.
2010-07-12 15:23:28 CDT CONTEXT: SQL statement "INSERT INTO
ebatt.aisle_grid_columns (

site_id,

area_id,

aisle_id,

aisle_grid_column,

aisle_zone_id,

beginning_aisle_grid_column_for_zone,

ending_aisle_grid_column_for_zone

)

VALUES (

_site_id,

_area_id,

_aisle_id,

_c.new_c,

_aisle_zone_id,

_beginning_aisle_grid_column,

_ending_aisle_grid_column

)"
PL/pgSQL function "add_aisle_zone" line 144 at SQL statement
2010-07-12 15:23:28 CDT LOCATION: _bt_check_unique,
.\src\backend\access\nbtree\nbtinsert.c:389
2010-07-12 15:23:28 CDT STATEMENT:
SELECT config.add_aisle_zone(
aisle_zone_id := 3,
aisle_id := 1,
area_id := 1,
site_id := 'e435198e-f6b8-11dd-a076-0ba58160eb99',
default_exchanger_id := 2,
current_exchanger_id := 2,
beginning_aisle_grid_column := 15,
ending_aisle_grid_column := 24,
row_height := 4,
is_safety_guarded := TRUE,
is_enabled := TRUE
);

2010-07-12 15:23:28 CDT ERROR: 24000: cannot drop active portal "<unnamed
portal 24>"
2010-07-12 15:23:28 CDT LOCATION: PortalDrop,
.\src\backend\utils\mmgr\portalmem.c:419
2010-07-12 15:23:28 CDT STATEMENT: ROLLBACK to _EXEC_SVP_00F8A1C8
2010-07-12 15:23:28 CDT ERROR: 24000: cannot drop active portal "<unnamed
portal 24>"
2010-07-12 15:23:28 CDT LOCATION: PortalDrop,
.\src\backend\utils\mmgr\portalmem.c:419
2010-07-12 15:23:28 CDT ERROR: 24000: cannot drop active portal "<unnamed
portal 24>"
2010-07-12 15:23:28 CDT LOCATION: PortalDrop,
.\src\backend\utils\mmgr\portalmem.c:419
2010-07-12 15:23:28 CDT ERROR: 24000: cannot drop active portal "<unnamed
portal 24>"
2010-07-12 15:23:28 CDT LOCATION: PortalDrop,
.\src\backend\utils\mmgr\portalmem.c:419
2010-07-12 15:23:28 CDT ERROR: 24000: cannot drop active portal "<unnamed
portal 24>"
2010-07-12 15:23:28 CDT LOCATION: PortalDrop,
.\src\backend\utils\mmgr\portalmem.c:419
2010-07-12 15:23:28 CDT PANIC: XX000: ERRORDATA_STACK_SIZE exceeded
2010-07-12 15:23:28 CDT LOCATION: errstart,
.\src\backend\utils\error\elog.c:329

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.

2010-07-12 15:23:28 CDT LOG: 00000: server process (PID 4368) exited with
exit code 3
2010-07-12 15:23:28 CDT LOCATION: LogChildExit,
.\src\backend\postmaster\postmaster.c:2812
2010-07-12 15:23:28 CDT LOG: 00000: terminating any other active server
processes
2010-07-12 15:23:28 CDT LOCATION: HandleChildCrash,
.\src\backend\postmaster\postmaster.c:2646
2010-07-12 15:23:28 CDT WARNING: 57P02: terminating connection because of
crash of another server process
2010-07-12 15:23:28 CDT 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.
2010-07-12 15:23:28 CDT HINT: In a moment you should be able to reconnect
to the database and repeat your command.
2010-07-12 15:23:28 CDT LOCATION: quickdie,
.\src\backend\tcop\postgres.c:2626
2010-07-12 15:23:28 CDT LOG: 00000: all server processes terminated;
reinitializing
2010-07-12 15:23:28 CDT LOCATION: PostmasterStateMachine,
.\src\backend\postmaster\postmaster.c:3066
2010-07-12 15:23:38 CDT FATAL: XX000: pre-existing shared memory block is
still in use
2010-07-12 15:23:38 CDT HINT: Check if there are any old server processes
still running, and terminate them.
2010-07-12 15:23:38 CDT LOCATION: PGSharedMemoryCreate,
.\src\backend\port\win32_shmem.c:194

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-07-12 23:22:12 Re: BUG #5556: "cannot drop active portal" and "ERRORDATA_STACK_SIZE exceeded" lead to server crash
Previous Message Peter Eisentraut 2010-07-12 20:21:04 Re: Bad localization in psql (french version) for Windows