Commit ad17a80
committed
[yugabyte#27992] YSQL: Use __lsan_ignore_object instead of lsan-supressions.txt for postgres code
Summary:
Sometimes (possible after update to clang 19) address sanitizer fails to symbolize leak stack trace:
```
==85768==WARNING: Can't read from symbolizer at fd 5
==85768==WARNING: Can't read from symbolizer at fd 5
==85768==WARNING: Can't read from symbolizer at fd 5
==85768==WARNING: Can't read from symbolizer at fd 5
==85768==WARNING: Can't read from symbolizer at fd 5
#0 0x5580d4be8bba (${BUILD_ROOT}/postgres/bin/postgres+0xef0bba)
#1 0x5580d587cc4c (${BUILD_ROOT}/postgres/bin/postgres+0x1b84c4c)
#2 0x5580d55be5cc (${BUILD_ROOT}/postgres/bin/postgres+0x18c65cc)
#3 0x5580d55be171 (${BUILD_ROOT}/postgres/bin/postgres+0x18c6171)
#4 0x7fc9991e57e4 (/lib64/libc.so.6+0x3a7e4) (BuildId: 889235a2805b8308b2d0274921bbe1890e9a1986)
```
While actually this stack trace contains supresseed function (postmaster_strdup in this particular scenario), it cannot obtain function name, so detected leak is propagated and test fails.
Replaced lsan-suppressions.txt entries with code annotations using `__lsan_ignore_object` to address this issue.
Also cleaned up lsan-supressions.txt and resolved issue yugabyte#27496 by adding missing call to YBCFreeStatus.
Jira: DB-17615
Test Plan: ./yb_build.sh asan --cxx-test pgwrapper_pg_wait_on_conflict-test --gtest_filter PgTabletSplittingWaitQueuesTest.SplitTablet -n 200 -- -p 8
Reviewers: dmitry, esheng, rthallam
Reviewed By: dmitry, esheng, rthallam
Subscribers: rthallam, ybase, yql
Tags: #jenkins-ready
Differential Revision: https://phorge.dev.yugabyte.com/D454261 parent 01e90be commit ad17a80
File tree
10 files changed
+68
-32
lines changed- build-support
- src
- postgres/src
- backend
- access/yb_access
- postmaster
- utils/misc
- common
- port
- yb
- util/debug
- yql/pggate
10 files changed
+68
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 30 | | |
34 | | - | |
35 | 31 | | |
36 | 32 | | |
37 | 33 | | |
| |||
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 40 | | |
52 | 41 | | |
53 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4064 | 4064 | | |
4065 | 4065 | | |
4066 | 4066 | | |
| 4067 | + | |
4067 | 4068 | | |
4068 | 4069 | | |
4069 | 4070 | | |
4070 | 4071 | | |
4071 | 4072 | | |
4072 | | - | |
| 4073 | + | |
| 4074 | + | |
| 4075 | + | |
| 4076 | + | |
4073 | 4077 | | |
4074 | 4078 | | |
4075 | 4079 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
598 | 599 | | |
599 | 600 | | |
600 | 601 | | |
601 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
602 | 605 | | |
603 | 606 | | |
604 | 607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
7332 | 7333 | | |
7333 | 7334 | | |
7334 | 7335 | | |
| 7336 | + | |
7335 | 7337 | | |
7336 | 7338 | | |
7337 | 7339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
116 | 128 | | |
117 | 129 | | |
118 | 130 | | |
| |||
202 | 214 | | |
203 | 215 | | |
204 | 216 | | |
205 | | - | |
| 217 | + | |
206 | 218 | | |
207 | 219 | | |
208 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| |||
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
| 106 | + | |
101 | 107 | | |
102 | 108 | | |
103 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
55 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
56 | 73 | | |
57 | | - | |
58 | | - | |
| 74 | + | |
59 | 75 | | |
60 | 76 | | |
61 | 77 | | |
| |||
76 | 92 | | |
77 | 93 | | |
78 | 94 | | |
79 | | - | |
80 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | | - | |
38 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
| 60 | + | |
55 | 61 | | |
56 | 62 | | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments