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

OTLP File exporter may crash if create thread failed #3011

Closed
owent opened this issue Jul 25, 2024 · 2 comments · Fixed by #3012
Closed

OTLP File exporter may crash if create thread failed #3011

owent opened this issue Jul 25, 2024 · 2 comments · Fixed by #3012
Assignees
Labels
bug Something isn't working triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@owent
Copy link
Member

owent commented Jul 25, 2024

Describe your environment

OS: Linux

Steps to reproduce
We have a internal prometheus file exporter which just like OTLP file exporter, and it may lead to crash when creating thread failed.
I think there is simular problem in OTLP file exporters.

Additional context

(gdb) bt
#0  0x00007f2882895387 in raise () from /lib64/libc.so.6
#1  0x00007f2882896a78 in abort () from /lib64/libc.so.6
#2  0x00007f2882f90a95 in __gnu_cxx::__verbose_terminate_handler() () from /lib64/libstdc++.so.6
#3  0x00007f2882f8ea06 in ?? () from /lib64/libstdc++.so.6
#4  0x00007f2882f8d9b9 in ?? () from /lib64/libstdc++.so.6
#5  0x00007f2882f8e624 in __gxx_personality_v0 () from /lib64/libstdc++.so.6
#6  0x00007f288ad2b8e3 in ?? () from /lib64/libgcc_s.so.1
#7  0x00007f288ad2be17 in _Unwind_Resume () from /lib64/libgcc_s.so.1
#8  0x00007f288f69f226 in rpc::telemetry::exporter::metrics::PrometheusFileBackend::AddMetricData (this=<optimized out>, data=...)
    at /data/devops/workspace/p-4943d876cb734a609b55ad5c740c36ff/src/pool/0/server/main/src/server_frame/rpc/telemetry/exporter/prometheus_file_exporter.cpp:636
#9  0x00007f288f69bdbd in rpc::telemetry::exporter::metrics::PrometheusFileExporter::Export (this=<optimized out>, data=...)
    at /data/devops/workspace/p-4943d876cb734a609b55ad5c740c36ff/src/pool/0/server/main/src/server_frame/rpc/telemetry/exporter/prometheus_file_exporter.cpp:1028

PrometheusFileBackend::AddMetricData calls SpawnBackgroundWorkThread() and the implementation just like OtlpFileSystemBackend::SpawnBackgroundWorkThread().

@owent owent added the bug Something isn't working label Jul 25, 2024
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jul 25, 2024
@malkia
Copy link

malkia commented Jul 25, 2024

I wonder what's the reason behind catch (...) here: https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-cpp+%22catch+%28...%29%22+language%3AC%2B%2B&type=code (one example, and another related to this code).

@owent
Copy link
Member Author

owent commented Jul 29, 2024

I wonder what's the reason behind catch (...) here: https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-cpp+%22catch+%28...%29%22+language%3AC%2B%2B&type=code (one example, and another related to this code).

This file is not always included, depends on whether to use external abseil-cpp libraries.

@marcalff marcalff added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants