Download Manager stuck scanning for viruses

RESOLVED FIXED in mozilla1.9beta3

Status

()

defect
--
minor
RESOLVED FIXED
12 years ago
10 years ago

People

(Reporter: Zarradeth, Assigned: sdwilsh)

Tracking

Trunk
mozilla1.9beta3
x86
Windows XP
Points:
---
Bug Flags:
blocking1.9 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a9pre) Gecko/2007102904 Minefield/3.0a9pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a9pre) Gecko/2007102904 Minefield/3.0a9pre

After downloading a large file (1.4 gigs) Firefox started the virus scan, after about 20 minutes I could tell Firefox wasn't scanning the file, even though it still reported it. I close Firefox and used then deleted the downloaded file. Now whenever I open the download manager that file is still there, still reporting that it's being scanned for viruses and I can't get rid of it.

Reproducible: Didn't try

Steps to Reproduce:
1.
2.
3.



I am using the default theme. I do have the FlashGot add-on installed, but this was downloaded using the default download manager.
Can you tell us what Virus scanner you have and what file you downloaded so we can try to reproduce this?
I'm using the latest AVG Free.
7.5.503 is what I'm running, and I downloaded both a large ISO and a Firefox installer (.exe) that AVG scanned just fine, and once finished, returned to the "Done" status in the Download Manager.

If possible, a screenshot, and the answer to the second question in comment 1 would be helpful; thanks!
Sorry I didn't see the second question. The file was the Call of Duty 4 demo, it was downloaded from FileFront. I'm also using version 7.5.503 of AVG. I have recently noticed that if I open the download manager via the tools menu it doesn't appear on the list of downloads, but if I download something else, it appears. The file isn't even on my computer anymore and it still shows up on the list without reporting any errors.

Screenshots:
http://i29.photobucket.com/albums/c258/Zarradeth/noinfo.jpg
http://i29.photobucket.com/albums/c258/Zarradeth/info.jpg

And the skin that is applied in the screenshots is with windowblinds, it is not a Firefox skin, the Firefox skin is currently the default one.
So, I'm not sure how it happened, but we should certainly try to clean this stuff up on startup of the DM service like we do for crashes...
Flags: blocking-firefox3?
Target Milestone: --- → Firefox 3 M10
But what do we do with it? Make it failed or mark it as downloaded?

Actually.. we don't really do anything special during a virus scan, so the user could potentially open the file while it's being scanned anyway. I suppose we could just treat it as a downloaded file.
The file was downloaded correctly and I was able to use and delete it, so, if it counts for anything, I would recommend marking it as completed.

If it would help, I have also recorded the problem through videos, though it seems that you have an idea about what the problem is and don't need to view these. Just let me know if you would like these videos for further examination.
We're still not quite sure what's causing it to happen in the first place.. rob, seems like the scanner either dies and never gets back or takes too long and some reason decides not to get back to the download manager..

We can change the state from scanning to completed when firefox restarts to avoid the download being stuck, but until the user restarts, the download will stay in the scanning state...
Yeah, that pretty much sucks...

We could try to do this on a timer, although the windows api call is supposed to return something after a minute anyway...
Is this confirmed? Please confirm or morph-confirm before nominating for blocking ...
Flags: blocking-firefox3?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Download Stuck → Download Manager stuck scanning for viruses
Version: unspecified → Trunk
Duplicate of this bug: 406494
I've been trying to reproduce this with no luck, though I certainly don't discount the reports we've had of it.

To try to reproduce, I've been downloading large ISO files--because they'd take longer to scan than smaller files--and then using known crashers to take Minefield down in the midst of that scan; I'll keep trying to reproduce, but the times I've down this, upon restart we're no longer in the "Scanning" state.

Race condition?
I can't think of what would cause it to stay scanning. But if you force quit then easily you can make a stuck scanning state.
If you delete the file, with Firefox open, before the scan finishes I believe that it will recreate the problem. I had this happen to me a second time and ended up uninstalling and reinstalling Firefox to remove the stuck downloads...
Watching this gives a completely new meaning to the famous "wheeee!" firefox commercial....
(In reply to comment #17)
> If you delete the file, with Firefox open, before the scan finishes I believe
> that it will recreate the problem. I had this happen to me a second time and
> ended up uninstalling and reinstalling Firefox to remove the stuck downloads...

But downloads.sqlite is part of the user's profile, and we're not supposed to touch profiles on uninstall...
Note bug 407657 will add a cancel button and bug 407656 will make the canceled scan into a finished download. This will help get out of the stuck scanning state, but we can also fix up the download state on start up... any scanning download -> done.
What else is interesting about this, and I found this out today, is that *sometimes*, if a file gets stuck in the "scanning" state, running another small download will clear it.  This only seems to work if you haven't closed Firefox and reopened it, if you do this, running another download has no effect.

I will try to confirm/reproduce this but I managed to do it twice today while downloading some very large files from Oracle, after the finished and got "stuck", I ran a small download and as soon as the new downloaded finished scanning, so did the original large file.
(In reply to comment #20)
> Note bug 407657 will add a cancel button and bug 407656 will make the canceled
> scan into a finished download. This will help get out of the stuck scanning
> state, but we can also fix up the download state on start up... any scanning
> download -> done.

Both these bugs are WONTFIX so should this one get a blocking+ status and a target milestone?
(In reply to comment #24)
> Both these bugs are WONTFIX so should this one get a blocking+ status and a
> target milestone?
Yes, and an owner ;)
Assignee: nobody → comrade693+bmo
Flags: blocking-firefox3?
Target Milestone: Firefox 3 M10 → Firefox 3 M11
Posted patch v1.0 (obsolete) — Splinter Review
Uses the already attached sqlite file in the test case.  Converts all downloads with a scanning state at startup to a completed state.  In theory, the virus scanner should have already dealt with the file.

I've filed Bug 409815 to deal with automagically timing out the API call and set it to a clean state.
Attachment #294551 - Flags: review?(edilee)
Whiteboard: [has patch][needs review Mardak]
Comment on attachment 294551 [details] [diff] [review]
v1.0

>+ * Imports a download test file to use.  Works with rdf and sqlite file names.
nit: s/file names/file extensions/

>+ * @param aFName
>+ *        The name of the file to import.  This file should be located in this
>+ *        directory.
"this directory"? The same directory as the unit test.. assuming it wasn't moved?

>+  if (/.*\.rdf$/i.test(aFName))
>+  else if (/.*\.sqlite$/i.test(aFName))
No need for the ".*". Just /\.rdf$/i would work.
Attachment #294551 - Flags: review?(edilee) → review+
Posted patch v1.1Splinter Review
Addresses review comments.
Attachment #294551 - Attachment is obsolete: true
Attachment #294580 - Flags: approval1.9?
Whiteboard: [has patch][needs review Mardak] → [has patch][has review][needs approval]
Comment on attachment 294580 [details] [diff] [review]
v1.1

a=beltzner for 1.9
Attachment #294580 - Flags: approval1.9? → approval1.9+
Checking in toolkit/components/downloads/src/nsDownloadManager.cpp;
new revision: 1.152; previous revision: 1.151
Checking in toolkit/components/downloads/test/unit/head_download_manager.js;
new revision: 1.7; previous revision: 1.6
Checking in toolkit/components/downloads/test/unit/test_bug_401582.js;
initial revision: 1.1
Checking in toolkit/components/downloads/test/unit/bug_401582_downloads.sqlite;
initial revision: 1.1
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][has review][needs approval]
I just saw this on my Vista install with 3.0b2, but I don't have a virus scanner!  I was downloading a 50 MB Gentoo CD image (http://bouncer.gentoo.org/fetch/gentoo-2007.0-minimal/x86/).
(In reply to comment #32)
> I just saw this on my Vista install with 3.0b2, but I don't have a virus
> scanner!  I was downloading a 50 MB Gentoo CD image
> (http://bouncer.gentoo.org/fetch/gentoo-2007.0-minimal/x86/).
But you do have windows defender, which registers itself with the windows api that we call.
Flags: blocking-firefox3? → blocking-firefox3+
Brandon, Radek, Dan: do any of you still see this?
Reopening; still seeing this with today's trunk on Vista Business, with the following file: http://cachefly.cachefly.net/100mb.test; neither IE 7 nor AVG Free 7.5.516 take longer than ~5 seconds, on average, to scan this file.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to comment #34)
> Brandon, Radek, Dan: do any of you still see this?

I removed the downloads that were originally stuck by doing a reinstall of Firefox. But ever since I removed the original stuck downloads I haven't had the problem occur again.
(In reply to comment #35)
> Reopening; still seeing this with today's trunk on Vista Business, with the
> following file: http://cachefly.cachefly.net/100mb.test; neither IE 7 nor AVG
> Free 7.5.516 take longer than ~5 seconds, on average, to scan this file.
Stephen - I think you want a different bug for that.  This bug is about it still being there when you restart.  Maybe you are looking at Bug 412204 or one of the bugs related to it?
(In reply to comment #37)
> (In reply to comment #35)
> > Reopening; still seeing this with today's trunk on Vista Business, with the
> > following file: http://cachefly.cachefly.net/100mb.test; neither IE 7 nor AVG
> > Free 7.5.516 take longer than ~5 seconds, on average, to scan this file.
> Stephen - I think you want a different bug for that.  This bug is about it
> still being there when you restart.  Maybe you are looking at Bug 412204 or one
> of the bugs related to it?

Yeah, ok; this bug did indeed morph to cover that case.  Note that originally its scope was for long-running scans, but you're right, and actually I think I can revisit this particular file/case once bug 409815 is resolved.

Re-resolving this bug.

Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
I haven't seen anyone mention multiple downloads. I was downloading several course notes (in .pdf format). I use Firefox 3 Beta 2 (w/ AVG Free) and after Firefox randomly crashed, the files are still Scanning. Re-downloading the file doesn't take care of the problem. And clearing history temporarily removes the entries, but they show up again in the Download Manager when you download anything else. This problem was reproduced several times when Firefox randomly closed, with occasional messages on reboot of Firefox saying "source file not found" for the download in question. Now I have 5 downloads in the Download Manager being "scanned for viruses". No warnings were given when Firefox closed.
(In reply to comment #39)
> I haven't seen anyone mention multiple downloads. I was downloading several
> course notes (in .pdf format). I use Firefox 3 Beta 2 (w/ AVG Free) and after
> Firefox randomly crashed, the files are still Scanning. Re-downloading the file
> doesn't take care of the problem. And clearing history temporarily removes the
> entries, but they show up again in the Download Manager when you download
> anything else. This problem was reproduced several times when Firefox randomly
> closed, with occasional messages on reboot of Firefox saying "source file not
> found" for the download in question. Now I have 5 downloads in the Download
> Manager being "scanned for viruses". No warnings were given when Firefox
> closed.
Sounds like bug 412565.

Do those bugs that are "scanning for viruses..." go to a normal sate (done/finished) when you restart?
(In reply to comment #40)
> Do those bugs that are "scanning for viruses..." go to a normal sate
> (done/finished) when you restart?
Whoops - that was fixed after b2
im still getting multiple downloads stuck in this scanning loop....

the only fix ive found so far is not to reinstall but to delete downloads.rdf and downloads.sqlite from your currently default firefox profile.

My profile path is C:\Documents and Settings\htpcuser\Application Data\Mozilla\Firefox\Profiles\ie8i9qh0.default

(make sure the firefox.exe process isnt running before you delete these.) i then reopened firefox and my downloads were clear....

im going to see if i can replicate this and to see if the problem is still there
(In reply to comment #42)
> im still getting multiple downloads stuck in this scanning loop....
What version of Firefox are you using?
I'm using Firefox 3.0b2, and I have this problem as well.

the file is a torrent, which was moved immediately after downloading, and is now shown in the download manager with all the above described symptoms. (not shown when specifically going to the download manager, but being scanned when another download is started)
(In reply to comment #44)
> I'm using Firefox 3.0b2, and I have this problem as well.
> 
> the file is a torrent, which was moved immediately after downloading, and is
> now shown in the download manager with all the above described symptoms. (not
> shown when specifically going to the download manager, but being scanned when
> another download is started)

We fixed this after beta2 (which shipped Dec. 18th); please see comment 41.
VERIFIED
(In reply to comment #46)
> VERIFIED

Mike: were you seeing this problem before?
I've read about it, but I can't reproduce this in any builds from Beta 2 up.

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b4pre) Gecko/2008022005 Minefield/3.0b4pre

-Mike
*** VERIFIED as fixed works here...
Ever since Beta 2 is has been fixed.

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b5pre) Gecko/2008030405 Minefield/3.0b5pre

-Mike
Just got this error message on beta 5 rc 2 (Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5) while downloading ImgBurn (http://fileforum.betanews.com/download/ImgBurn/1128426215/1).

Will attach downloads.sqlite.
But it does show up as complete after a restart.  So is that this bug or a different one?
This is that bug - and you described the behavior that the fix does.  I'm curious how it got stuck scanning though...
Same problem, v3 beta 5.  I left it for at least an hour before that and it was obviously not doing anything (no disk or CPU activity).  Closing and re-opening the Downloads window made it show as complete, didn't have to completely restart Firefox.

Using AVG Free 6.5.519

This is the file I was downloading:
http://download.yousendit.com/8CECCB71360E513F

I uploaded it here since the yousend it link is temporary, but I couldn't reproduce it when I downloaded it from here:
http://www.qotile.net/temp/degarmo+key_communication.zip
Mistake: it's AVG 7.5.519, not 6
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.