apache / apache/cloudberry

ERROR:CBucket.cpp:45: Failed assertion

Open
#178 0 comments 0 reactions 0 assignees View on GitHub
type: Bug
Dominant language
C
Stars
1.4k
Forks
247
Avg merge
4d 3h
Merged PRs (30d)
39

Description

### Cloudberry Database version

```
version

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------
PostgreSQL 14.4 (Cloudberry Database 1.4.0 build commit:e83e3ffc22d538deb2dbceeeae0138ca2de064e6) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 10.2.1 20210130 (Red Hat 1
0.2.1-11), 64-bit compiled on Aug 3 2023 10:15:47
(1 row)

```

### What happened

Many of such errors are found in master logs:

```
2023-08-31 03:30:03.751312 CST,""36628",2023-08-31 03:30:01 CST,1863023,con6198,cmd64,seg-1,,dx1842062,x1863023,sx1,"LOG","00000","2023-08-31 03:30:03:750889 CST,THD000,ERROR,""CBucket.cpp:45: Failed assertion: 0.0 <= m_distinct
Stack trace:
1 0x0000000000e0ce40 gpos::CException::Raise + 256
2 0x0000000000eeae90 gpnaucrates::CBucket::CBucket + 144
"",
2023-08-31 03:30:03:751231 CST,THD000,ERROR,""CBucket.cpp:45: Failed assertion: 0.0 <= m_distinct
Stack trace:
1 0x0000000000e0ce40 gpos::CException::Raise + 256
2 0x0000000000eeae90 gpnaucrates::CBucket::CBucket + 144
"",
",,,,,"SQL statement ""insert into

```

looks this is not happening due to one specific operation:

Please help to have a check, thanks.

### What you think should happen instead

_No response_

### How to reproduce

N/A

### Operating System

centos 7.9

### Anything else

_No response_

### Are you willing to submit PR?

- [ ] Yes, I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://cloudberrydb.org/community/coc).

Contributor guide

Open the contributing guide

Research direction

Start with the PostgreSQL 14.4 and Cloudberry 1.4.0 details in the report, then inspect the assertion and stack trace at CBucket.cpp:45 and the gpnaucrates::CBucket constructor. Establish which operation produces the master-log failure, identify a reproducible case, and verify that the assertion no longer occurs with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, postgresql
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.