-
Notifications
You must be signed in to change notification settings - Fork 915
Client segfaults when threads are used #78
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
Comments
Note had to install Python 3.4 on Ubuntu Precise via third party package because the Travis Precise image comes with Python 3.2, and that was giving me trouble with pip/virtualenv. |
Also, 3.4 is what's used in the Travis CI in #40, where we first saw the segfaults. A proper way to replicate the exact environment would be to use Travis' CLI and build plugin to generate the real build.sh command that's run in the actual environment, but this seemed good enough to replicate the seg faults. |
Here's the output of
|
This discussion makes me pretty nervous. The producer callback seems fine, but I noticed some callbacks in the consumer as well. I haven't dug into this much, but I did notice that I have to comment out EVERY instance of If I remove test_Consumer.py, test_Producer.py, and test_threads.py(), the tests on #40 pass. If I add just a single call to |
Attaching a diff off of master since #40 has had a force push applied to it that lost the checksum I mentioned. Not super relevant, since you can reproduce this off of master with the thread diff above, but just for historical purposes. |
The provided test_threads.py patch doesn't really work (undefined variables, func parameter order error), can you provide an example that works(but segfaults)? |
Issues with that part of the code are irrelevant. It seg faults before it even gets there. I have double checked. Follow the instructions at the top of the issue, but just use master (instead of PR 40). Put the thread diff in /tmp/diff.diff and apply it (with bad params or whatever):
Then run the tests using the command shown at the top of the isssue. It seg faults. If you feel compelled to re-order the params, and fix the exit_flag variable, go for it. It doesn't matter. |
The crash occurs when Producer or Consumer initprocs raise an exception |
:( Any idea why? |
Yes sir, fix is on the way! |
Thank you for the repro env and everything |
Woot! |
As part of #40, we started noticing that our tests were failing with a segfault in the Travis CI container, but only for Python 3.4.
We were unable to reproduce this locally on our laptops, but with Docker, and using a Travis CI container, we can. Here are the steps to trigger a segfault:
Once you're in your Docker container, run these commands:
This will show a segfault before the tests finish.
Furthermore, I'm able to trigger this on
master
without any of our changes. After the above commands, run:Then apply this diff:
It's just some example of Python threading that I found on Stack Overflow. After the diff is applied, run the same py.test command again. It will again segfault.
The text was updated successfully, but these errors were encountered: