pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: fjz22@mails.tsinghua.edu.cn
To: pgsql-bugs@lists.postgresql.org
Cc: ljiee@mail.tsinghua.edu.cn
Cc: wuzy21@mails.tsinghua.edu.cn
Subject:  3. PostgreSQL Server Subprocess Went down at function 'load_critical_index' and the Client Cannot Connect to the Database
Date: Fri, 14 Apr 2023 00:35:01 +0800
Message-ID: <008f01d96e25$e4bdce70$ae396b50$@mails.tsinghua.edu.cn> (raw)

Description: PostgreSQL Server Subprocess Went down at function
'load_critical_index' and the Client Cannot Connect to the Database

PostgreSQL Server Version: PostgreSQL 15.2 on x86_64-pc-linux-gnu, compiled
by Ubuntu clang version 12.0.1, 64-bit

Discoverer: Jingzhou Fu, Jie Liang and Zhiyong Wu in WingTecher Lab of
Tsinghua University and Shuimuyulin ltd

Email address: fjz22@mails.tsinghua.edu.cn  ,   wuzy21@mails.tsinghua.edu.cn
,  ljiee@mail.tsinghua.edu.cn

 

Way to Reproduce with Docker (write the poc content into file PoC.sql):

```bash

Way to Reproduce (copy the poc into file PoC.sql):

 

docker container rm some-postgres -f

docker run --name some-postgres -p 5432:5432 -e
POSTGRES_PASSWORD=mysecretpassword -d postgres:15.2

 

# wait the server start .

 

docker exec -i some-postgres psql --user=postgres < PoC.sql

docker exec -it some-postgres psql --user=postgres

 

# psql: error: connection to server on socket
"/var/run/postgresql/.s.PGSQL.5432" failed: PANIC:  could not open critical
system index 2662

```

 

PoC:

```sql

CREATE VIEW col AS SELECT * FROM pg_catalog.pg_class;

CREATE ROLE regress_execute_server_program IN ROLE
pg_execute_server_program;

ALTER TABLE col ALTER COLUMN b DROP DEFAULT,

              ALTER COLUMN y

                  SET DEFAULT ('{"This", "is", "' || foo(1) ||

                               '", "fantasy"}')::text[];

DELETE FROM col;

```

 

Backtrace:

```

#0 0x7f0e17e9400b (gsignal+0xcb)

#1 0x7f0e17e73859 (abort+0x12b)

#2 0x1c9fd9e (errfinish+0xe0e)

#3 0x1c69820 (load_critical_index+0xc0)

#4 0x1c689bb (RelationCacheInitializePhase3+0x2eb)

#5 0x1ce8270 (InitPostgres+0x1e70)

#6 0x16e69b8 (PostgresMain+0x478)

#7 0x144c17b (BackendRun+0xbb)

#8 0x144ad85 (BackendStartup+0x525)

#9 0x14481e6 (ServerLoop+0x616)

#10 0x1443e0f (PostmasterMain+0x30cf)

#11 0x106ebf2 (main+0x5a2)

#12 0x7f0e17e75083 (__libc_start_main+0xf3)

#13 0x49fc0e (_start+0x2e) 

```

 

Message-ID: <008f01d96e25$e4bdce70$ae396b50$@mails.tsinghua.edu.cn>
Permalink:  ../008f01d96e25$e4bdce70$ae396b50$@mails.tsinghua.edu.cn/
Also on:    postgresql.org/message-id/008f01d96e25$e4bdce70$ae396b50$@mails.tsinghua.edu.cn

 · 

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: fjz22@mails.tsinghua.edu.cn, pgsql-bugs@lists.postgresql.org, ljiee@mail.tsinghua.edu.cn, wuzy21@mails.tsinghua.edu.cn
  Subject: Re:  3. PostgreSQL Server Subprocess Went down at function 'load_critical_index' and the Client Cannot Connect to the Database
  In-Reply-To: <008f01d96e25$e4bdce70$ae396b50$@mails.tsinghua.edu.cn>

* 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