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

Поиск
Список
Период
Сортировка
От
Тема 3. PostgreSQL Server Subprocess Went down at function 'load_critical_index' and the Client Cannot Connect to the Database
Дата
Msg-id 008f01d96e25$e4bdce70$ae396b50$@mails.tsinghua.edu.cn
обсуждение исходный текст
Список pgsql-bugs

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)

```

 

В списке pgsql-bugs по дате отправления:

Предыдущее
От:
Дата:
Сообщение: 2. PostgreSQL Server Subprocess Went down at function 'datumTransfer'
Следующее
От:
Дата:
Сообщение: 4. PostgreSQL Server Subprocess Went down at function 'pg_detoast_datum'