Skip to content

[Bug] "FATAL","XX000","Unexpected internal error (assert.c:48)" #1459

@ryapandt

Description

@ryapandt

Apache Cloudberry version

2.0.0

What happened

An SQL query triggers a database-reset error—sporadic and not consistently reproducible.
Error log is as follows

2025-11-29 00:01:02.479579 CST,"jyzsuser","pasobi",p4062425,th1425586304,"172.18.46.87","36862",2025-11-29 00:00:38 CST,0,con5825,cmd1,seg-1,,,,sx1,"FATAL","XX000","Unexpected internal error (assert.c:48)","AssertImply failed(""!(!(inCursor) || (dtxContextInfo->distributedXid != ((DistributedTransactionId) 0) && gp_command_count == MySessionState->latestCursorCommandId))"", File: ""cdbdtxcontextinfo.c"", Line: 63)",,,,,"/* jyzsv2-DB:master*/
/* jyzsv2-schema:jyzs */
 select u.gid usergid,u.name username, a.userlevel::int::varchar,a.userlevelname,a.userlvpgid::int orgDef,a.usercode ,
               a.storetype ,a.bsortcode ,a.brandcode ,a.storerange, b.tel mobile,coalesce(usernewrole,userrole) permissrole,fu.loginname
        from v_jyzs_empstaion a
        left join faemp b on a.usergid=b.gid
        left join v_jyzs_user u on a.usergid=u.gid
        left join fauser fu on a.usergid=fu.gid
        where usergid=$1::int order by userlevel,userlvpgid limit 1",0,,"assert.c",48,"Stack trace:
1    0x7f974e4673d2 libpostgres.so errstart + 0x202
2    0x7f974ddd48d5 libpostgres.so ExceptionalCondition + 0x87
3    0x7f974e50eb9c libpostgres.so DtxContextInfo_CreateOnMaster + 0x21c
4    0x7f974e4fb8b7 libpostgres.so qdSerializeDtxContextInfo + 0x127
5    0x7f974e4fc8f9 libpostgres.so CdbDispatchPlan + 0x539
6    0x7f974e0a6acb libpostgres.so standard_ExecutorStart + 0xe3b
7    0x7f974e303b67 libpostgres.so PortalStart + 0x467
8    0x7f974e2ff6f5 libpostgres.so <symbol not found> + 0x4e2ff6f5
9    0x7f974e300bc9 libpostgres.so PostgresMain + 0xe49
10   0x7f974e247112 libpostgres.so <symbol not found> + 0x4e247112
11   0x7f974e2481f1 libpostgres.so PostmasterMain + 0xe61
12   0x4027eb postgres main (main.c:200)
13   0x7f974d2b27e5 libc.so.6 __libc_start_main + 0xe5
14   0x40298e postgres _start + 0x2e
"

then "the database system is resetting"

2025-11-29 00:01:13.336536 CST,"jyzsuser","pasobi",p4064992,th1425586304,"172.18.46.87","53582",2025-11-29 00:01:13 CST,0,,,seg-1,,,,,"FATAL","57P03","the database system is resetting",,,,,,,0,,"postmaster.c",2796

What you think should happen instead

No response

How to reproduce

none

Operating System

rocky 8.10

Anything else

No response

Are you willing to submit PR?

  • Yes, I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions