yugabyte / yugabyte-db

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

[YSQL] Segmentation fault / Core dump indicating failure in dereferencing a pointer to a mutex within shared memory context when exercising PQ #22607

Closed archit-rastogi closed 3 months ago

archit-rastogi commented 5 months ago

Jira Link: DB-11516

Description

lldb) target create "/home/yugabyte/yb-software/yugabyte-2024.1.1.0-b40-centos-x86_64/postgres/bin/postgres" --core "/home/yugabyte/cores/core_2642388_1716563385_!home!yugabyte!yb-software!yugabyte-2024.1.1.0-b40-centos-x86_64!postgres!bin!postgres"
Core file '/home/yugabyte/cores/core_2642388_1716563385_!home!yugabyte!yb-software!yugabyte-2024.1.1.0-b40-centos-x86_64!postgres!bin!postgres' (x86_64) was loaded.
(lldb) bt all
* thread #1, name = 'postgres', stop reason = signal SIGSEGV
  * frame #0: 0x000055c79d7898be postgres`shm_mq_detach [inlined] tas(lock="") at s_lock.h:228:2
    frame #1: 0x000055c79d7898be postgres`shm_mq_detach [inlined] shm_mq_detach_internal(mq=0x00007f28fc80ebe0) at shm_mq.c:829:2
    frame #2: 0x000055c79d7898a1 postgres`shm_mq_detach(mqh=0x000025967f082990) at shm_mq.c:796:2
    frame #3: 0x000055c79d341cd5 postgres`DestroyParallelContext(pcxt=0x000025967f082848) at parallel.c:929:5
    frame #4: 0x000055c79d35441b postgres`AbortSubTransaction at parallel.c:1218:3
    frame #5: 0x000055c79d3543e5 postgres`AbortSubTransaction at xact.c:5172:3
    frame #6: 0x000055c79d35777f postgres`RollbackAndReleaseCurrentSubTransaction at xact.c:4718:3
    frame #7: 0x000055c79d7c2ce9 postgres`yb_exec_query_wrapper_one_attempt [inlined] yb_attempt_to_restart_on_error(attempt=0, restart_data=0x000025967fd1c528, exec_context=) at postgres.c:4636:4
    frame #8: 0x000055c79d7c2bb8 postgres`yb_exec_query_wrapper_one_attempt(exec_context=, restart_data=0x000025967fd1c528, functor=, functor_context=0x00007ffe1b368c50, attempt=0, retry=) at postgres.c:4739:3
    frame #9: 0x000055c79d7ba32b postgres`PostgresMain at postgres.c:4753:3
    frame #10: 0x000055c79d7ba2e6 postgres`PostgresMain [inlined] yb_exec_execute_message(portal_name="", max_rows=, restart_data=0x000025967fd1c528, exec_context=0x000025967fd1c000) at postgres.c:4814:2
    frame #11: 0x000055c79d7ba2d8 postgres`PostgresMain(argc=, argv=, dbname=, username=) at postgres.c:5540:7
    frame #12: 0x000055c79d6f4db0 postgres`BackendRun(port=0x000025967fc085a0) at postmaster.c:4741:2
    frame #13: 0x000055c79d6f3ecd postgres`ServerLoop [inlined] BackendStartup(port=0x000025967fc085a0) at postmaster.c:4400:3
    frame #14: 0x000055c79d6f3e2e postgres`ServerLoop at postmaster.c:1778:7
    frame #15: 0x000055c79d6eefd6 postgres`PostmasterMain(argc=25, argv=0x000025967fd0e1a0) at postmaster.c:1434:11
    frame #16: 0x000055c79d5ece9a postgres`PostgresServerProcessMain(argc=25, argv=0x000025967fd0e1a0) at main.c:234:3
    frame #17: 0x000055c79d29fa52 postgres`main + 34
    frame #18: 0x00007f290f3dad85 libc.so.6`__libc_start_main + 229
    frame #19: 0x000055c79d29f96e postgres`_start + 46

Issue Type

kind/bug

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

rthallamko3 commented 3 months ago

Based on Andrei's comment, it looks like a DUP of https://github.com/yugabyte/yugabyte-db/issues/20766