Skip to content

fix(profiler): handle non-frame objects while stack-unwinding#5019

Merged
P403n1x87 merged 7 commits into
DataDog:1.xfrom
P403n1x87:fix/profiler-py311-alien-frame-objects
Feb 2, 2023
Merged

fix(profiler): handle non-frame objects while stack-unwinding#5019
P403n1x87 merged 7 commits into
DataDog:1.xfrom
P403n1x87:fix/profiler-py311-alien-frame-objects

Conversation

@P403n1x87

@P403n1x87 P403n1x87 commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

Following reports of Python 3.11 returning non-frame objects while unwinding the stack of a running thread, this change adds handling code that prevents exceptions from being raised.

Checklist

  • Change(s) are motivated and described in the PR description.
  • Testing strategy is described if automated tests are not included in the PR.
  • Risk is outlined (performance impact, potential for breakage, maintainability, etc).
  • Change is maintainable (easy to change, telemetry, documentation).
  • Library release note guidelines are followed.
  • Documentation is included (in-code, generated user docs, public corp docs).

Reviewer Checklist

  • Title is accurate.
  • No unnecessary changes are introduced.
  • Description motivates each change.
  • Avoids breaking API changes unless absolutely necessary.
  • Testing strategy adequately addresses listed risk(s).
  • Change is maintainable (easy to change, telemetry, documentation).
  • Release note makes sense to a user of the library.

@P403n1x87 P403n1x87 added the Profiling Continous Profling label Feb 1, 2023
@P403n1x87
P403n1x87 requested review from a team as code owners February 1, 2023 14:41
Comment thread ddtrace/profiling/collector/_traceback.pyx Outdated
@P403n1x87
P403n1x87 force-pushed the fix/profiler-py311-alien-frame-objects branch from 450cb19 to 735b639 Compare February 1, 2023 14:54
Comment thread ddtrace/profiling/collector/_traceback.pyx Outdated
Comment thread ddtrace/profiling/collector/_traceback.pyx Outdated
Comment thread ddtrace/profiling/collector/_traceback.pyx Outdated
Comment thread releasenotes/notes/profiler-py311-alien-frame-objects-a7eca2f7dd3270c1.yaml Outdated
Following reports of Python 3.11 returning non-frame objects while
unwinding the stack of a running thread, this change adds handling
code that prevents exceptions from being raised.
@P403n1x87 P403n1x87 changed the title fix(profiler): handle non-frame objects while stack unwinding fix(profiler): handle non-frame objects while stack-unwinding Feb 1, 2023
@P403n1x87
P403n1x87 force-pushed the fix/profiler-py311-alien-frame-objects branch from 735b639 to 8e73fd6 Compare February 1, 2023 16:48
@P403n1x87
P403n1x87 force-pushed the fix/profiler-py311-alien-frame-objects branch from 4cd5af9 to d4a7773 Compare February 1, 2023 17:28
@codecov-commenter

codecov-commenter commented Feb 1, 2023

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.94%. Comparing base (eee4692) to head (4cb68f3).
⚠️ Report is 1061 commits behind head on 1.x.

Additional details and impacted files
@@           Coverage Diff           @@
##              1.x    #5019   +/-   ##
=======================================
  Coverage   74.94%   74.94%           
=======================================
  Files         824      824           
  Lines       63823    63823           
=======================================
+ Hits        47831    47832    +1     
+ Misses      15992    15991    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

brettlangdon
brettlangdon previously approved these changes Feb 1, 2023
Comment thread releasenotes/notes/profiler-py311-alien-frame-objects-a7eca2f7dd3270c1.yaml Outdated
@P403n1x87
P403n1x87 enabled auto-merge (squash) February 2, 2023 11:20
@P403n1x87
P403n1x87 merged commit ea7c9c6 into DataDog:1.x Feb 2, 2023
@Yun-Kim Yun-Kim mentioned this pull request Feb 6, 2023
brettlangdon pushed a commit that referenced this pull request Feb 10, 2023
Following reports of Python 3.11 returning non-frame objects while
unwinding the stack of a running thread, this change adds handling code
that prevents exceptions from being raised.

(cherry picked from commit ea7c9c6)
majorgreys pushed a commit that referenced this pull request Feb 10, 2023
…rt 1.8] (#5091)

Backport ea7c9c6 from #5019 to 1.8.

Following reports of Python 3.11 returning non-frame objects while
unwinding the stack of a running thread, this change adds handling code
that prevents exceptions from being raised.

## Checklist

- [x] Change(s) are motivated and described in the PR description.
- [x] Testing strategy is described if automated tests are not included
in the PR.
- [x] Risk is outlined (performance impact, potential for breakage,
maintainability, etc).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines)
are followed.
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/)).


## Reviewer Checklist

- [x] Title is accurate.
- [x] No unnecessary changes are introduced.
- [x] Description motivates each change.
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [x] Testing strategy adequately addresses listed risk(s).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] Release note makes sense to a user of the library.

Co-authored-by: Gabriele N. Tornetta <[email protected]>
brettlangdon pushed a commit that referenced this pull request Feb 10, 2023
Following reports of Python 3.11 returning non-frame objects while
unwinding the stack of a running thread, this change adds handling code
that prevents exceptions from being raised.

(cherry picked from commit ea7c9c6)
brettlangdon pushed a commit that referenced this pull request Feb 10, 2023
Following reports of Python 3.11 returning non-frame objects while
unwinding the stack of a running thread, this change adds handling code
that prevents exceptions from being raised.

(cherry picked from commit ea7c9c6)
brettlangdon pushed a commit that referenced this pull request Feb 10, 2023
Following reports of Python 3.11 returning non-frame objects while
unwinding the stack of a running thread, this change adds handling code
that prevents exceptions from being raised.

(cherry picked from commit ea7c9c6)
brettlangdon pushed a commit that referenced this pull request Feb 10, 2023
…rt 1.7] (#5090)

Backport ea7c9c6 from #5019 to 1.7.

Following reports of Python 3.11 returning non-frame objects while
unwinding the stack of a running thread, this change adds handling code
that prevents exceptions from being raised.

## Checklist

- [x] Change(s) are motivated and described in the PR description.
- [x] Testing strategy is described if automated tests are not included
in the PR.
- [x] Risk is outlined (performance impact, potential for breakage,
maintainability, etc).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines)
are followed.
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/)).


## Reviewer Checklist

- [x] Title is accurate.
- [x] No unnecessary changes are introduced.
- [x] Description motivates each change.
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [x] Testing strategy adequately addresses listed risk(s).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] Release note makes sense to a user of the library.

Co-authored-by: Gabriele N. Tornetta <[email protected]>
ZStriker19 pushed a commit that referenced this pull request Feb 17, 2023
….11 (#5153)

This PR removes the known issue release note for the profiler on Python
3.11 relating to `PyFrameObjects`, which was mitigated by #5019.
## Checklist

- [x] Change(s) are motivated and described in the PR description.
- [x] Testing strategy is described if automated tests are not included
in the PR.
- [x] Risk is outlined (performance impact, potential for breakage,
maintainability, etc).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines)
are followed.
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/)).
- [x] Author is aware of the performance implications of this PR as
reported in the benchmarks PR comment.

## Reviewer Checklist

- [x] Title is accurate.
- [x] No unnecessary changes are introduced.
- [x] Description motivates each change.
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [x] Testing strategy adequately addresses listed risk(s).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] Release note makes sense to a user of the library.
- [x] Reviewer is aware of, and discussed the performance implications
of this PR as reported in the benchmarks PR comment.
ZStriker19 pushed a commit that referenced this pull request Feb 17, 2023
….11 (#5153)

This PR removes the known issue release note for the profiler on Python
3.11 relating to `PyFrameObjects`, which was mitigated by #5019.
## Checklist

- [x] Change(s) are motivated and described in the PR description.
- [x] Testing strategy is described if automated tests are not included
in the PR.
- [x] Risk is outlined (performance impact, potential for breakage,
maintainability, etc).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines)
are followed.
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/)).
- [x] Author is aware of the performance implications of this PR as
reported in the benchmarks PR comment.

## Reviewer Checklist

- [x] Title is accurate.
- [x] No unnecessary changes are introduced.
- [x] Description motivates each change.
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [x] Testing strategy adequately addresses listed risk(s).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] Release note makes sense to a user of the library.
- [x] Reviewer is aware of, and discussed the performance implications
of this PR as reported in the benchmarks PR comment.

(cherry picked from commit 066688c)
brettlangdon pushed a commit that referenced this pull request Feb 17, 2023
….11 [backport #5153 to 1.8] (#5154)

Backport of #5153 to 1.8

This PR removes the known issue release note for the profiler on Python
3.11 relating to `PyFrameObjects`, which was mitigated by #5019.
## Checklist

- [x] Change(s) are motivated and described in the PR description.
- [x] Testing strategy is described if automated tests are not included
in the PR.
- [x] Risk is outlined (performance impact, potential for breakage,
maintainability, etc).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines)
are followed.
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/)).
- [x] Author is aware of the performance implications of this PR as
reported in the benchmarks PR comment.

## Reviewer Checklist

- [x] Title is accurate.
- [x] No unnecessary changes are introduced.
- [x] Description motivates each change.
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [x] Testing strategy adequately addresses listed risk(s).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] Release note makes sense to a user of the library.
- [x] Reviewer is aware of, and discussed the performance implications
of this PR as reported in the benchmarks PR comment.

Co-authored-by: Yun Kim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Profiling Continous Profling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants