Skip to content
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

Use libbacktrace for stack dumps if available #4088

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

ChrisDodd
Copy link
Contributor

  • Memory allocation tracing hooks to track where memory is being allocated and print summary with stack trace of each allocation site. Used when logging in ComputeWriteSet to understand how/why it is using so much memory.

@ChrisDodd
Copy link
Contributor Author

Turns out with PIE executables (which Ubuntu 20.04 uses by default), addr2line is completely broken and can't produce a useful backtrace. The libbacktrace library from Github is a good alternative -- produces nice dumps and even deals with inlined calls, and is more efficient to boot. We don't really want a dependency on it, but using it automatically when it is installed is a good compromise.

@jafingerhut
Copy link
Contributor

Has anyone analyzed the reasons for the CI test failures?

@fruffy
Copy link
Collaborator

fruffy commented Aug 3, 2023

Has anyone analyzed the reasons for the CI test failures?

Likely a missing include, which is why the unity builds pass. The sanitizer failure looks like a clang compilation issue.

@ChrisDodd ChrisDodd force-pushed the cdodd-backtrace branch 2 times, most recently from edbe4d8 to 143aecb Compare August 5, 2023 07:45
@fruffy
Copy link
Collaborator

fruffy commented Aug 6, 2023

Test failures are because I added GIT_SHALLOW to the p4runtime submodule pull. This will cause issues when trying to checkout an older commit. #4096 will fix this.

@ChrisDodd ChrisDodd force-pushed the cdodd-backtrace branch 5 times, most recently from e948198 to ea4bb92 Compare August 7, 2023 10:17
@jafingerhut
Copy link
Contributor

@ChrisDodd Looks like 3 of the CI builds are still failing even after #4092 was merged in last week., 2 of them related to Bazel builds. Is this something that someone at Google might be able to help with?

@ChrisDodd ChrisDodd force-pushed the cdodd-backtrace branch 5 times, most recently from f485d99 to 7c17062 Compare August 14, 2023 06:29
- Memory allocation tracing hooks to track where memory is being
  allocated and print summary with stack trace of each allocation
  site.  Used when logging in ComputeWriteSet to understand how/why
  it is using so much memory.
@fruffy
Copy link
Collaborator

fruffy commented Aug 14, 2023

@ChrisDodd Looks like 3 of the CI builds are still failing even after #4092 was merged in last week., 2 of them related to Bazel builds. Is this something that someone at Google might be able to help with?

I believe the failure is a Clang problem, since the clang build also fails. Bazel uses Clang by default iirc.

@ChrisDodd
Copy link
Contributor Author

I believe the failure is a Clang problem, since the clang build also fails. Bazel uses Clang by default iirc.

The bazel problems were actually because it builds without garbage collection by default. I've fixed that to actually build, but it is not clear that such a build would actually be useful, as it would require immense amounts of memory, due to not freeing anything.

@ChrisDodd ChrisDodd merged commit 2820a3c into p4lang:main Aug 14, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants