[tahoe-lafs-trac-stream] [Tahoe-LAFS] #1794: upload failed -- "I/O operation on closed file"
Tahoe-LAFS
trac at tahoe-lafs.org
Fri Dec 19 23:18:39 UTC 2014
#1794: upload failed -- "I/O operation on closed file"
------------------------------+----------------------------------
Reporter: zooko | Owner:
Type: defect | Status: new
Priority: normal | Milestone: undecided
Component: code-network | Version: 1.9.2
Resolution: | Keywords: upload error twisted
Launchpad Bug: |
------------------------------+----------------------------------
Comment (by daira):
Replying to [comment:7 zooko]:
> The hypothesis is that Nevow is `close()`'ing the temp file in
[https://github.com/twisted/nevow/blob/master/nevow/static.py#L391
stopProducing]. The hypothesis is that Nevow is done producing, but Tahoe-
LAFS isn't yet done consuming!
That seems plausible to me. To test it, we should instrument Nevow to log
when it is closing the temp file; if this log entry comes just before the
"I/O operation on closed file", then we've confirmed the hypothesis.
It also seems plausible that we can work around this by `os.dup`'ing the
file handle when we get it (in `render_{PUT,POST}`), and closing our
duplicate when we are finished. (I am assuming that Nevow cannot already
have closed the file when we first get it; that would be a Nevow bug that
we can't fix.)
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1794#comment:8>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list