Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous segfaults #40

Closed
jredrejo opened this issue Jun 13, 2018 · 5 comments
Closed

Continuous segfaults #40

jredrejo opened this issue Jun 13, 2018 · 5 comments

Comments

@jredrejo
Copy link

I am trying to use pyinstrument in a Django project and it's segfaulting in almost every page. In this case, every page is the html itself plus some API requests that are done from the page JavaScript to the same Django server.
I have managed to solve it adding a filter that allows me to profile only one of the requests. The code for the filter is in this commit: jredrejo@004a66c

The project I am profiling is https://github.com/learningequality/kolibri . I added the middleware setup at
https://github.com/learningequality/kolibri/blob/develop/kolibri/deployment/default/settings/base.py

The problem happens whenever PYINSTRUMENT_PROFILE_DIR is set, I need it to profile the api requests.

@joerick
Copy link
Owner

joerick commented Jun 16, 2018

Wow, interesting! Perhaps we could be seeing some thread danger in pyinstrument_cext? Are you able to provide a more minimal example or some instructions to recreating in your repo?

@jredrejo
Copy link
Author

Sure, as I commented in my previous message, I was trying to profile kolibri, http://kolibri-dev.readthedocs.io/en/develop/start/getting_started.html#setting-up-kolibri-for-development contains all the instructions to do the testing. I added the pyinstrument setup in the file https://github.com/learningequality/kolibri/blob/develop/kolibri/deployment/default/settings/base.py

@joerick
Copy link
Owner

joerick commented Jul 17, 2018

Started to work on a fix for this over at joerick/pyinstrument_cext#3

@joerick
Copy link
Owner

joerick commented Jul 18, 2018

Hi @jredrejo, this should be fixed in the latest version, v2.0.4. Let me know if it works for you!

@jredrejo
Copy link
Author

Thanks very much. Yes, upgrading pyinstrument_cext to 0.2.0 solves the problem!!

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

No branches or pull requests

2 participants