yugabyte/yugabyte-db

[YSQL] FailedAssertion IsYugabyteEnabled() in logging code

Opened this issue · 0 comments

Jira Link: DB-13639

Description

Steps to repro:
Prep: Wait for #24545 to be fixed, or patch a fix for it first.

  1. On MacOS 14 arm64 (but probably happens on a dev server as well), run ./yb_build.sh, to get a debug build.
  2. pg15_tests/test_upgrade.sh
  3. Look for the postgresql log in the master node, possibly /tmp/pg15_cluster_data/node-1/disk-1/yb-data/master/logs/postgresql-*.log

EXPECTED
Log contains no FailedAssertion lines

RESULT
Many instances of:

TRAP: FailedAssertion("IsYugaByteEnabled()", File: "../../../../../../../src/postgres/src/backend/utils/error/elog.c", Line: 4501, PID: 99651)
0   postgres                            0x0000000103866060 ExceptionalCondition + 276
1   postgres                            0x00000001038707b8 yb_errmsg_from_status + 624
2   yb_pg_metrics.so                    0x00000001042989c8 webserver_worker_main + 1428
3   postgres                            0x000000010348ea80 StartBackgroundWorker + 768
4   postgres                            0x00000001034a46c0 do_start_bgworker + 804
5   postgres                            0x000000010349b2fc maybe_start_bgworkers + 544
6   postgres                            0x00000001034972f4 PostmasterMain + 9092
7   postgres                            0x00000001033398b8 startup_hacks + 0
8   postgres                            0x0000000103339e14 main + 36
9   dyld                                0x0000000197447154 start + 2476

This bug probably depends on #24601 to be broken. But it seems like the assertion should be removed, or possibly switched to YBIsEnabledInPostgresEnvVar.

Issue Type

kind/bug

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

  • I confirm this issue does not contain any sensitive information.