yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
9.02k stars 1.08k forks source link

[YSQL] \d <table> query failed with ERROR : Segmentation fault (core dumped) #24952

Open hariharasudhan-yb opened 4 days ago

hariharasudhan-yb commented 4 days ago

Jira Link: DB-14088

Description

In build 2.25.0.0-b307 ,

While executing this desc table query it failed with ,

yugabyte-# \d sales
segmentation fault (core dumped)

ysqlsh shell got killed and found a core , Core stack trace

[ec2-user@ip-172-151-34-198 ~]$ cat bt1.txt
(lldb) target create "/home/yugabyte/master/bin/ysqlsh" --core "/mnt/d0/cores/core_yb.1731657351.ysqlsh.43482.110425"
Core file '/mnt/d0/cores/core_yb.1731657351.ysqlsh.43482.110425' (x86_64) was loaded.
(lldb) bt all
* thread #1, name = 'ysqlsh', stop reason = signal SIGSEGV: address not mapped to object
  * frame #0: 0x00007f5ded8038c6 libc.so.6`malloc + 326
    frame #1: 0x00007f5dee2e4bac libpq.so.5`getAnotherTuple at fe-exec.c:1044:5
    frame #2: 0x00007f5dee2e4ad1 libpq.so.5`getAnotherTuple [inlined] pqRowProcessor(conn=0x00005642ad47bef0, errmsgp=<unavailable>) at fe-exec.c:1277:7
    frame #3: 0x00007f5dee2e49dc libpq.so.5`getAnotherTuple(conn=0x00005642ad47bef0, msgLength=23) at fe-protocol3.c:832:6
    frame #4: 0x00007f5dee2e2634 libpq.so.5`pqParseInput3(conn=0x00005642ad47bef0) at fe-protocol3.c:378:11
    frame #5: 0x00007f5dee2d864c libpq.so.5`PQgetResult [inlined] parseInput(conn=0x00005642ad47bef0) at fe-exec.c:2014:2
    frame #6: 0x00007f5dee2d8644 libpq.so.5`PQgetResult(conn=0x00005642ad47bef0) at fe-exec.c:2100:3
    frame #7: 0x00007f5dee2d8b34 libpq.so.5`PQexec [inlined] PQexecFinish(conn=0x00005642ad47bef0) at fe-exec.c:2417:19
    frame #8: 0x00007f5dee2d8b19 libpq.so.5`PQexec(conn=0x00005642ad47bef0, query=<unavailable>) at fe-exec.c:2256:9
    frame #9: 0x00005642ac68fb4b ysqlsh`PSQLexec(query="SELECT pg_catalog.pg_get_partkeydef('16456'::pg_catalog.oid);") at common.c:593:8
    frame #10: 0x00005642ac6981cd ysqlsh`describeOneTableDetails(schemaname="public", relationname=<unavailable>, oid="16456", verbose=false) at describe.c:2261:12
    frame #11: 0x00005642ac688fd3 ysqlsh`exec_command_d at describe.c:1504:8
    frame #12: 0x00005642ac688f8f ysqlsh`exec_command_d(scan_state=<unavailable>, active_branch=<unavailable>, cmd=<unavailable>) at command.c:736:16
    frame #13: 0x00005642ac685452 ysqlsh`exec_command(cmd="d", scan_state=0x00005642ad503560, cstack=0x00005642ad51def0, query_buf=0x00005642ad4ef270, previous_buf=0x00005642ad4f38c0) at command.c:325:12
    frame #14: 0x00005642ac68502b ysqlsh`HandleSlashCmds(scan_state=0x00005642ad503560, cstack=0x00005642ad51def0, query_buf=0x00005642ad4ef270, previous_buf=0x00005642ad4f38c0) at command.c:228:11
    frame #15: 0x00005642ac6a52db ysqlsh`MainLoop(source=0x00007f5dedb279c0) at mainloop.c:496:22
    frame #16: 0x00005642ac6ba281 ysqlsh`main(argc=<unavailable>, argv=0x00007fffedc74988) at startup.c:462:19
    frame #17: 0x00007f5ded7a2d85 libc.so.6`__libc_start_main + 229
    frame #18: 0x00005642ac684e4e ysqlsh`_start + 46

Issue Type

kind/bug

Warning: Please confirm that this issue does not contain any sensitive information