-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
GH-35212: [Go] Add ability to show full call stack with ARROW_CHECKED_MAX_RETAINED_FRAMES #35215
GH-35212: [Go] Add ability to show full call stack with ARROW_CHECKED_MAX_RETAINED_FRAMES #35215
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks awesome, thanks for this!
Benchmark runs are scheduled for baseline = 16bd95f and contender = 7a7b414. 7a7b414 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
['Python', 'R'] benchmarks have high level of regressions. |
Follow-up to #35215. It's mostly cosmetic, but without the additional 2 skips passed in to `Callers`, the Caller frame is repeated in the stack trace, and one frame below it is added as well. With this change, the checked allocator stack trace contains no duplicates. I had this change locally but didn't realize it wasn't pushed to the PR branch, sorry about that 🙇 * Closes: #35234 Authored-by: Herman Schaaf <hermanschaaf@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
…HECKED_MAX_RETAINED_FRAMES (apache#35215) This adds support for printing the full call stack when a leak is reported by the checked memory allocator. An `ARROW_CHECKED_MAX_RETAINED_FRAMES` environment variable controls how many frames are retained. To keep this completely backwards-compatible, the default right now is zero. In this case, the reported error is exactly the same as before. When a higher value is given though, a longer call stack is printed. For example: Before (same as `ARROW_CHECKED_MAX_RETAINED_FRAMES=0`): ``` checked_allocator.go:160: LEAK of 64 bytes FROM github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).newData line 2396 ``` After (with `ARROW_CHECKED_MAX_RETAINED_FRAMES=100`): ``` checked_allocator.go:160: LEAK of 64 bytes FROM github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).newData line 2396 github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).NewTimestampArray line 2386 github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).NewArray line 2380 github.com/apache/arrow/go/v12/arrow/array.(*RecordBuilder).NewRecord line 346 github.com/cloudquery/plugin-sdk/v2/testdata.GenTestData line 243 github.com/cloudquery/plugin-sdk/v2/plugins/destination.testMigration line 53 github.com/cloudquery/plugin-sdk/v2/plugins/destination.(*PluginTestSuite).destinationPluginTestMigrate.func5 line 239 testing.tRunner line 1576 runtime.goexit line 1172 ``` * Closes: apache#35212 Authored-by: Herman Schaaf <hermanschaaf@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
Follow-up to apache#35215. It's mostly cosmetic, but without the additional 2 skips passed in to `Callers`, the Caller frame is repeated in the stack trace, and one frame below it is added as well. With this change, the checked allocator stack trace contains no duplicates. I had this change locally but didn't realize it wasn't pushed to the PR branch, sorry about that 🙇 * Closes: apache#35234 Authored-by: Herman Schaaf <hermanschaaf@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
…HECKED_MAX_RETAINED_FRAMES (apache#35215) This adds support for printing the full call stack when a leak is reported by the checked memory allocator. An `ARROW_CHECKED_MAX_RETAINED_FRAMES` environment variable controls how many frames are retained. To keep this completely backwards-compatible, the default right now is zero. In this case, the reported error is exactly the same as before. When a higher value is given though, a longer call stack is printed. For example: Before (same as `ARROW_CHECKED_MAX_RETAINED_FRAMES=0`): ``` checked_allocator.go:160: LEAK of 64 bytes FROM github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).newData line 2396 ``` After (with `ARROW_CHECKED_MAX_RETAINED_FRAMES=100`): ``` checked_allocator.go:160: LEAK of 64 bytes FROM github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).newData line 2396 github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).NewTimestampArray line 2386 github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).NewArray line 2380 github.com/apache/arrow/go/v12/arrow/array.(*RecordBuilder).NewRecord line 346 github.com/cloudquery/plugin-sdk/v2/testdata.GenTestData line 243 github.com/cloudquery/plugin-sdk/v2/plugins/destination.testMigration line 53 github.com/cloudquery/plugin-sdk/v2/plugins/destination.(*PluginTestSuite).destinationPluginTestMigrate.func5 line 239 testing.tRunner line 1576 runtime.goexit line 1172 ``` * Closes: apache#35212 Authored-by: Herman Schaaf <hermanschaaf@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
Follow-up to apache#35215. It's mostly cosmetic, but without the additional 2 skips passed in to `Callers`, the Caller frame is repeated in the stack trace, and one frame below it is added as well. With this change, the checked allocator stack trace contains no duplicates. I had this change locally but didn't realize it wasn't pushed to the PR branch, sorry about that 🙇 * Closes: apache#35234 Authored-by: Herman Schaaf <hermanschaaf@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
…HECKED_MAX_RETAINED_FRAMES (apache#35215) This adds support for printing the full call stack when a leak is reported by the checked memory allocator. An `ARROW_CHECKED_MAX_RETAINED_FRAMES` environment variable controls how many frames are retained. To keep this completely backwards-compatible, the default right now is zero. In this case, the reported error is exactly the same as before. When a higher value is given though, a longer call stack is printed. For example: Before (same as `ARROW_CHECKED_MAX_RETAINED_FRAMES=0`): ``` checked_allocator.go:160: LEAK of 64 bytes FROM github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).newData line 2396 ``` After (with `ARROW_CHECKED_MAX_RETAINED_FRAMES=100`): ``` checked_allocator.go:160: LEAK of 64 bytes FROM github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).newData line 2396 github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).NewTimestampArray line 2386 github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).NewArray line 2380 github.com/apache/arrow/go/v12/arrow/array.(*RecordBuilder).NewRecord line 346 github.com/cloudquery/plugin-sdk/v2/testdata.GenTestData line 243 github.com/cloudquery/plugin-sdk/v2/plugins/destination.testMigration line 53 github.com/cloudquery/plugin-sdk/v2/plugins/destination.(*PluginTestSuite).destinationPluginTestMigrate.func5 line 239 testing.tRunner line 1576 runtime.goexit line 1172 ``` * Closes: apache#35212 Authored-by: Herman Schaaf <hermanschaaf@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
Follow-up to apache#35215. It's mostly cosmetic, but without the additional 2 skips passed in to `Callers`, the Caller frame is repeated in the stack trace, and one frame below it is added as well. With this change, the checked allocator stack trace contains no duplicates. I had this change locally but didn't realize it wasn't pushed to the PR branch, sorry about that 🙇 * Closes: apache#35234 Authored-by: Herman Schaaf <hermanschaaf@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
Follow-up to apache/arrow#35215. It's mostly cosmetic, but without the additional 2 skips passed in to `Callers`, the Caller frame is repeated in the stack trace, and one frame below it is added as well. With this change, the checked allocator stack trace contains no duplicates. I had this change locally but didn't realize it wasn't pushed to the PR branch, sorry about that 🙇 * Closes: #35234 Authored-by: Herman Schaaf <hermanschaaf@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
This adds support for printing the full call stack when a leak is reported by the checked memory allocator. An
ARROW_CHECKED_MAX_RETAINED_FRAMES
environment variable controls how many frames are retained. To keep this completely backwards-compatible, the default right now is zero. In this case, the reported error is exactly the same as before. When a higher value is given though, a longer call stack is printed. For example:Before (same as
ARROW_CHECKED_MAX_RETAINED_FRAMES=0
):After (with
ARROW_CHECKED_MAX_RETAINED_FRAMES=100
):