"bad argument to internal function"

14 views
Skip to first unread message

omat

unread,
Jun 15, 2007, 12:00:38 PM6/15/07
to Django users
Hi,

I have received an error mail which I couldn't quite understand. I
think someone was POSTed some bad data that caused the error, because
in the mod_python request, it says:

GET:<MultiValueDict: {}>,
POST:<could not parse>,

The posted data was so bad that it couldn't be parsed at all. Do you
have an idea, what kind of request can cause that?


Here is the traceback:

File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py",
line 77, in get_response
response = callback(request, *callback_args, **callback_kwargs)

File "/srv/django/sites/turkpop/accounts/views.py", line 140, in
ajax_login
username = request.POST['u']

File "/usr/lib/python2.4/site-packages/django/core/handlers/
modpython.py", line 69, in _get_post
self._load_post_and_files()

File "/usr/lib/python2.4/site-packages/django/core/handlers/
modpython.py", line 52, in _load_post_and_files
self._post, self._files = http.QueryDict(self.raw_post_data),
datastructures.MultiValueDict()

File "/usr/lib/python2.4/site-packages/django/core/handlers/
modpython.py", line 119, in _get_raw_post_data
self._raw_post_data = self._req.read()

SystemError: Objects/stringobject.c:3516: bad argument to internal
function

Graham Dumpleton

unread,
Jun 16, 2007, 8:05:49 PM6/16/07
to Django users
We are trying to sort out similar problem over on mod_python list at
the moment. Your case is only the second case that has been seen
although why they have both popped up only now don't know.

Anyway, issue seems to be some subtle bug in req.read() of mod_python
which only manifests when certain unknown boundary conditions are met
with respect to the block sizes of data read in. In others words, all
dependent on random nature in which read returns data, thus not
reproducible very easily.

Start of thread in mod_python mailing list archives is:

http://www.modpython.org/pipermail/mod_python/2007-June/023795.html

You might monitor that or actually get on the mod_python mailing list
describe your case and supply details on which version of Apache you
are using.

Graham

On Jun 16, 2:00 am, omat <o...@gezgin.com> wrote:
> Hi,
>
> I have received an error mail which I couldn't quite understand. I
> think someone was POSTed some bad data that caused the error, because

Reply all
Reply to author
Forward
0 new messages