Closed Bug 250347 Opened 20 years ago Closed 17 years ago

concurrent downloads of the same file cause a negative download speed

Categories

(Toolkit :: Downloads API, defect)

x86
Windows 2000
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: kirillcool, Unassigned)

References

Details

(Whiteboard: Please, no more screenshots. This is not bug 228968.)

Attachments

(10 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1

Immediately after starting download, i've got the following status line:
3 KB of 5.9 MB at -6228.-7 KB/sec; 00:00 remain

I have a screenshot available (if needed)

Reproducible: Didn't try
Steps to Reproduce:
1. go to http://citeseer.ist.psu.edu/cs
2. enter some search term
3. open couple of links and download PDF's
Actual Results:  
negative dl speed

Expected Results:  
positive dl speed
Unable to reproduce. Maybe it depends on your connection speed? maybe it goes so
fast that it overflows and turns negative?
This is a dupe of Bug 172778.
bug 172778 comment 18 says "Verified using Firebird/0.6.1+", the reporter here
is using a much newer build (which therefore should have the fix included".
Maybe a regression...
(In reply to comment #1)
> Unable to reproduce. Maybe it depends on your connection speed? maybe it goes so
> fast that it overflows and turns negative?

maximum DL speed i've been able to achieve is about 120 Kb/sec.
Although, i've seen that almost always at the beginning of PDF download i have
much higher speeds (i've seen a "greedy" DL setting, meaning that the browser
should DL the file in advance even before i specified the directory in which
this file will reside).

Anyway, the DL speed got corrected after a few seconds, and this was the only
time i've seen this behaviour.
User cannot reproduce. Nobody else can reproduce.

--> WORKSFORME.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
This is a screenshot from 1.0 PR
Didn't realize it was that hard to reproduce. Actually it's not:
go to a site with good DL speed (such as http://citeseer.ist.psu.edu/cs).
Start downloading a big PDF (wait for 1-2 MB to come your way) and cancel it.
Start downloading it again (choose to overwrite the previous file) - the first
statistic that will be shown is going to be negative, like in the attachment
shot in Firefox 1.0PR
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
I'm also having a similar problem using Firefox 1.0 RC1 (french build).
It happenned while downloading World of Warcraft stress test client (2.5GB file).

First I started to download it on a slow server. Than I cancelled and restarted
from a faster server. 
First it was OK (download window said something like "300000 KB at 400 KB/s,
unknown file size).
Than, after downloading approximately 2GB, all values became negative. The files
seems to continue to download normally, though.
I'll post a screenshot of the download manager.
Attached image Screenshot of the bug
(In reply to comment #0)
Also experienced bug, file over 2GB caused negative value to apear, in both bits
downloaded and speed.  

download speed was between 215-315 kb/s.
When the download meter gets above 2,147,483,647 bytes, it wraps around to
negative values. Sounds like it's simply just a signed long int.
nothing's simple except that this is a duplicate which you could have found had
you looked. now please go look.
Whiteboard: DUPEME
(In reply to comment #12)
> nothing's simple except that this is a duplicate which you could have found had
> you looked. now please go look.

timeless, the original bugreport here is for small files, not files >2GB, which
is why I haven't duped it to bug 228968. I can't imagine any case where one
would have a PDF >2GB.

Kirill, if the files you were trying to download were in fact over 2GB, please
dupe this against bug 228968.

(In reply to comment #11)
> When the download meter gets above 2,147,483,647 bytes, it wraps around to
> negative values. Sounds like it's simply just a signed long int.

This is bug 228968. Not the same case as here, where the reporter is apparently
downloading small files.
Whiteboard: DUPEME
I've seen this bug a couple of time since the original report.
It has happened with relatively small files (3-5 Mb), and it happens during the
first second of the download.
All the times (except one) it has happened on the second download of the same
file (as described in the original report). However, once i've started to DL a
file and the first report of the speed has been negative.
May be it's the code that divides the amount of data already received by the
time that has passed. If the time that has passed is very small, then there is
an overflow. I guess that the right time to start the counting is the time i
have asked to DL the file, not the time that you see the first chunk.
ok, so the code lives in
http://lxr.mozilla.org/seamonkey/source/toolkit/components/downloads/src/nsDownloadManager.cpp
a quick glance at this code makes me think that the symptoms make sense.
Summary: a negative download speed → a negative download speed, usually from concurrent downloads of the same file
*** Bug 268719 has been marked as a duplicate of this bug. ***
Status: UNCONFIRMED → NEW
Ever confirmed: true
I recreated this problem on Firefox 1.0 GM build.  The problem occurs when you
download a file over 2 Gb, once you cross the 2Gb boundary, the size (and hence
the calculated speed) become negative.  I assume this is because the code is
using a signed int for the size --- switching the code to use a long should
easily resolve this bug.
mozilla@hokiefan.net: please read the bug, you spammed the wrong one.
*** Bug 276633 has been marked as a duplicate of this bug. ***
it changed from normal numbers to the weird negative numbers in the download
dialog.
I was downloading Fedora Core 3 iso from the following website:

http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/iso/  I've
included a screenshot
(In reply to comment #21)
> Created an attachment (id=172069) [edit]
> 2+GB Fedora Core 3 ISO file negative download
> 
> I was downloading Fedora Core 3 iso from the following website:
> 
> http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/iso/  I've
> included a screenshot

I would like to also note the following.  I started the download at around 11:00
pm (approximate), Jan. 21, 2005 and then finished around 1:20 am, Jan. 22, 2005.

I quickly followed the link to the code and found references to checking the
current time and then doing the calculations.  I'm no expert in that code.  Just
figured a different point of view wouldn't hurt.  Any value in that observation?
(In reply to comment #22)

I feel like such a spammer.  I forgot to mention my OS and my app name and version:

OS:  Windows XP SP2
App: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107
Firefox/1.0
Just like a previous poster, I was downloading an DVD ISO image of Suse 9.2. 
It
started out normal (but FF didn't know the size of the file).  After a while, I

went to check on it's progress, and it had turned negative (see attached
image).
 I'm not done downloading it yet, but I downloaded another Suse DVD ISO image
last night (32 bit version) and it completed successfully with no problems.  I
didn't actually get a change to check on it because I let it download while I
was asleep - so I couldn't tell you if it went negative last night.

Thanks!

Reproducible
I think this bug has enough screenshots illustrating the problem. Is it that
hard to imagine what a negative number looks like?
Negative download speed -and- cumulative size happens
even without concurrent downloads if the file is large
(> 2Gig?)

For example, try to download ("save to disk")
ftp://mirrors.usc.edu/pub/linux/distributions/suse/i386/9.2/iso/SUSE-Linux-9.2-FTP-DVD.iso
(which is about 3.2 gigabyhtes).

The download progress bar runs fine for a while, but after a while
shows negative values (seen on SuSE9.1 x86, Firefox 1.0)
I was running Firefox 1.0 on Windows XP (I said SuSE 9.2 in my
previous post, but that was a mistake).
*** Bug 283673 has been marked as a duplicate of this bug. ***
Negative speed (and decreasing file size) after having downloaded 2GB.
Screen shot with Firefox 1.0.2 on Fedora Core 3 (package updated to version
1.0.2-1.3.1 using the RH Update Agent).
Josh Schramm, Marco Ranon and others interested in this bug, as stated in
comment 26, we know what the negative download speed looks like and do not need
any more screenshots.

Adding comment to Whiteboard as well.
Whiteboard: Please, no more screenshots.
resummarizing bug in the hope that people will stop adding irrelevant comments
and screenshots
Summary: a negative download speed, usually from concurrent downloads of the same file → a negative download speed from concurrent downloads of the same file
Could someone at least mark it as verified so we know its being looked into? Its
not such a big deal as far as getting files downloaded goes, but I do like to
know roughly when to expect my downloads to finish. 
Assignee: bugs → mconnor
I have also experienced this problem and can always reproduce it.
This seems to happen when downloading very large files. I also first noticed it
while downloading a linux DVD distro and saw download manager flip the number to
negative right at the 2Gb mark. Downloading any file above 2Gb in size will
cause this to happen. Sounds like something gets flagged around the infamous
2048 number.
(In reply to comment #35)
> I have also experienced this problem and can always reproduce it.
> This seems to happen when downloading very large files.

That's bug 228968.
Whiteboard: Please, no more screenshots. → Please, no more screenshots. This is not bug 228968.
(In reply to comment #36)
> (In reply to comment #35)
> > I have also experienced this problem and can always reproduce it.
> > This seems to happen when downloading very large files.
> 
> That's bug 228968.

This problem still occurs in 1.0.3, experienced it with a download of SUSE 9.2
tonight from a site achiving about 140 KB/s. Went size & time went negative once
download hit 2GB.
1.0.3 is ancient, please do not test bugs using it.
This happened to me five minutes ago (1.0.4 EN on Windows XP) while downloading
the Fedora Core 2GB+ DVD iso.
let me rephrase comment 38. any 1.0.x version is ancient. please do not test
bugs using it.
This has occured already a few times. Always while downloading big files, like
a Linux DVD ISO
Summary: a negative download speed from concurrent downloads of the same file → concurrent downloads of the same file cause a negative download speed
This is also happening to me, downloading FC4 on FF 1.0.4 ... It only happened
when I had about 2 gig downloaded out of 2.6 gig, at speed around 260kbs.

I did take a screenshot but its the same as ppl have already said, so I wont
bother to upload and link it.
I think this only has to with the 32-bit os's, because when you exceed one byte,
the highest digest that you can form with a 32-bit system (2^32 = 4294967296)
will become negative (-429967296), so you will have to download in a negative
speed/size.

I don't think it is possible to fix this 'bug', wich isn't really a bug.
Normally a 64-bit system won't be affected to this little thingy ;-)
> I think this only has to with the 32-bit os's

No.

> I don't think it is possible to fix this 'bug'

It is possible. And the bug you seem to be thinking of (which is not this bug,
but bug 228968) has indeed been fixed.
*** Bug 268909 has been marked as a duplicate of this bug. ***
Assignee: mconnor → nobody
QA Contact: ali → download.manager
Is this still an issue? I've attached a picture of 4 downloads of 2 files from 2 servers (grabbing the same file twice, concurrently).
Blargh. Nevermind me. I can't even repro this concurrent download problem with old builds as originally reported.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040624 Firefox/0.9.0+
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040624 Firefox/0.9.0+

let alone the one I used to take the screenshot

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a6pre) Gecko/2007062404 Minefield/3.0a6pre
This was originally happening at the very beginning. Your screenshot shows downloads after a few megs were already DLed. In any case, it's been quite a while since i last saw it. Perhaps this is due to the new behavior, that shows "Download starting" as the first message (and the actual numbers are shown only after a few seconds). I guess that this can be closed, since the last report has been about two year ago.

Kirill
=> WFM per #c48 and #c46.
Status: NEW → RESOLVED
Closed: 20 years ago17 years ago
Resolution: --- → WORKSFORME
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: