Closed Bug 191227 Opened 22 years ago Closed 22 years ago

file uploads hang (especially w/ slower connections or slower servers)

Categories

(Core :: Networking: HTTP, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.3beta

People

(Reporter: darin.moz, Assigned: darin.moz)

References

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

 
dummy upload for testing
What build? Upload how? How large is large? 2003012913 OS/2 trunk is perpetually
displaying "sending request to bugzilla.mozilla.org" trying to attach a 38k png
to bug 189818. I've hit "stop" several times to retry without ever making progress.
I see this problem on today's Windows build (BuildID: 2003013008) when trying to
upload a 21kb zip file to Bug 188058.
This problem exists in Windows build 2003012908, and does not exist in Windows
build 2003012508.
philip: can you please enable some environment variables and collect a log file
for me?  you can do this with any mozilla nightly build:

make sure mozilla is not running.  exit quick launch.

c:\> set NSPR_LOG_MODULES=nsHttp:5
c:\> set NSPR_LOG_FILE=c:\http.log
c:\> cd \path\to\mozilla
c:\path\to\mozilla> .\mozilla.exe

then repro the problem, exit mozilla, and upload c:\http.log to this bug report.
 thx!!
Severity: normal → critical
Status: NEW → ASSIGNED
Flags: blocking1.3b?
Priority: -- → P1
Target Milestone: --- → mozilla1.3beta
i'm able to repro this now.
Blocks: 191370
Attached file HTTP log (zipped)
This should probably get a better Summary since the problem is clearly not 
isolated to "large" file uploads.
Summary: large file uploads hang → file uploads hang (especially w/ slower connections or slower servers)
Attached patch v1 patch (obsolete) — Splinter Review
the problem is with nsBufferedInputStream::ReadSegments.  the "new order" for
nsIInputStream that was only partially laid out with the async-io landing
dictates that ReadSegments should not propogate the return value of the writer.
 with this patch, i've swept through the code fixing up every ReadSegments
implementation.

the same issue applies to WriteSegments, but believe it or not there are so few
implementations of WriteSegments in the tree.  all were fixed up with the
async-io landing.
Attachment #113145 - Flags: superreview?(bzbarsky)
Attachment #113145 - Flags: review?(dougt)
Comment on attachment 113145 [details] [diff] [review]
v1 patch

>  ReadSegments should not propogate the return value of the writer.

"Could we document that?"

>Index: rdf/base/src/nsRDFXMLDataSource.cpp
>         *_retval = 0;
>-        nsresult rv = writer (this, closure, mBuffer+mIndex, mIndex, readCount, _retval);
>+        writer (this, closure, mBuffer+mIndex, mIndex, readCount, _retval);
>         mIndex += *_retval;

As long as you're here, how about only updating mIndex if the write succeeded?

>Index: xpcom/io/nsByteArrayInputStream.cpp
>-            rv = writer (this, aClosure, &_buffer[_pos], 
>+            writer (this, aClosure, &_buffer[_pos], 
>                          _pos, readCount, aNumRead);
>         
>         _pos += *aNumRead;

Same.
Comment on attachment 113145 [details] [diff] [review]
v1 patch

r=dougt
Attachment #113145 - Flags: review?(dougt) → review+
Attached patch v1.1 patchSplinter Review
revised patch per bz's comments.

this requirement is documented already.  these input stream impls are
old/crufty impls that were never brought up-to-date with the revised input
stream requirements.  NOTE: most of them are unused.
Attachment #113145 - Attachment is obsolete: true
Attachment #113152 - Flags: superreview?(bzbarsky)
Attachment #113152 - Flags: superreview?(bzbarsky) → superreview+
Comment on attachment 113152 [details] [diff] [review]
v1.1 patch

carrying forward r=dougt

requesting drivers approval for 1.3 beta.  this is a must fix.	patch is
low-risk.  converts remaining input streams (one used w/ file upload) to
new/modified behavior.
Attachment #113152 - Flags: review+
Attachment #113152 - Flags: approval1.3b?
Attachment #113152 - Flags: approval1.3b? → approval1.3b+
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Flags: blocking1.3b?
Verified on Windows 2000, Build ID 2003013108. I am able to successfully upload
files to Bugzilla with todays build.
Status: RESOLVED → VERIFIED
Attachment #113145 - Flags: superreview?(bzbarsky)
*** Bug 191370 has been marked as a duplicate of this bug. ***
Depends on: 413595
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: