Skip to content

OTLP File exporter may crash if create thread failed #3011

@owent

Description

@owent

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().

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions