Comments (5)
Does raising the sampling frequency to say, 5, remove the issue?
from djdt-flamegraph.
I haven't actually tried that.
Background: I was trying to figure out why precisely django-pipeline caused an 800ms delay in my template render, and I hacked the django-pipeline source to do the subprocess invocation in the main thread instead of using concurrent.futures.ThreadPoolExecutor. That's when I stumbled upon this problem. It's a classical race condition: sometimes clone() finishes before the next SIGALRM arrives, and so I was able to see the flame graph I was interested in after a few retries (that required me to kill and restart the livelocked django server).
This issue is not causing me pain, since I reverted the debugging change to django-pipeline once I was done investigating. I only filed a bug because I thought the problem analysis might be useful to anyone else who happens to encounter this issue.
I expect raising the sampling interval to 5 ms would make this problem harder to hit, but not remove the underlying issue.
from djdt-flamegraph.
Apparently you can ask that signals not interrupt system calls with signal.siginterrupt(sig, False)
.
Source: https://news.ycombinator.com/item?id=9243855
from djdt-flamegraph.
Ah, cool thank you. Does it work for you?
Sorry about the lack of updates. It has been working for us and I've been really busy lately. I still have this on my TODO though 😄
from djdt-flamegraph.
I haven't had a chance to try it out yet.
(Also, oops, I see I promised some smaller PRs doing something about the sampling inaccuracies I mentioned in #1, and I haven't delivered yet. Been busy too :/ What's worse -- I completely forgot the ball was in my court!)
from djdt-flamegraph.
Related Issues (7)
- 500: INTERNAL SERVER ERROR HOT 2
- ValueError: signal only works in main thread HOT 3
- make example returns error HOT 1
- Signal handling may be delayed, which leads to dropped samples HOT 6
- nicer error page for missing start parameters HOT 4
- AttributeError: 'NoneType' object has no attribute 'get' when this package is installed. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from djdt-flamegraph.