-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Commit 2a7f904
runtime: debug code to catch bad gcWork.puts
This adds a debug check to throw immediately if any pointers are added
to the gcWork buffer after the mark completion barrier. The intent is
to catch the source of the cached GC work that occasionally produces
"P has cached GC work at end of mark termination" failures.
The result should be that we get "throwOnGCWork" throws instead of "P
has cached GC work at end of mark termination" throws, but with useful
stack traces.
This should be reverted before the release. I've been unable to
reproduce this issue locally, but this issue appears fairly regularly
on the builders, so the intent is to catch it on the builders.
This probably slows down the GC slightly.
For #27993.
Change-Id: I5035e14058ad313bfbd3d68c41ec05179147a85c
Reviewed-on: https://go-review.googlesource.com/c/149969
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>1 parent 4d5791c commit 2a7f904
File tree
3 files changed
+31
-2
lines changed- src
- cmd/compile/internal/gc
- runtime
3 files changed
+31
-2
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
85 | 85 |
| |
86 | 86 |
| |
87 | 87 |
| |
88 | - | ||
88 | + | ||
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
|
Lines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1431 | 1431 |
| |
1432 | 1432 |
| |
1433 | 1433 |
| |
1434 | + | ||
1435 | + | ||
1434 | 1436 |
| |
1435 | 1437 |
| |
1436 | 1438 |
| |
| |||
1924 | 1926 |
| |
1925 | 1927 |
| |
1926 | 1928 |
| |
1927 | - | ||
1929 | + | ||
1928 | 1930 |
| |
1929 | 1931 |
| |
1930 | 1932 |
| |
| |||
1956 | 1958 |
| |
1957 | 1959 |
| |
1958 | 1960 |
| |
1961 | + | ||
1962 | + | ||
1959 | 1963 |
| |
1960 | 1964 |
| |
1961 | 1965 |
| |
|
Lines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
25 | 32 |
| |
26 | 33 |
| |
27 | 34 |
| |
| |||
108 | 115 |
| |
109 | 116 |
| |
110 | 117 |
| |
118 | + | ||
119 | + | ||
120 | + | ||
121 | + | ||
111 | 122 |
| |
112 | 123 |
| |
113 | 124 |
| |
| |||
142 | 153 |
| |
143 | 154 |
| |
144 | 155 |
| |
156 | + | ||
157 | + | ||
158 | + | ||
159 | + | ||
145 | 160 |
| |
146 | 161 |
| |
147 | 162 |
| |
| |||
163 | 178 |
| |
164 | 179 |
| |
165 | 180 |
| |
181 | + | ||
182 | + | ||
183 | + | ||
184 | + | ||
166 | 185 |
| |
167 | 186 |
| |
168 | 187 |
| |
| |||
284 | 303 |
| |
285 | 304 |
| |
286 | 305 |
| |
306 | + | ||
307 | + | ||
308 | + | ||
287 | 309 |
| |
288 | 310 |
| |
289 | 311 |
| |
290 | 312 |
| |
313 | + | ||
314 | + | ||
315 | + | ||
291 | 316 |
| |
292 | 317 |
| |
293 | 318 |
| |
|
0 commit comments