Ways to crash the backend

From: Michael Bussmann <bus(at)fgan(dot)de>
To: hackers(at)postgreSQL(dot)org
Subject: Ways to crash the backend
Date: 1998-03-28 12:02:33
Message-ID: 19980328130233.41661@goliath.mb.priv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi there!

Please forgive my affords in making the backend crash (this time postgres
6.3.1), seems I've got too much spare time :-)

a)

SELECT DISTINCT * from x2 UNION SELECT * FROM x2;

crashes the backend and corrupts shmem, so that other connections break
too, if x2 is a view returning NULL values

E.g.:
postgres=> create table x (i int4, j int4);
CREATE
postgres=> create view x2 as select j from x;
CREATE
postgres=> insert into x values (1,2);
INSERT 144128 1
postgres=> insert into x values (3);
INSERT 144129 1
postgres=> insert into x values (NULL,4);
INSERT 144130 1
postgres=> select * from x;
i|j
-+-
1|2
3|
|4
(3 rows)

postgres=> select distinct * from x2 union select * from x2;
PQexec() -- Request was sent to backend, but backend closed the channel
before responding.
This probably means the backend terminated abnormally before or
while processing the request.
(The second x2 can also be other table)

b)
Another way is to remove the table a view is based upon, e.g.

postgres=> create table x (i int);
CREATE
postgres=> create view x2 as select * from x;
CREATE
postgres=> drop table x;
DROP
postgres=> select * from x2;
PQexec() -- Request was sent to backend, but b...

Best regards,
MB

--
Michael Bussmann <bus(at)fgan(dot)de> [Tel.: +49 228 9435 211; Fax: +49 228 348953]
"It's still the same old story, a fight for love and glory,
A case of do or die, The world will always welcome lovers, as time goes by."

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mattias Kregert 1998-03-28 13:05:11 Modules
Previous Message Bruce Momjian 1998-03-28 02:13:09 pgindent on odbc