WG: [GENERAL] reproducible database crash with simple sql command on postgres 8.3.1

Lists: pgsql-bugspgsql-general
From: <Christian(dot)Strobl(at)dlr(dot)de>
To: <pgsql-general(at)postgresql(dot)org>
Subject: reproducible database crash with simple sql command on postgres 8.3.1
Date: 2008-05-09 08:31:48
Message-ID: AC78B6BABBC9A74C95028F87A0EACF79015BBFCB@exbe04.intra.dlr.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-general


hi all,

first i create a table
create table regions (id integer, name varchar);

then i want to set a default value for a column, e.g.
alter table regions alter column name set default 'bavaria';

at this point crashes the database with the message

PANIK: ERROR_STACK_SIZE exceeded

the rest of the message is unfortunately in german then i have to
restart the postgres-service manually this error is very easy
reproducible at my environment

is this a problem of my installation or can anybody reproduce this error
at his environment

thanks and greetings from munich
christian

p.s. os windows xp, sp2
postgres 8.3.1, visual c++, build 1400


From: "josep porres" <jmporres(at)gmail(dot)com>
To: Christian(dot)Strobl(at)dlr(dot)de
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: reproducible database crash with simple sql command on postgres 8.3.1
Date: 2008-05-09 09:41:26
Message-ID: d2d532610805090241r4a66076cwc8af1306cc2c3934@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-general

No problems here.

create table regions (id integer, name varchar);
alter table regions alter column name set default 'bavaria';

PostgreSQL 8.3.1 vc++ build 1400 xp sp2

# - Memory -

shared_buffers = 32MB # min 128kB or max_connections*16kB
# (change requires restart)
#temp_buffers = 8MB # min 800kB
temp_buffers = 8MB # min 800kB

#max_prepared_transactions = 5 # can be 0 or more
# (change requires restart)
# Note: Increasing max_prepared_transactions costs ~600 bytes of shared
memory
# per transaction slot, plus lock space (see max_locks_per_transaction).
#work_mem = 1MB # min 64kB
work_mem = 2MB # min 64kB
#maintenance_work_mem = 16MB # min 1MB
maintenance_work_mem = 32MB # min 1MB
max_stack_depth = 2MB # min 100kB

cheers

Josep

2008/5/9 <Christian(dot)Strobl(at)dlr(dot)de>:

>
> hi all,
>
> first i create a table
> create table regions (id integer, name varchar);
>
> then i want to set a default value for a column, e.g.
> alter table regions alter column name set default 'bavaria';
>
> at this point crashes the database with the message
>
> PANIK: ERROR_STACK_SIZE exceeded
>
> the rest of the message is unfortunately in german then i have to
> restart the postgres-service manually this error is very easy
> reproducible at my environment
>
> is this a problem of my installation or can anybody reproduce this error
> at his environment
>
> thanks and greetings from munich
> christian
>
> p.s. os windows xp, sp2
> postgres 8.3.1, visual c++, build 1400
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christian(dot)Strobl(at)dlr(dot)de
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: reproducible database crash with simple sql command on postgres 8.3.1
Date: 2008-05-09 14:18:37
Message-ID: 13434.1210342717@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-general

<Christian(dot)Strobl(at)dlr(dot)de> writes:
> PANIK: ERROR_STACK_SIZE exceeded

> the rest of the message is unfortunately in german then i have to
> restart the postgres-service manually this error is very easy
> reproducible at my environment

What this typically means is that you've got an encoding/locale
configuration problem. The thing is trying to report some error
or other, and it discovers that the error text is badly encoded
according to the current database encoding, and it tries to
report that, only *that* error text is badly encoded too, so
it tries to report that, getting another error, etc, until the
error recovery stack overflows.

The hope of getting rid of this scenario is one reason why we locked
down encoding/locale combinations in 8.3, so I'm disappointed that
you're still able to make it happen. You didn't say what settings
you are using though. Could we see

show lc_messages;
show lc_ctype;
show server_encoding;
show client_encoding;

regards, tom lane


From: <Christian(dot)Strobl(at)dlr(dot)de>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: WG: [GENERAL] reproducible database crash with simple sql command on postgres 8.3.1
Date: 2008-05-17 20:05:19
Message-ID: AC78B6BABBC9A74C95028F87A0EACF7911ABF5@exbe04.intra.dlr.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-general

ok

regards christian


________________________________

Please forward this info to pgsql-bugs. I don't have a Windows machine
so I can't look into it myself.

regards, tom lane

________________________________

Von: Strobl, Christian
Gesendet: Fr 16.05.2008 17:42
An: Tom Lane
Betreff: AW: [GENERAL] reproducible database crash with simple sql command on postgres 8.3.1


hi tom,

please excuse my delayed answer, but i wasn't in the office and i undertook some additional testing

1) postgres=# show lc_messages;
lc_messages
-----------------------
English_United States
(1 Zeile)

formerly it was German_Germany. but also if i change to English_United States with

set lc_messages = 'English_United States'

there is no change in the language of the messages, also after a complete deinstallation-installation-process with english as default the language in the shell (dosbox and powershell) is still german. for me this seems very strange.

2) postgres=# show lc_ctype;
lc_ctype
----------------------------
English_United States.1252
(1 Zeile)

3) postgres=# show server_encoding;
server_encoding
-----------------
UTF8
(1 Zeile)

4a) postgres=# show client_encoding;
client_encoding
-----------------
win1252
(1 Zeile)

now to the really strange behaviour: with win 1252 (or latin 1) i can use german special characters for example in insert-statements (i changed in the shell also the codepage to windows 1252 with chcp 1252)

create table test (name varchar);
insert into test (name) values ('äöü');
select * from test;

name
------
abc
äöü
äöü
(3 Zeilen)

as far as good. but if i make some mistake with psql for example

x;

i get the follwing message

postgres=# x;
PANIK: ERRORDATA_STACK_SIZE exceeded
Server beendete die Verbindung unerwartet
Das heißt wahrscheinlich, daß der Server abnormal beendete
bevor oder während die Anweisung bearbeitet wurde.
Die Verbindung zum Server wurde verloren. Versuche Reset: Fehlgeschlagen.

the worst is that also the is now down and has to be restarted


4b) postgres=# show client_encoding;
client_encoding
-----------------
UTF8
(1 Zeile)

now its not possible to insert german special characters with sql-statements

the follwing statement

insert into test (name) values ('äöü');

gives the follwing error message

postgres=# insert into test (name) values ('äöü');
FEHLER: ungültige Byte-Sequenz für Kodierung »UTF8«: 0xe4f6fc
TIP: Dieser Fehler kann auch auftreten, wenn die Bytesequenz nicht mit der Kodierung übereinstimmt, die der Server
erwartet, welche durch »client_encoding« bestimmt wird.

but wrong statements are correctly processed by psql

postgres=# x;
FEHLER: Syntaxfehler bei »x«
ZEILE 1: x;

thats the things i collected with this problem

thanks and greetings from munich
christian

p.s. i don't know if you can see the german special characters at your email client. these are the letters for ae, oe and ue
p.p.s. without a exact explanation my impression is that the wole thing is working better with pgadmin III but also not without some problems
p.p.p.s if you are interested i can also send you some log-files but for example the install log file is quite large (> 4MB)






________________________________

Von: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Gesendet: Fr 09.05.2008 16:18
An: Strobl, Christian
Cc: pgsql-general(at)postgresql(dot)org
Betreff: Re: [GENERAL] reproducible database crash with simple sql command on postgres 8.3.1

<Christian(dot)Strobl(at)dlr(dot)de> writes:
> PANIK: ERROR_STACK_SIZE exceeded

> the rest of the message is unfortunately in german then i have to
> restart the postgres-service manually this error is very easy
> reproducible at my environment

What this typically means is that you've got an encoding/locale
configuration problem. The thing is trying to report some error
or other, and it discovers that the error text is badly encoded
according to the current database encoding, and it tries to
report that, only *that* error text is badly encoded too, so
it tries to report that, getting another error, etc, until the
error recovery stack overflows.

The hope of getting rid of this scenario is one reason why we locked
down encoding/locale combinations in 8.3, so I'm disappointed that
you're still able to make it happen. You didn't say what settings
you are using though. Could we see

show lc_messages;
show lc_ctype;
show server_encoding;
show client_encoding;

regards, tom lane