Closed Bug 193017 Opened 23 years ago Closed 23 years ago

downloading via ftp doesn't proceed

Categories

(Core Graveyard :: Networking: FTP, defect, P2)

x86
OS/2

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.3final

People

(Reporter: relf, Assigned: darin.moz)

References

()

Details

(Whiteboard: fixed1.3)

Attachments

(5 files)

OS/2 build 2003021209 Often Mozilla is unable to download via ftp. To reproduce: 1. Click on URL 2. New window is opened but and nothing happens anymore. No errors of any kind appear. Throbber is throbbing forever in that window. The same file is well downloaded by wget. It's not 100% reproduciable - sometimes downloading works as expected. And it's not ftp server dependent. I saw the bug with different ftp servers.
no blocker
Severity: blocker → major
Max, can you try reproducing this problem with the 1.3b build? I think that this may be a duplicated of bug: http://bugzilla.mozilla.org/show_bug.cgi?id=191739
Status: UNCONFIRMED → NEW
Ever confirmed: true
The reported trunk version is newer than 1.3b release. Is there any sence to try the release? Actually, I experienced bug 191739 on one system. And the browser didn't connect at all to any site. This bug is about problems with connecting to ftp only. The http works great, no complaints.
This log shows two succeeds and then a failure. I let the failure sit for about 10 minutes and it never did anything. I then closed the browser.
this snipet of the log file indicates something very unusual... 0[2b50c8]: nsInputStreamPump::OnInputStreamReady [this=d1a750] 0[2b50c8]: OnStateTransfer [this=d1a750] 0[2b50c8]: Available returned [stream=c5535c rv=0 avail=512] 0[2b50c8]: calling OnDataAvailable [offset=640 count=512] 0[2b50c8]: III ReadSegments [this=c5535c count=512] 0[2b50c8]: III advancing read cursor by 128 0[2b50c8]: III deleting first segment 0[2b50c8]: nsSocketInputStream::AsyncWait [this=ce52c0] 0[2b50c8]: nsSocketTransportService::PostEvent [handler=ce5254 type=3 u=0 v=0] 0[2b50c8]: III advancing read cursor by 64 0[2b50c8]: III deleting first segment 0[2b50c8]: III advancing read cursor by 64 0[2b50c8]: III deleting first segment 0[2b50c8]: III advancing read cursor by 64 0[2b50c8]: III deleting first segment 0[2b50c8]: III advancing read cursor by 64 0[2b50c8]: III deleting first segment 0[2b50c8]: III advancing read cursor by 64 0[2b50c8]: III deleting first segment 0[2b50c8]: III advancing read cursor by 64 0[2b50c8]: III deleting first segment the read cursor, of a pipe with 64 byte segments, should never advance by more than 64 bytes at a time!! the fact that the cursor is being advanced by 128 bytes is really scary. something is not right. maybe there are some more clues in the log file...
i don't see anything in the log file that could explain this state. mkaply: can you set an assertion at that LOG statement in nsPipe::AdvanceReadCursor... something like this: NS_ASSERTION(bytesRead <= mBuffer.GetSegmentSize(), "whoops"); and then if you hit that assertion, can you save a snapshot of |*this|, including the values of the member variables of mInput and mOutput. thanks!!
A break point there gets hit a lot on bringup. Do I need to just do it for ftp?
no, if you are hitting that assertion then something is seriously wacked. would be good to get info from any hit.
with a trunk windows build, i have never hit that assertion.
OK, here's a picture of the variables when I hit the length. Note I got my info wrong, and I don't hit it during bring up, only during this FTP case.
mike: this is great, but can you include the address values for the pointers? mReadCursor, mReadLimit, mWriteCursor, mWriteLimit. thanks!
Attached image Per darin
dupe of bug 192871 ?
*** Bug 192871 has been marked as a duplicate of this bug. ***
well, mReadCursor and mReadLimit are definitely out of wack. i'm going to put together a patch that adds a bunch of assertions in hopes of actually determining where the pointers get out of sync.
Attached patch v1 patchSplinter Review
OK, actually i think i realize what is going on here. mReadLimit can point just beyond the segment being read, and if the allocation of the next segment occurs immediately beyond the first segment, then mReadLimit would also point to the beginning of the next segment! as a result, we would see that mReadLimit == mWriteCursor when advancing the write cursor in the second segment. the patch adds a check to ensure that we only compare mReadLimit to mWriteCursor if mWriteSegment == 0 (we only read from the first segment).
-> me
Assignee: dougt → darin
Flags: blocking1.3?
Priority: -- → P2
Target Milestone: --- → mozilla1.3final
Flags: blocking1.3? → blocking1.3+
Just tried with this patch and I still see the problem. Sorry.
I can also confirm this problem. Thought it was just me. Since I've been running 1.3b and later it's been happening. I've been trying to find some sort of pattern before reporting it, though as of yet I have failed to find anything. Also noticed quite a few downloads will start, but die at some point in the download. Can't find any pattern as to when they die. Often I have to use IE (yuck) to download the files.
Attached file New log
This log is with the patch applied. It succeeded once and then failed the second time.
the server seems to be closing the connection. first read from the control connection returns 0, which means EOF. <mkaply> from NS 4.61 - network error: broken pipe <mkaply> wget fails as well. <mkaply> error in server response looks like the server is just misbehaving now. going to try to get the patch in now.
Status: NEW → ASSIGNED
Attachment #114716 - Flags: superreview?(brendan)
Attachment #114716 - Flags: review?(dougt)
Comment on attachment 114716 [details] [diff] [review] v1 patch r=dougt.
Attachment #114716 - Flags: review?(dougt) → review+
Comment on attachment 114716 [details] [diff] [review] v1 patch I was telling darin that I fixed a similar bug in jsarena.c the other year, diagnosed by rogerl. Big fun, and something I won't forget soon! /be
Attachment #114716 - Flags: superreview?(brendan) → superreview+
Comment on attachment 114716 [details] [diff] [review] v1 patch requesting drivers approval for 1.3 final. this is critical for 1.3 final on OS/2 and may effect other platforms as well (though windows, linux, and mach-o seem to be immune).
Attachment #114716 - Flags: approval1.3?
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: fixed1.3
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: