yugabyte-db
yugabyte-db copied to clipboard
[YSQL] ASAN memory leak in org.yb.pgsql.TestPgRegressTypesString.testPgRegressTypes
Jira Link: DB-3040
Description
Jenkins logs: https://jenkins.dev.yugabyte.com/job/github-yugabyte-db-alma8-master-clang12-asan/938/artifact/java/yb-pgsql/target/surefire-reports_org.yb.pgsql.TestPgRegressTypesString__testPgRegressTypes/
Detective link: https://detective-gcp.dev.yugabyte.com/stability/test?branch=master&build_type=all&class=org.yb.pgsql.TestPgRegressTypesString&fail_tag=memory_leak&name=testPgRegressTypes&platform=all
ASAN report
ts1|pid66323|:16184 ==71165==ERROR: LeakSanitizer: detected memory leaks
ts1|pid66323|:16184·
ts1|pid66323|:16184 Direct leak of 2336 byte(s) in 4 object(s) allocated from:
ts1|pid66323|:16184 #0 0x7f98919f1a6d in malloc /opt/yb-build/llvm/yb-llvm-v12.0.1-yb-1-1633143152-bdb147e6-almalinux8-x86_64-build/src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
ts1|pid66323|:16184 #1 0x1278e32 in pg_regcomp ${YB_SRC_ROOT}/src/postgres/src/backend/regex/../../../../../../src/postgres/src/backend/regex/regcomp.c:379:16
ts1|pid66323|:16184 #2 0x145cdb1 in NIAddAffix ${YB_SRC_ROOT}/src/postgres/src/backend/tsearch/../../../../../../src/postgres/src/backend/tsearch/spell.c:730:9
ts1|pid66323|:16184 #3 0x145e046 in NIImportOOAffixes ${YB_SRC_ROOT}/src/postgres/src/backend/tsearch/../../../../../../src/postgres/src/backend/tsearch/spell.c:1387:4
ts1|pid66323|:16184 #4 0x145b34f in NIImportAffixes ${YB_SRC_ROOT}/src/postgres/src/backend/tsearch/../../../../../../src/postgres/src/backend/tsearch/spell.c:1550:2
ts1|pid66323|:16184 #5 0x14582fc in dispell_init ${YB_SRC_ROOT}/src/postgres/src/backend/tsearch/../../../../../../src/postgres/src/backend/tsearch/dict_ispell.c:64:4
ts1|pid66323|:16184 #6 0x180be25 in OidFunctionCall1Coll ${YB_SRC_ROOT}/src/postgres/src/backend/utils/fmgr/../../../../../../../src/postgres/src/backend/utils/fmgr/fmgr.c:1430:11
ts1|pid66323|:16184 #7 0xea8712 in verify_dictoptions ${YB_SRC_ROOT}/src/postgres/src/backend/commands/../../../../../../src/postgres/src/backend/commands/tsearchcmds.c:399:10
ts1|pid66323|:16184 #8 0xea8265 in DefineTSDictionary ${YB_SRC_ROOT}/src/postgres/src/backend/commands/../../../../../../src/postgres/src/backend/commands/tsearchcmds.c:460:2
ts1|pid66323|:16184 #9 0x1437488 in ProcessUtilitySlow ${YB_SRC_ROOT}/src/postgres/src/backend/tcop/../../../../../../src/postgres/src/backend/tcop/utility.c:1305:18
ts1|pid66323|:16184 #10 0x1433f2f in standard_ProcessUtility ${YB_SRC_ROOT}/src/postgres/src/backend/tcop/../../../../../../src/postgres/src/backend/tcop/utility.c
ts1|pid66323|:16184 #11 0x1432e18 in YBProcessUtilityDefaultHook ${YB_SRC_ROOT}/src/postgres/src/backend/tcop/../../../../../../src/postgres/src/backend/tcop/utility.c:3587:3
ts1|pid66323|:16184 #12 0x7f9874e5cd52 in pgss_ProcessUtility ${YB_SRC_ROOT}/src/postgres/contrib/pg_stat_statements/../../../../../src/postgres/contrib/pg_stat_statements/pg_stat_statements.c:1059:5
ts1|pid66323|:16184 #13 0x7f9874e40418 in ybpgm_ProcessUtility ${YB_SRC_ROOT}/src/postgres/contrib/yb_pg_metrics/../../../../../src/postgres/contrib/yb_pg_metrics/yb_pg_metrics.c:689:9
ts1|pid66323|:16184 #14 0x7f9874e2ab7d in pgaudit_NextProcessUtility_hook ${YB_SRC_ROOT}/src/postgres/contrib/pgaudit/../../../../../src/postgres/contrib/pgaudit/pgaudit.c:1189:5
ts1|pid66323|:16184 #15 0x7f9874e28551 in pgaudit_ProcessUtility_hook ${YB_SRC_ROOT}/src/postgres/contrib/pgaudit/../../../../../src/postgres/contrib/pgaudit/pgaudit.c:1217:5
ts1|pid66323|:16184 #16 0x7f9874cc76cd in pg_hint_plan_ProcessUtility ${YB_SRC_ROOT}/src/postgres/third-party-extensions/pg_hint_plan/../../../../../src/postgres/third-party-extensions/pg_hint_plan/pg_hint_plan.c:3039:3
ts1|pid66323|:16184 #17 0x1875e02 in YBTxnDdlProcessUtility ${YB_SRC_ROOT}/src/postgres/src/backend/utils/misc/../../../../../../../src/postgres/src/backend/utils/misc/pg_yb_utils.c:1481:4
ts1|pid66323|:16184 #18 0x1433328 in ProcessUtility ${YB_SRC_ROOT}/src/postgres/src/backend/tcop/../../../../../../src/postgres/src/backend/tcop/utility.c:374:3
ts1|pid66323|:16184 #19 0x143256b in PortalRunUtility ${YB_SRC_ROOT}/src/postgres/src/backend/tcop/../../../../../../src/postgres/src/backend/tcop/pquery.c:1204:2
ts1|pid66323|:16184 #20 0x1430c73 in PortalRunMulti ${YB_SRC_ROOT}/src/postgres/src/backend/tcop/../../../../../../src/postgres/src/backend/tcop/pquery.c
ts1|pid66323|:16184 #21 0x142f65c in PortalRun ${YB_SRC_ROOT}/src/postgres/src/backend/tcop/../../../../../../src/postgres/src/backend/tcop/pquery.c:813:5
ts1|pid66323|:16184 #22 0x142a704 in exec_simple_query ${YB_SRC_ROOT}/src/postgres/src/backend/tcop/../../../../../../src/postgres/src/backend/tcop/postgres.c:1170:10
ts1|pid66323|:16184 #23 0x1427648 in yb_exec_simple_query_impl ${YB_SRC_ROOT}/src/postgres/src/backend/tcop/../../../../../../src/postgres/src/backend/tcop/postgres.c:4614:2
ts1|pid66323|:16184 #24 0x14278a7 in yb_exec_query_wrapper_one_attempt ${YB_SRC_ROOT}/src/postgres/src/backend/tcop/../../../../../../src/postgres/src/backend/tcop/postgres.c:4582:3
ts1|pid66323|:16184 #25 0x1427570 in yb_exec_query_wrapper ${YB_SRC_ROOT}/src/postgres/src/backend/tcop/../../../../../../src/postgres/src/backend/tcop/postgres.c:4606:3
ts1|pid66323|:16184 #26 0x14211d1 in yb_exec_simple_query ${YB_SRC_ROOT}/src/postgres/src/backend/tcop/../../../../../../src/postgres/src/backend/tcop/postgres.c:4629:2
ts1|pid66323|:16184 #27 0x141f4c0 in PostgresMain ${YB_SRC_ROOT}/src/postgres/src/backend/tcop/../../../../../../src/postgres/src/backend/tcop/postgres.c:5237:23
ts1|pid66323|:16184 #28 0x126ee3c in BackendRun ${YB_SRC_ROOT}/src/postgres/src/backend/postmaster/../../../../../../src/postgres/src/backend/postmaster/postmaster.c:4560:2
ts1|pid66323|:16184 #29 0x126dce0 in BackendStartup ${YB_SRC_ROOT}/src/postgres/src/backend/postmaster/../../../../../../src/postgres/src/backend/postmaster/postmaster.c:4198:3
Note, from Detective, there might be several parts failing?
07/21/2022 17:18 [alma8-master-clang12-asan/938/](https://jenkins.dev.yugabyte.com/job/github-yugabyte-db-alma8-master-clang12-asan/938/) java.lang.AssertionError: pg_regress exited with error code: 1, failed tests: [yb_pg_collate]
07/20/2022 21:03 [alma8-master-clang12-asan/933/](https://jenkins.dev.yugabyte.com/job/github-yugabyte-db-alma8-master-clang12-asan/933/) java.lang.AssertionError: pg_regress exited with error code: 1, failed tests: [yb_collate_icu_utf8]
07/11/2022 14:03 [alma8-master-clang12-asan/870/](https://jenkins.dev.yugabyte.com/job/github-yugabyte-db-alma8-master-clang12-asan/870/) java.lang.AssertionError: pg_regress exited with error code: 1, failed tests: [yb_pg_bit]
I looked at pg_regcomp
When it returns, freev
is called which would in turn call rfree
.
There doesn't seem to be memory leak.
Closing as duplicate of #13931