Skip to content

Conversation

@clutchski
Copy link
Contributor

No description provided.

@clutchski clutchski merged commit 7d5111a into master Jan 25, 2017
@clutchski clutchski deleted the matt/falcon branch January 25, 2017 22:32
taegyunkim added a commit that referenced this pull request Nov 10, 2025
## Description

<!-- Provide an overview of the change and motivation for the change -->
From a recent profiling escalation, we've seen a flamegraph where
forksafe lock is calling into patched profiling lock.
<img width="918" height="329" alt=" "
src="https://github.com/user-attachments/assets/3bff0b94-4ad7-49b1-847f-61812e2f43eb"
/>

The library used in above flamegraph is version 3.17.0.

From the leaf frame
1. [_release
(_lock.py:#155)](https://github.com/DataDog/dd-trace-py/blob/7451e8468236787abefb164407a8bd75dd005501/ddtrace/profiling/collector/_lock.py#L155)
2. [\_\_exit__
(_lock.py:L#206)](https://github.com/DataDog/dd-trace-py/blob/7451e8468236787abefb164407a8bd75dd005501/ddtrace/profiling/collector/_lock.py#L206)
3. [start
(service.py:L#57)](https://github.com/DataDog/dd-trace-py/blob/7451e8468236787abefb164407a8bd75dd005501/ddtrace/internal/service.py#L57)


https://github.com/DataDog/dd-trace-py/blob/7451e8468236787abefb164407a8bd75dd005501/ddtrace/internal/service.py#L57-L61

`self._service_lock` is declared as a `forksafe.Lock()` 


https://github.com/DataDog/dd-trace-py/blob/7451e8468236787abefb164407a8bd75dd005501/ddtrace/internal/service.py#L33

## Testing

<!-- Describe your testing strategy or note what tests are included -->

## Risks

<!-- Note any risks associated with this change, or "None" if no risks
-->

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants