Closed
Bug 71962
Opened 24 years ago
Closed 24 years ago
file uploads don't finish
Categories
(Core :: Networking: HTTP, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.8.1
People
(Reporter: blizzard, Assigned: darin.moz)
References
Details
(Whiteboard: critical for mozilla 0.8.1 - can't reproduce)
Attachments
(50 files)
108.52 KB,
image/jpeg
|
Details | |
19.00 KB,
image/jpeg
|
Details | |
11.52 KB,
image/jpeg
|
Details | |
35.68 KB,
image/jpeg
|
Details | |
35.92 KB,
image/jpeg
|
Details | |
40.91 KB,
image/jpeg
|
Details | |
35.92 KB,
image/jpeg
|
Details | |
40.17 KB,
image/jpeg
|
Details | |
40.91 KB,
image/jpeg
|
Details | |
35.92 KB,
image/jpeg
|
Details | |
100 bytes,
application/octet-stream
|
Details | |
1000 bytes,
application/octet-stream
|
Details | |
9.77 KB,
application/octet-stream
|
Details | |
35.92 KB,
image/jpeg
|
Details | |
35.92 KB,
image/jpeg
|
Details | |
60 bytes,
image/gif
|
Details | |
310 bytes,
image/jpeg
|
Details | |
40.17 KB,
image/jpeg
|
Details | |
38.43 KB,
image/jpeg
|
Details | |
38.43 KB,
image/jpeg
|
Details | |
40.17 KB,
image/jpeg
|
Details | |
35.92 KB,
image/jpeg
|
Details | |
14.91 KB,
text/plain
|
Details | |
35.92 KB,
image/jpeg
|
Details | |
18.46 KB,
text/plain
|
Details | |
38.66 KB,
image/jpeg
|
Details | |
38.66 KB,
image/jpeg
|
Details | |
38.66 KB,
image/jpeg
|
Details | |
38.66 KB,
image/jpeg
|
Details | |
35.92 KB,
image/jpeg
|
Details | |
38.45 KB,
image/jpeg
|
Details | |
35.92 KB,
image/jpeg
|
Details | |
35.92 KB,
image/jpeg
|
Details | |
35.92 KB,
image/jpeg
|
Details | |
35.92 KB,
image/jpeg
|
Details | |
35.92 KB,
image/jpeg
|
Details | |
35.92 KB,
image/jpeg
|
Details | |
5.41 KB,
patch
|
Details | Diff | Splinter Review | |
40.17 KB,
image/jpeg
|
Details | |
5.44 KB,
patch
|
Details | Diff | Splinter Review | |
40.17 KB,
image/jpeg
|
Details | |
40.17 KB,
image/jpeg
|
Details | |
40.17 KB,
image/jpeg
|
Details | |
40.17 KB,
image/jpeg
|
Details | |
40.17 KB,
image/jpeg
|
Details | |
5.55 KB,
patch
|
Details | Diff | Splinter Review | |
40.17 KB,
image/jpeg
|
Details | |
6.00 KB,
patch
|
Details | Diff | Splinter Review | |
6.22 KB,
patch
|
Details | Diff | Splinter Review | |
40.17 KB,
image/jpeg
|
Details |
When posting a screenshot to bugzilla my file upload never finished and the
resulting image in bugzilla is damaged. Have a look in bug 71958 to see the
uploaded images. When you upload the file the spinner keeps going until you get
a complaint that "the operation timed out."
My build is from a pull at about 6 AM pacific time on March 14th.
Reporter | ||
Updated•24 years ago
|
Whiteboard: critical for mozilla 0.8.1
Comment 1•24 years ago
|
||
cc: pollman, who fixed yesterday's file submission blocker (bug 71834).
Perhaps this is form submission
Reporter | ||
Comment 2•24 years ago
|
||
marking as a blocker
Severity: normal → blocker
Target Milestone: --- → mozilla0.8.1
Assignee | ||
Comment 4•24 years ago
|
||
Assignee | ||
Comment 5•24 years ago
|
||
The image I just posted (attachment 27726 [details]) seemed to go through without any
problems. Perhaps the image size matters. I'm going to try posting a smaller
image...
Assignee | ||
Comment 6•24 years ago
|
||
Assignee | ||
Comment 7•24 years ago
|
||
Assignee | ||
Comment 8•24 years ago
|
||
Assignee | ||
Comment 9•24 years ago
|
||
I've successfully uploaded 4 different images with a variety of sizes, and none
of them got corrupted. Sounds like this could be heavily dependant on your
network configuration... perhaps the timeout was a fluke?? But, then it seems
you were able to duplicate the problem, so I think I'm a little bit stuck.
Can someone help me generate a test case for this? Thanks!
Keywords: qawanted
Assignee | ||
Comment 10•24 years ago
|
||
blizzard: what is your network configuration btw? are you connecting through
a proxy?
Reporter | ||
Comment 11•24 years ago
|
||
I'm not using a proxy and I have a reasonably fast connection to the net. 2.2 DSL.
Reporter | ||
Comment 12•24 years ago
|
||
Assignee | ||
Comment 13•24 years ago
|
||
Ok.. let me see what happens when I upload a 41k file.
Assignee | ||
Comment 14•24 years ago
|
||
Assignee | ||
Comment 15•24 years ago
|
||
OK.. I'm still not seeing the problem. Blizzard: can you try uploading your
41k file using a version of the browser (or some other browser) that doesn't
exhibit this problem. I'd like to be able to send the exact same number of
bytes. Thanks!
Assignee | ||
Comment 16•24 years ago
|
||
Blizzard: what version of Linux are you running? My tests are on a pretty
box-stock redhat 6.2 machine (dual processor machine). Perhaps this has
something to do with it. On that note, is anyone seeing this on other
platforms?
Reporter | ||
Comment 17•24 years ago
|
||
Reporter | ||
Comment 18•24 years ago
|
||
Reporter | ||
Comment 19•24 years ago
|
||
I uploaded the same file with my build and Netscape 4.7. My build fails but the
Netscape 4.7 works fine.
I'm using RH 7.<mumble> here. Let me respin to see if maybe I missed a file or
something.
Comment 20•24 years ago
|
||
Reporter | ||
Comment 21•24 years ago
|
||
Reporter | ||
Comment 22•24 years ago
|
||
Reporter | ||
Comment 23•24 years ago
|
||
Reporter | ||
Comment 24•24 years ago
|
||
Reporter | ||
Comment 25•24 years ago
|
||
Strange. I can upload that 10,000 byte type without problems. Maybe it's
related to the content of the file itself.
Reporter | ||
Comment 26•24 years ago
|
||
Reporter | ||
Comment 27•24 years ago
|
||
Reporter | ||
Comment 28•24 years ago
|
||
Reporter | ||
Comment 29•24 years ago
|
||
Reporter | ||
Comment 30•24 years ago
|
||
OK, those work fine. Darin, can you try downloading the good image that I
uploaded with Netscape 4.7 and uploading it yourself?
Assignee | ||
Comment 31•24 years ago
|
||
Assignee | ||
Comment 32•24 years ago
|
||
blizzard: your 41k image uploaded perfectly from my 0.8.1 build on my rh7
machine!! What the f*&#!!
Comment 33•24 years ago
|
||
ok, to move this off the 0.8.1 list???
looks like things working ok now???
Whiteboard: critical for mozilla 0.8.1 → critical for mozilla 0.8.1 - can't reproduce
Reporter | ||
Comment 34•24 years ago
|
||
Darin, you're right next to bugzilla. Try uploading to the silophone or something.
Assignee | ||
Comment 35•24 years ago
|
||
I'm not sure what to do about this. It works for me but it doesn't seem to
work for Blizzard. And, we are apparently testing identical builds... the
only variable seems to be in our OS's.
Can we get some more QA testing this?
Assignee | ||
Comment 36•24 years ago
|
||
OK, but my test upload of your 41k file was from home over an ISDN line... not
from mountain view! All the same, I will try uploading to a remote system.
Perhaps the combination of a faster connection to a remote host will demonstrate
the problem?!?
Assignee | ||
Comment 37•24 years ago
|
||
I'm going to be out of town for the next two days, so if this is REALLY
important for moz 0.8.1, then someone else needs to own it.
Comment 38•24 years ago
|
||
I think that this is REALLY important for release. Lets see how long this might
take to fix before we commit to holding the release though.
Comment 39•24 years ago
|
||
Comment 40•24 years ago
|
||
Comment 41•24 years ago
|
||
Seeing also with Mozilla PC Linux 2001031611 and Redhat Linux 7
Comment 42•24 years ago
|
||
I ran into this bug yesterday with Win NT sp6a nightly build 2001031604.
While attempting to upload a screenshot to Mozdev's bugzilla at
http://mozdev.org/bugs/show_bug.cgi?id=219
Network Configuration is Win NT connected to a e-smith 4.1 gateway (based on RH
7.0) with a ADSL line that tests at 380 K upload time.
Three attempts to upload with Mozilla timed out and resulted in damaged images,
Netscape 4.76 uploaded the file with no problem.
Comment 43•24 years ago
|
||
I tested it with ISDN upload so it don't seem to be related to speed?
Assignee | ||
Comment 44•24 years ago
|
||
Assignee | ||
Comment 45•24 years ago
|
||
Blizzard: could you (or anyone else who's seeing this bug) please attach a
socket transport log (NSPR_LOG_MODULES=nsSocketTransport:5)... thanks!!
Reporter | ||
Comment 46•24 years ago
|
||
Reporter | ||
Comment 47•24 years ago
|
||
Reporter | ||
Comment 48•24 years ago
|
||
Reporter | ||
Comment 49•24 years ago
|
||
Assignee | ||
Comment 50•24 years ago
|
||
Blizzard: the logs look very interesting... especially the socket TIMED OUT
error during the AsyncRead (though not sure if this could explain the
corruption)... still looking.
Assignee | ||
Comment 51•24 years ago
|
||
From the logs it appears that only 37624 bytes were actually written. However,
I don't see anything in the logs that would explain this.
Comment 52•24 years ago
|
||
Is the log enough to show that (however impossible it might seem) some very
constrained bad thing is happening? Or could a million bad things be going
wrong, and more tracing info is needed?
/be
Assignee | ||
Comment 53•24 years ago
|
||
Brendan: not sure exactly what could be wrong... necko is not complaining about
anything, but that hardly means that it's off the hook.
Blizzard: can you check the size of your /tmp/formpost-XX file corresponding
to the corrupted upload? thanks!
Reporter | ||
Comment 54•24 years ago
|
||
Reporter | ||
Comment 55•24 years ago
|
||
Assignee | ||
Comment 56•24 years ago
|
||
Blizzard: can you check the /tmp/formpost-xx file? what is it's size? thankx!
Reporter | ||
Comment 57•24 years ago
|
||
Reporter | ||
Comment 58•24 years ago
|
||
Reporter | ||
Comment 59•24 years ago
|
||
Reporter | ||
Comment 60•24 years ago
|
||
Reporter | ||
Comment 61•24 years ago
|
||
Reporter | ||
Comment 62•24 years ago
|
||
Reporter | ||
Comment 63•24 years ago
|
||
Reporter | ||
Comment 64•24 years ago
|
||
Reporter | ||
Comment 65•24 years ago
|
||
Reporter | ||
Comment 66•24 years ago
|
||
Assignee | ||
Comment 67•24 years ago
|
||
Reporter | ||
Comment 68•24 years ago
|
||
Comments:
When you are doing the translation in nsHTTPEncodeStream::Read() to the passed
in buffer what's to prevent you from overwriting the end of the buffer? You are
adding characters.
rv = writer(this, closure, mBuf + mBufCursor, offset, amt, &amt);
if (rv == NS_BASE_STREAM_WOULD_BLOCK)
return NS_OK; // mask this error
You aren't updating the amt from the return of that which will probably cause
some badness down the road.
Now to do some testing...
Reporter | ||
Comment 69•24 years ago
|
||
Assignee | ||
Comment 70•24 years ago
|
||
Blizzard:
1) ReadNext() ensures that the buffer will not be overrun.
2) amt is reset/computed at the top of the loop, but offset should be
updated as well. Attaching new patch.
Reporter | ||
Comment 71•24 years ago
|
||
This patch didn't fix the problem. In fact it seems to have caused another more
serious problem. Now the file uploads and it's apparently successful but the
http thread gets stuck in:
1026[81399a0]: nsSocketTransport: PR_Write(count=1007) returned 1007
and has the CPU pegged. Hitting cancel will make the browser hang, probably
trying to cancel the request.
Assignee | ||
Comment 72•24 years ago
|
||
Reporter | ||
Comment 73•24 years ago
|
||
Assignee | ||
Comment 74•24 years ago
|
||
Reporter | ||
Comment 75•24 years ago
|
||
Reporter | ||
Comment 76•24 years ago
|
||
Assignee | ||
Comment 77•24 years ago
|
||
Assignee | ||
Comment 78•24 years ago
|
||
Reporter | ||
Comment 79•24 years ago
|
||
Assignee | ||
Comment 80•24 years ago
|
||
Comment 81•24 years ago
|
||
I was IRC'ing with darin as the last patch developed, focused on crucial stuff.
Nit comments only below, take 'em or leave 'em -- sr=brendan@mozilla.org either
way, we need the crucial fixes for 0.8.1:
+ char *mBuf; // ReadSegments buffer
+ PRUint32 mBufCursor; // index into mBuf of unread data
+ PRUint32 mBufSize; // amount of unread data in buffer
mBufSize is a misleading name next to mBuf (it's not the size in bytes of the
allocation at mBuf). How about mBufUnread or mBufLength (vaguer, mBufUnread
says it all)?
From ReadNext:
if (NS_FAILED(rv)) return rv;
+ *result += amt;
if (rv == NS_BASE_STREAM_WOULD_BLOCK || amt == 0)
return rv;
Isn't NS_BASE_STREAM_WOULD_BLOCK a failure code? Maybe the first clause of that
|| is useless and you just want
if (amt == 0) return rv;
? If so, save a useless += 0 and put the *result += amt; after that if-then.
+ NS_ENSURE_ARG_POINTER(buf);
+ NS_ENSURE_ARG_POINTER(countRead);
These are just cycle-wasting worry-beads, no? Read is called only within this
module or by other code in Necko, and Necko is a sufficiently closed system that
you need assertions (at most), not runtime checks, that no one was insane enough
to pass null for a in string or out int param. Or it had better be, else I will
look for CVS vouchers to chastise!
+ if (rv == NS_BASE_STREAM_WOULD_BLOCK)
+ return NS_OK; // mask this error
+ else if (NS_FAILED(rv))
+ return rv;
+ else if (amt == 0)
+ return NS_OK;
else after return twice here, non-sequitur alert! But this confirms that rv ==
NS_BASE_STREAM_WOULD_BLOCK needs to be checked before NS_FAILED(rv).
More nits in that other bug darin's filing about gratuitous string copying in
ReadNext -- darin, what's that bug #? Thanks.
/be
Comment 82•24 years ago
|
||
a=asa for checkin to the branch (on behalf of drivers). Do we still need an r= ?
Assignee | ||
Comment 83•24 years ago
|
||
Assignee | ||
Comment 84•24 years ago
|
||
r=blizzard, sr=brendan (as i understand it)
Comment 85•24 years ago
|
||
Great!
Assignee | ||
Comment 86•24 years ago
|
||
brendan: i've opened bug 72738 to track removing the extra buffer copies from
nsHTTPEncodeStream::ReadNext().
Comment 87•24 years ago
|
||
*** Bug 72680 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 88•24 years ago
|
||
Ok, I've checked in the fix on both the trunk and the 0.8.1 branch.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 89•24 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•