[Zope] Can't reproduce :-(

Ian Sealy Ian.Sealy@bristol.ac.uk
Fri, 26 Jan 2001 12:55:30 +0000 (GMT)


Dear all,

> > > > We need to get this fixed ASAP so my boss has told me to send this
> > > > message to the list and offer 400 pounds (sterling) to anyone who can
> > > > fix this bug. Any takers?
> > >
> > > What version of Zope are you using?
> > 
> > 2.2.5 on Red Hat 6.2.
> 	> 
> > Zope version: Zope 2.2.5 (source release, python 1.5.2, linux2)
> > Python version: 1.5.2 (#1, Nov 18 2000, 20:03:24) [GCC egcs-2.91.66 19990314/Linux (egcs-
> > System Platform: linux2
> 
> Well, sorry to say, on Zope 2.2.4 and 2.2.5 under Linux and WinNT using files
> between 1kb and 110Mb (Boy, did Netscape like that ;-), I can't reproduce this
> :-(
> 
> If anyone comes up with a fail safe way of reproducing the bug, I'd love to nail
> it, 'cos it sounds like fun :-)

I've finally managed to replicate the bug consistently, so I've just
submitted it to the Collector:

	http://classic.zope.org:8080/Collector/1895/view

I now know what causes it so I'm able to work around it, which means
that I'm afraid the offer of 400 quid to fix the bug is now
withdrawn. Sorry.

The bug only occurs if the DTML Method that adds the large file tries to
call a Z SQL Method that uses the ZPyGreSQLDA. Here's the description I
just submitted to the Collector:

Occurs on Zope 2.2.5 with ZPyGreSQLDA-0-0-3 installed. If you have a
form like this:

<form action="addfile" method="POST" enctype="multipart/form-data">
<input type="file" name="file"><br>
Filename: <input type="text" name="filename"><br>
<input type="submit" value="Upload">
</form>

and a DTML Method called addfile:

<dtml-in expr="sql()"></dtml-in>
<dtml-call expr="manage_addFile(filename, file=file)">
OK

where sql is a Z SQL Method that uses a PyGreSQL database connection.
Trying to upload a file larger than about 128 kb gives:

Error Type: AttributeError
Error Value: abort_sub

Traceback (innermost last):
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook
    (Object: Traversable)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 175, in publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 235, in commit
  File /usr/local/zope/lib/python/ZODB/Transaction.py, line 290, in commit
AttributeError: (see above)

Cheers,
Ian