-
Notifications
You must be signed in to change notification settings - Fork 178
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
Another int overflow on waitress Buffers #47
Comments
I did this test to mimic the issue on append():
But i have no idea how to reliable test the handle_write() and flush() issue. |
@tseaver any idea how to test the handle_write() ? |
@marcinkuzminski can you tell whether this error is raised in the situation that @tseaver suggested? He suggested it happens when a ReadOnlyFileBasedBuffer is added to self.outbufs at https://github.com/Pylons/waitress/blob/master/waitress/channel.py#L310 . It'd mean that you were using wsgi.file_wrapper to serve a file, is that true? |
@mcdonc unfortunately i don't have access to this information (it's a machine of one of our clients) This error doesn't occur when serving files, it's a clone operation of a huge (around 6GB) mercurial repository.
in th environ |
The presence of 'wsgi.file_wrapper' in the environ doesn't really mean much; anyone who is using waitress will have this in the environ. Your test demonstrates that the append method of an OverflowableBuffer should probably use I've checked in these fixes but I'm not totally confident that my commit will fix all of the OverflowError cases; hopefully you can test the waitress master and let us know if you see any more of these in production. |
That was my first reaction to do this (fix len calls), but did you seen what error it triggered ? |
Yes. See my explanation above wrt "total_outbufs_len". I fixed more than you did. |
Great, thanks for the very detailed explanation and fixes, i'll push to test latest master on troublesome repositories. I'll share some feedback when we get it. |
@marcinkuzminski I'm closing this issue, as I'm going to assume what I did fixed your production errors. If that's not the case, please reopen. |
So it's another case of #22, now on waitress 0.8.7
Org exception was:
I did two changes just to test out:
and
Then we end up with:
The text was updated successfully, but these errors were encountered: