Bug 247140 - mod_python 3.1 has issues with some large files
mod_python 3.1 has issues with some large files
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mod_python (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Joe Orton
Depends On:
  Show dependency treegraph
Reported: 2007-07-05 12:31 EDT by Todd Warner
Modified: 2012-06-20 09:28 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-20 09:28:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Todd Warner 2007-07-05 12:31:44 EDT
Description of problem:
mod_python 3.1 (and not mod_python 3.2 and mayhas issues with large files. As
far as I can tell, it's only with files that don't have carriage returns since
the logic in the module does a readline instead of a sensible read. It tries to
read in more than possible in one chunk. Refer to this conversation:


Version-Release number of selected component (if applicable):
[twarner@twarner ~]$ rpm -q mod_python

How reproducible:

Steps to Reproduce:
1. create a 1.5G or even 550M (I believe) file from /dev/urandom via dd
2. pump that file through mod_python via an upload of some sort. I am using
logic similar to this:
Actual results:
MemoryError. Here's my traceback...

[twarner@twarner ~]$ curl -k -F

Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

  File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, in
    result = object(req)

  File "/usr/lib/python2.3/site-packages/mod_python/publisher.py", line 134, in
    req.form = util.FieldStorage(req, keep_blank_values=1)

  File "/usr/lib/python2.3/site-packages/mod_python/util.py", line 133, in __init__
    line = req.readline()


Expected results:
Transfer of the file without error. As you can see, I am doing it via an API
through python's mod_python.publisher

Additional info:
This issue is fixed in mod_python 3.2 apparently
Comment 1 Joe Orton 2007-07-23 08:50:19 EDT
Can you try rebuilding the source RPM from:


to see if that fixes the issue?
Comment 2 Todd Warner 2007-07-23 12:36:24 EDT
This did not fix the issue. Take a look at line 133 in util.py on RHEL4 versus
line 157 in util.py in the version on FC6 (mod_python-3.2.8-3.1).

The version you gave me does not stop the readline from sucking in a 2G file.

Comment 3 Jiri Pallich 2012-06-20 09:28:33 EDT
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.

Note You need to log in before you can comment on or make changes to this bug.