| commit | 4a15da4443b6920f1cf0f244b2dbfa3367136534 | [log] [tgz] |
|---|---|---|
| author | Xuan Wang <xuanwn@google.com> | Wed Aug 14 11:55:09 2024 -0700 |
| committer | GitHub <noreply@github.com> | Wed Aug 14 11:55:09 2024 -0700 |
| tree | 080f3523034d17a8d2fe2b02430f26630f368d71 | |
| parent | 87f97246b2f8310a1853a1bace90bc1f2303441b [diff] |
[Python Otel] Manage call tracer life cycle use call arena. (v1.66.x backport) (#37479) Backport of #37460 to v1.66.x. --- We're seeing segfault in Python CSM tests: ``` 2024-08-03T09:49:45.720555997Z *** SIGSEGV received at time=1722678585 on cpu 0 *** 2024-08-03T09:49:45.721761998Z PC: @ 0x7847ffd5c1c9 (unknown) (unknown) 2024-08-03T09:49:45.722070502Z @ 0x7847fa309d8c 64 absl::lts_20240116::WriteFailureInfo() 2024-08-03T09:49:45.722175904Z @ 0x7847fa309a15 272 absl::lts_20240116::AbslFailureSignalHandler() 2024-08-03T09:49:45.722187675Z @ 0x7847ffc3d050 1592 (unknown) 2024-08-03T09:49:45.723432238Z @ 0x7847e97f9390 (unknown) (unknown) 2024-08-03T09:49:45.723487349Z @ ... and at least 1 more frames 2024-08-03T09:49:45.829702781Z [INFO tini (1)] Spawned child process '/xds_interop_client' with pid '7' 2024-08-03T09:49:45.829766869Z [DEBUG tini (1)] Received SIGCHLD 2024-08-03T09:49:45.829778749Z [DEBUG tini (1)] Reaped child with pid: '7' 2024-08-03T09:49:45.829787070Z [INFO tini (1)] Main child exited with signal (with signal 'Segmentation fault') ``` ### The issue After investigation, we found that the call tracer was deleted before `RecordEnd` was called. ### Why this fix * To fix this, we decide to use arena to manage the life cycle of CallTracer. * Since CallTracer was created in another shard object library (`grpcio_observability`) which don't have a dependency on grpc core, we can't use `grpc_core::Arena` directly when creating the call tracer. * As a workaround, we created a wrapper class `ClientCallTracerWrapper` to wrap the CallTracer and created another core API `grpc_call_tracer_set_and_manage` so that we can manage the life cycle of CallTracer use the wrapper class. <!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. -->
gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere. gRPC enables client and server applications to communicate transparently, and simplifies the building of connected systems.
To maximize usability, gRPC supports the standard method for adding dependencies to a user‘s chosen language (if there is one). In most languages, the gRPC runtime comes as a package available in a user’s language package manager.
For instructions on how to use the language-specific gRPC runtime for a project, please refer to these documents
src/cpp directoryGrpc.Net.Client, Grpc.AspNetCore.Servergrpcgo get google.golang.org/grpcnpm install @grpc/grpc-jsgRPC-ProtoRPC dependency to podspecpecl install grpcpip install grpciogem install grpcPer-language quickstart guides and tutorials can be found in the documentation section on the grpc.io website. Code examples are available in the examples directory.
Precompiled bleeding-edge package builds of gRPC master branch's HEAD are uploaded daily to packages.grpc.io.
Contributions are welcome!
Please read How to contribute which will guide you through the entire workflow of how to build the source code, how to run the tests, and how to contribute changes to the gRPC codebase. The “How to contribute” document also contains info on how the contribution process works and contains best practices for creating contributions.
Sometimes things go wrong. Please check out the Troubleshooting guide if you are experiencing issues with gRPC.
See the Performance dashboard for performance numbers of master branch daily builds.
See gRPC Concepts
This repository contains source code for gRPC libraries implemented in multiple languages written on top of a shared C++ core library src/core.
Libraries in different languages may be in various states of development. We are seeking contributions for all of these libraries:
| Language | Source |
|---|---|
| Shared C++ [core library] | src/core |
| C++ | src/cpp |
| Ruby | src/ruby |
| Python | src/python |
| PHP | src/php |
| C# (core library based) | src/csharp |
| Objective-C | src/objective-c |
| Language | Source repo |
|---|---|
| Java | grpc-java |
| Kotlin | grpc-kotlin |
| Go | grpc-go |
| NodeJS | grpc-node |
| WebJS | grpc-web |
| Dart | grpc-dart |
| .NET (pure C# impl.) | grpc-dotnet |
| Swift | grpc-swift |