-
Notifications
You must be signed in to change notification settings - Fork 268
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
mod_wsgi child thread segfaults when something is printed to stdout #147
Comments
Most likely a regression. The person who asked for the changes related to logging never responded when asked to test them prior to release. Eventually came back complaining that couldn't download official release with changes already in it. After pointing out once again they need to test from repo, still didn't get an acknowledgement that okay and didn't cause any issues. My own quick testing didn't pick up an issue, so couldn't really keep holding it back. Obviously missed something. Will look into it. |
No problem. I would have looked into this myself but unfortunately have no time to do that ATM. Feel free to ping me if you need some more information about my environment or how to reproduce this. |
Where would the What made you determine that it was the |
|
Was there anything fancy about the |
What OS are you on? Linux? If you have
and if that doesn't cause startup itself to fail, see if that gives you a back trace in If you are on MacOS X this may well not work. Not sure why but trying to use |
It's Fedora 24 docker container, I didn't realize that I should mention that as well. I can try using --debug-mode and --enable-gdb, but I'm not sure what that will do in docker container... I'll try and see. |
Oh, and to answer the previous question, it was just a plain |
Is unlikely you would have gdb in Docker container. Even if did, would likely need to run container manually and with |
Hmm, wondering whether issue may be Python 3. I only tested with Python 2.7 as wouldn't have expected Python 3 to be different as far as changes made. |
Yep, can crash it with Python 3.4. |
Location found. Due to differences in file type objects in Python 3. Not sure what yet.
|
@bkabrda Can you try your application with:
and see if that eliminates the problem? |
Sure, give me like an hour and I'll post back the results... I'll have to rebuild a pretty big image and then try testing thoroughly. |
I am going to take a punt and release it, it can't be worse. My own Docker images are a pain to rebuild based on a branch. |
Hmm, it seems that this doesn't fix the problem. The issue is still the same. |
Very important to make sure is now running 4.5.5. The |
Yup, I copied the whole string and also pip3 lists mod_wsgi as 4.5.5 in the running container:
Here's something interesting - I tried using
|
The fault handler is being naughty. It is assuming that stdout/stderr streams are associated with a file descriptor that it can write to directly. That isn't the case under mod_wsgi. |
Ah, ok, sorry for the confusion then. Anything else I can try to help you debugging this? |
I have pushed a further change. Not confident that this will solve it. I can't replicate with this change, but after first change I also wasn't seeing issue until you came back and said it was still failing, at which point it started showing for me again. |
Ok, I'll test again, give me couple of minutes (it seems that an hour was an overestimation :)) |
BTW. Instead of that URL gave before, can use: |
I tried rebuilding the image with the develop.zip archive, but it's still failing for me with the same error message. |
Yep it will fail. I have been getting caught over the trap of using |
Giving up for the night. Getting memory corruption all over the place now and can’t even get sane stack traces from gdb. Nothing making sense. Will start over tomorrow. |
Sure. Give me a shout when you need testing again. Good night! :) |
Reason for problem found. Under Python 3 file like objects when used to replace |
4.5.6 works for me, thanks! |
Closing this issue as presume all fixed now. |
Hi, so I've been using mod_wsgi express successfully for couple of months now. Today I updated to 4.5.4 and part of my app that did a forgotten debug
print()
started to fail:When I downgraded to 4.5.3, the issue disappeared, which makes me think this is a regression in 4.5.4.
I'm using Python 3.5.1 and httpd 2.4.23; this is how I start my application:
The text was updated successfully, but these errors were encountered: