-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[YSQL] Failed Test: TestPgRegressJson.testPgRegressJson #15682
Comments
Commit 8c26092 fixes similar issue, but a deeper fix should be done, such as modifying ASAN's limit. Internal link: https://yugabyte.slack.com/archives/C4NAYRFS8/p1677706886196309?thread_ts=1677085105.706619&cid=C4NAYRFS8 |
SELECT array_to_json(array_agg(x),false) from generate_series(5,10) x;
|
RCA:
Here we have expected error
CONCLUSION: In ASAN any statement after recursive command (like |
Possible FIX: let's move all recurrent statements to the end of the tests. |
It potentially affects the following PG tests:
Not used:
|
For the test
It should be investigated & fixed in another GHI: #16188 |
Alternative fix (D35672) was abandoned. |
Summary: The `stack_is_too_deep` Postgres function is used to limits stack depth based on total stack size. The stack size is calculated by using local variables address offset. This method works well in case of regular call stack (i.e. when all stack frames are allocated in stack). But for the `detect_stack_use_after_return` ASAN uses fake stack. In case of using it stack frames are allocated in the heap. As a result it is not possible to estimate stack depth base on local variables address offset and the `stack_is_too_deep` returns almost unpredictable results. To make `stack_is_too_deep `return predictable result in case of ASAN it is reasonable to return `false` all the time. **Note**: YSQL has some unit tests which checks that Postgres can detect too deep recursion. These tests changes the `max_stack_depth` GUC variable to lower value. And later restore the original value with the `RESET max_stack_depth` statement. To make these tests works under the ASAN the function returns true in case the `max_stack_depth` GUC contains non default value and number of call stack frames is huge enough. The check of call stack frames is required to avoid undesired failure on attempt to restore original value for the `max_stack_depth` GUC with the `RESET max_stack_depth` statement. Jira: DB-5047 Test Plan: Jenkins ``` ./yb_build.sh asan --java-test org.yb.pgsql.TestPgRegressJson#testPgRegressJson ``` Reviewers: loginov, jason Reviewed By: loginov, jason Subscribers: yql Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D35979
Summary: 411a32e [DB-11813] Rename ysql_conn_mgr_idle_or_pending_clients metric name c2e13ef [#15682] YSQL: Fix stack_is_too_deep function in ASAN ef31455 [PLAT-14188] Fixing upgrade disk availability check db6b1b7 [#23004] YCQL: Fix tserver crash due to NULL pointer dereference 0ada80a [PLAT-14433] Use correct kubeconfig for edit provider validation eccbc10 [PLAT-14414] Enable Kubernetes provider validation by default 199f679 [PLAT-14324]: Move all node agent based flags from BETA to INTERNAL in Provider Conf keys file 86a865d [PLAT-14443] YBA Installer wait for ready time configurable. ac184a8 [#22882] YSQL: Fix deadlock in DDL atomicity a4218fb [Docs] Sort feature to tables (Where fulfills the criteria) (#22836) 2f267ca [#22996] xCluster: Add SOURCE_UNREACHABLE and SYSTEM_ERROR enums Skipped due to conflict: dee7691 [#21534] docdb: Set owner correctly for cloned databases 34632ba [PLAT-14495] Set up the node_exporter for ynp 7c99ff9 [#22876][#22773] CDCSDK: Add new yb-admin command to remove user table from CDCSDK stream 4e9a81c [#22876][#22835][#22773] CDCSDK: Remove non-eligible tables for CDC from existing CDCSDK stream f2e574e [#23013] xClusterDDLRepl: Allow table_ids for GetXClusterStreams Test Plan: Jenkins: rebase: pg15-cherrypicks Reviewers: tfoucher, sanketh, jenkins-bot Subscribers: yql Differential Revision: https://phorge.dev.yugabyte.com/D36184
Jira Link: DB-5047
Description
The test case: TestPgRegressJson.testPgRegressJson has failed on alma8-clang15-asan since beginning. Never passed and failed with same json and jsonb error:
For Json: yb_pg_json.sql#89
For JSONB all tsheadline case get errored out with this: yb_pg_jsonb.sql#1248
Failing 98/100 times on alma8-clang15-asan: https://detective-gcp.dev.yugabyte.com/stability/test?analyze_trends=false&branch=master&build_type=all&class=org.yb.pgsql.TestPgRegressJson&fail_tag=all&name=testPgRegressJson&num_commits=500&num_fails=100&platform=all
Passing on 2.17.0 on alma8-clang13-asan:
https://detective-gcp.dev.yugabyte.com/stability/test?analyze_trends=true&branch=2.17.0&build_type=all&class=org.yb.pgsql.TestPgRegressJson&fail_tag=all&name=testPgRegressJson&num_commits=500&platform=all
yb_pg_jsonb.sql was modified in Commit: 509b95010c
The text was updated successfully, but these errors were encountered: