Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
Closed as not planned
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
The following code snippet results in a segmentation fault in Python 3.8 and 3.9, but not 3.10 and newer:
#!/usr/bin/env python3.9# pip install opentelemetry-sdkfromopentelemetry.sdk.traceimportTracerProviderfromopentelemetry.sdk.trace.exportimport ( BatchSpanProcessor, ConsoleSpanExporter, ) fd=open("foo.txt", "w") tracer_provider=TracerProvider() processor=BatchSpanProcessor(ConsoleSpanExporter(out=fd)) tracer_provider.add_span_processor(processor)The following conditions need to be met for the segmentation fault to happen:
- Python 3.9.18 or older (does not happen with Python 3.10 or newer)
fdmust not be closed (does not happen iffd.close()is run at the end)
I could reproduce this segfault on both macOS Sonoma 14.3.1 and Ubuntu Linux 23.10.
I realize that 3.8 and 3.9 are no longer in the "bugfix" phase but the segfault may have security implications, which is why I decided to open this issue. Please feel free to close if it's not helpful.
CPython versions tested on:
3.8, 3.9, 3.10, 3.13
Operating systems tested on:
Linux, macOS
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error