Open jasonyb opened 1 year ago
Sometimes, this happens:
yugabyte=# select * from pg_stat_activity;
ERROR: Error at shmat for shared memory segment with id '1212500'. Invalid argument
../../src/yb/yql/pggate/util/ybc_util.cc:338: @ 0x7fb932fca324 YBCGetStackTrace
../../../../../../../src/postgres/src/backend/utils/error/elog.c:1112: @ 0xa44984 errmsg
../../../../../../../src/postgres/src/backend/utils/misc/yb_ysql_conn_mgr_helper.c:78: @ 0xa79f3c attach_shmem
../../../../../../../src/postgres/src/backend/utils/misc/yb_ysql_conn_mgr_helper.c:262: @ 0xa7a285 check_resize_needed
../../../../../../../src/postgres/src/backend/utils/misc/yb_ysql_conn_mgr_helper.c:299: @ 0xa7a285 resize_shmem_if_needed
../../../../../../../src/postgres/src/backend/utils/misc/yb_ysql_conn_mgr_helper.c:452: @ 0xa7a285 YbUpdateSharedMemory
../../../../../../../src/postgres/src/backend/access/transam/xact.c:3102: @ 0x56058c CommitTransactionCommand
../../../../../../src/postgres/src/backend/tcop/postgres.c:2620: @ 0x8e7ed5 finish_xact_command
../../../../../../src/postgres/src/backend/tcop/postgres.c:1242: @ 0x8eee7f exec_simple_query
../../../../../../src/postgres/src/backend/tcop/postgres.c:4753: @ 0x8eee7f yb_exec_simple_query_impl
../../../../../../src/postgres/src/backend/tcop/postgres.c:4721: @ 0x8ec2d7 yb_exec_query_wrapper_one_attempt
../../../../../../src/postgres/src/backend/tcop/postgres.c:4745: @ 0x8edb15 yb_exec_query_wrapper
../../../../../../src/postgres/src/backend/tcop/postgres.c:4768: @ 0x8edb69 yb_exec_simple_query
../../../../../../src/postgres/src/backend/tcop/postgres.c:5393: @ 0x8f0548 PostgresMain
../../../../../../src/postgres/src/backend/postmaster/postmaster.c:4658: @ 0x85163a BackendRun
../../../../../../src/postgres/src/backend/postmaster/postmaster.c:4296: @ 0x85163a BackendStartup
../../../../../../src/postgres/src/backend/postmaster/postmaster.c:1775: @ 0x85163a ServerLoop
../../../../../../src/postgres/src/backend/postmaster/postmaster.c:1431: @ 0x853ac2 PostmasterMain
../../../../../../src/postgres/src/backend/main/main.c:234: @ 0x79c925 PostgresServerProcessMain
@ 0x79c945
@ 0x7fb92ede7d84
@ 0x4a783d
@ 0xffffffffffffffff
And sometimes, within the same session, running it again works fine.
Jira Link: DB-7763
Description
Starting up a cluster ysql_conn_mgr enabled, it gives warnings right away.
or
Postgres logs have multiple of the following
That stack was from alma8, fastdebug, gcc11, commit abb1f4c98d69a608240b86a72a369ce480b7726e build. Also reproduced on release, clang15.
Warning: Please confirm that this issue does not contain any sensitive information