[Bug] - seg1 ERROR 58P01 could not open file base/: No such file or directory md.c 549

Ouverte
#2,283 7 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 2 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
c, postgresql
Domaine
databases

Piste de recherche

Start by tracing the reported pg_relation_size failure through the md.c paths named in the stack traces, then inspect how the missing relation file is handled during checkpoint writes. The report includes no reproduction steps, source locations beyond md.c, or test to run. Done means identifying and fixing the cause so a missing relation file during a size lookup does not leave checkpointing and WAL cleanup stuck; the issue provides no way to verify this yet.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

type: Bug
Apache Cloudberry version

PostgreSQL 14.4 (Apache Cloudberry 2.1.0-incubating build dev) on x86_64-pc-linux-gnu, compiled by gcc (Astra 1.8.2) , 64-bit compiled

What happened

Hi,

We are created a testing Cloudberry DB 2.1 cluster for testing high load procedures (QC 2, QE7, 28 Primary segment without Mirrors)

And on some day in High Loaded (by CPU, and DISKS) hour 22.00 we catched the next error
2026-11-08 22:06:26.872364 MSK,"svc_etl","dwh",p2124283,th1254390144,"10.136.7.43","9777",2026-11-08 22:06:0
5 MSK,0,con379331,cmd5,seg1,,,,sx1,"ERROR","58P01","could not open file ""base/17019/226790"": No such file
or directory",,,,,,"select pg_catalog.pg_relation_size(195392, 'main')",0,,"md.c",549,"Stack trace:
1 0x56ee1416672f postgres errstart + 0x3b9
2 0x56ee14166374 postgres errstart_cold + 0x20
3 0x56ee13f9072d postgres + 0x13f9072d
4 0x56ee13f90d93 postgres mdnblocks + 0x25
5 0x56ee13f930f2 postgres smgrnblocks + 0x48
6 0x56ee139fc37f postgres table_block_relation_size + 0xe7
7 0x56ee13f46df0 postgres + 0x13f46df0
8 0x56ee13f4ac3d postgres RelationGetNumberOfBlocksInFork + 0x11c
9 0x56ee1399974f postgres + 0x1399974f
10 0x56ee1399b520 postgres heap_beginscan + 0x151
11 0x56ee139bfc4e postgres + 0x139bfc4e
12 0x56ee139c05d6 postgres systable_beginscan + 0x270
13 0x56ee13a80bad postgres + 0x13a80bad
14 0x56ee13a80abb postgres GetAllAOCSFileSegInfo + 0xd4
15 0x56ee13a779a3 postgres + 0x13a779a3
16 0x56ee13ff7b03 postgres + 0x13ff7b03
17 0x56ee13ff8b37 postgres + 0x13ff8b37
18 0x56ee13ff8efe postgres pg_relation_size + 0x1dc
19 0x56ee13c90982 postgres + 0x13c90982
20 0x56ee13c926e1 postgres ExecInterpExprStillValid + 0x57
21 0x56ee13cf2744 postgres + 0x13cf2744
22 0x56ee13cf27ad postgres + 0x13cf27ad
23 0x56ee13cf2a3a postgres + 0x13cf2a3a
24 0x56ee13ca982a postgres + 0x13ca982a
25 0x56ee13ca96f4 postgres + 0x13ca96f4
26 0x56ee13c9b06a postgres + 0x13c9b06a
27 0x56ee13c9f7df postgres + 0x13c9f7df
28 0x56ee13c9c77a postgres standard_ExecutorRun + 0x401
29 0x56ee13c9c302 postgres ExecutorRun + 0xee
30 0x56ee13fa172b postgres + 0x13fa172b
"
2026-11-08 22:06:26.872552 MSK,"svc_etl","dwh",p2124283,th1254390144,"10.136.7.43","9777",2026-11-08 22:06:0
5 MSK,0,con379331,cmd5,seg1,,,,sx1,"LOG","00000","An exception was encountered during the execution of state
ment: select pg_catalog.pg_relation_size(195392, 'main')",,,,,,"select pg_catalog.pg_relation_size(195392, '
main')",0,,"elog.c",2129,

Steps before error:

  • was loaded a huge data on problem table from PXF (Hadoop) (this table was reloaded every day and had no problems before)
  • trying to get size of table and catched this ERROR

After that we had a problem with checkpoiner process and wal logs can not deleted before we restarted CBDB cluster and problem segment was recovered by self applying WAL logs from problem moment.

We can see checkpoiner error in the next part of segment log:
2026-11-08 22:06:53.329128 MSK,,,p3416186,th1254390144,,,,0,,,seg1,,,,,"LOG","00000","checkpoint starting: w
al",,,,,,,0,,"xlog.c",9315,
2026-11-08 22:06:59.643160 MSK,,,p3416186,th1254390144,,,,0,,,seg1,,,,,"ERROR","58P01","could not open file
""base/17019/226790"": No such file or directory",,,,,"writing block 0 of relation base/17019/226790",,0,,"m
d.c",549,"Stack trace:
1 0x56ee1416672f postgres errstart + 0x3b9
2 0x56ee14166374 postgres errstart_cold + 0x20
3 0x56ee13f9072d postgres + 0x13f9072d
4 0x56ee13f91b02 postgres + 0x13f91b02
5 0x56ee13f90c0d postgres mdwrite + 0x38
6 0x56ee13f93070 postgres smgrwrite + 0x43
7 0x56ee13f4a9a4 postgres + 0x13f4a9a4
8 0x56ee13f4a40b postgres + 0x13f4a40b
9 0x56ee13f49c01 postgres + 0x13f49c01
10 0x56ee13f4a6a3 postgres CheckPointBuffers + 0x15
11 0x56ee13a2cfd1 postgres + 0x13a2cfd1
12 0x56ee13a2c599 postgres CreateCheckPoint + 0x9a2
13 0x56ee13eb5c5a postgres CheckpointerMain + 0x5fd
14 0x56ee13a894d4 postgres AuxiliaryProcessMain + 0x7ae
15 0x56ee13eca13f postgres + 0x13eca13f
16 0x56ee13ec71d3 postgres + 0x13ec71d3
17 0x7ee14ba5b050 libc.so.6 + 0x4ba5b050
18 0x7ee14bb1d844 libc.so.6 __select + 0xb4
19 0x56ee13ec4859 postgres + 0x13ec4859
20 0x56ee13ec40a2 postgres PostmasterMain + 0x16af
21 0x56ee13d53b4f postgres + 0x13d53b4f
22 0x7ee14ba4624a libc.so.6 + 0x4ba4624a
23 0x7ee14ba46305 libc.so.6 __libc_start_main + 0x85
24 0x56ee13934aa1 postgres _start + 0x21
"

We had this problem twise a 1 month when we are activly tested our process on this cluster.

What you think should happen instead

In Greenplum in my practise i already seen the same problems, but these problems did not lead to same problems in checkpointer process and lock wal log deleting state.

How to reproduce

We can not reproduced this problem manually but catched twice a month in High Load evening hours.

Operating System

Astra 1.8.2 analog Debain 12

Anything else

No response

Are you willing to submit PR?
  • Yes, I am willing to submit a PR!
Code of Conduct
Langage dominant
C
Étoiles
1.5k
Forks
280
Merge moyen
5 j 35 min
PR mergées (30 j)
128

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de apache/cloudberry

Toutes les issues de apache/cloudberry

Issues similaires

Plus d'issues C

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.