Closed Bug 471067 Opened 16 years ago Closed 12 years ago

download manager non-responsive after "disk is full" error message

Categories

(Toolkit :: Downloads API, defect)

1.9.1 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 425143

People

(Reporter: ori, Unassigned)

References

Details

UA: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20081223 Shiretoko/3.1b3pre

If, when downloading a file the disk becomes full, this error is shown:
-----
"There is not enough room on the disk to save <filename>

Remove unnecessary files from the disk and try again, or try saving in a different location."
-----

After confirming the error dialog, the current downloads get stuck (while the GUI still has a "pause" and "cancel" button for them).

clicking on the pause or cancel button prints this error:
-----
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDownloadManager.pauseDownload]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://mozapps/content/downloads/downloads.js :: pauseDownload :: line 186"  data: no]
(or " cancelDownload :: line 169"  data: no" for the cancel button)
-----

Closing and reopening the download window will still show the unfinished downloads, and since the window is not responsive, they cannot be removed.

After clearing room in the disk and starting a new download, it will appear in the download manager, but will be visually stuck in the "starting" phase while the title bar is showing the correct download progress (in precentage).

Expected results:
Current downloads to the full disk should be paused/cancelled. The download manager should remain responsive.
Version: unspecified → 1.9.1 Branch
Ubuntu Bug link: https://bugs.launchpad.net/ubuntu/+source/firefox-3.0/+bug/298303

I also found another mozilla bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=489737
I tried to reproduce this artificially by creating a small ext2 image, mounting it, downloading a file from a slow server, and while it downloads, filling the image up with other files (by copying them).

The behavior was that the download was canceled without any option of resuming. It happens on both firefox 3.0.10 and the nightly build of 3.5, so I must be doing something wrong.
Anyone: How do you download the file? Have you set it to always ask me or is the download saved automatically to a specified folder? Further are the folders for temporary files and the target located on different partitions?
In my case, it always asks me where to save.
/tmp, ~/.mozilla/ and the download dir are all on the same partition.
I tried to reproduce it in two cases:

0. environment

    Firefox 3.0.10
        NoScript 1.9.2.6
        Session Manager 0.6.5
        Web Developer 1.1.6
    Linux Kernel 2.6.23.17-88.fc7 (Fedora Core 7)

1. small free space case

    $ df .
    Filesystem           1K-blocks      Used Available Use% Mounted on
    -                      5493972   5493760       212 100% /home

    I tried to download the following link:
    http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.9.tar.gz

    Firefox asked "What should Firefox do with this file?". I chose
    "Save File" radio button and clicked "OK" button.

    The download manager didn't show up as expected and
    Firefox crashed with a message box "The Application Crashed".

2. larger free space case

    $ df .
    Filesystem           1K-blocks      Used Available Use% Mounted on
    -                      5493972   5469848     24124 100% /home

    I tried to download the following link:
    http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.9.tar.gz

    Firefox asked "What should Firefox do with this file?". I chose
    "Save File" radio button and clicked "OK" button.

    The download manager showed up and the downloading was in progress.

    I filled the free space while downloading.
    $ dd if=/dev/zero of=padding.2

    Firefox warned with a message box:
        There is not enough room on the disk to save
        /home/cchen/Desktop/linux-2.6.22.9(2).tar.gz.part.

        Remove unnecessary files from the disk and try again, or try saving in a
        different location.

    I removed the free space padding.
    $ rm padding.2

    I closed the message box.

    The download was non-responsive. The pause and cancel buttons
    didn't respond to mouse clicks. I right-clicked to popup a menu.
    The menu items seemed to work except for "Pause" and "Cancel".
    The download halted:
        linux-2.6.22.9(2).tar.gz
        53 minutes remaining - 1.5 of 54.3 MB (11.6 KB/sec)

    I went to kernel.org and tried to download the following link:
    http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.9.tar.gz.sign

    The new download succeeded with a reminder from right bottom of the window:
        Downloads Complete
        All files have finished downloading.
    But it was not seen in the download manager.

    I restarted Firefox. Firefox warned with a message box:
        There is not enough room on the disk to save
        /home/cchen/Desktop/linux-2.6.22.9(2).tar.gz.part.

    $ ll ~/Desktop/linux-2.6.22.9\(2\).*
    -rw------- 1 cchen cchen 11087872 2009-05-13 14:35 /home/cchen/Desktop/linux-2.6.22.9(2).tar.gz
    It seems that Firefox resumed downloading somewhere (from 1.5MB to 11MB).

    I cleaned it up.
    $ rm ~/Desktop/linux-2.6.22.9\(2\).*

    I closed the above message box.

    The previous downloaded linux-2.6.22.9.tar.gz.sign showed up in
    the download manager.

    I removed linux-2.6.22.9.tar.gz.sign from the download manager.

    The download was still non-responsive. The pause and cancel buttons
    didn't respond to mouse clicks. I right-clicked to popup a menu.
    The menu items seemed to work except for "Pause" and "Cancel".
    The download halted:
        linux-2.6.22.9(2).tar.gz
        Unknown time remaining - 0 bytes (0 bytes/sec)
Can you please check the error console? do you see errors like those ones?

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDownloadManager.pauseDownload]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://mozapps/content/downloads/downloads.js :: pauseDownload :: line 186"  data: no]

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDownloadManager.cancelDownload]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://mozapps/content/downloads/downloads.js :: cancelDownload :: line 169"  data: no]
(In reply to comment #7)
> Can you please check the error console? do you see errors like those ones?
> 
> Error: uncaught exception: [Exception... "Component returned failure code:
> 0x80004005 (NS_ERROR_FAILURE) [nsIDownloadManager.pauseDownload]"  nsresult:
> "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::
> chrome://mozapps/content/downloads/downloads.js :: pauseDownload :: line 186" 
> data: no]
> 
> Error: uncaught exception: [Exception... "Component returned failure code:
> 0x80004005 (NS_ERROR_FAILURE) [nsIDownloadManager.cancelDownload]"  nsresult:
> "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::
> chrome://mozapps/content/downloads/downloads.js :: cancelDownload :: line 169" 
> data: no]

Yes, I see the errors while I reproduce it again.

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDownloadManager.pauseDownload]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://mozapps/content/downloads/downloads.js :: pauseDownload :: line 200"  data: no]

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDownloadManager.cancelDownload]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://mozapps/content/downloads/downloads.js :: cancelDownload :: line 183"  data: no]
Ok, sorry for the delay. As given by my last comment I was also able to see this problem.

Here some STR:
1. Create a profile on a usb drive with less memory
2. Fill up the remaining space with the dd command
3. Start Firefox with newly created profile
4. Start a download
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: x86_64 → All
Additionally, after finishing the download, even though it didn't indicate such in the download manger window, I restarted Firefox...then Firefox restarted the downloads that were shown frozen in the download manager, which overwrote the finished downloads without prompting!
By the way, this is with Firefox 3.5.2 on Kubuntu Hardy.

This results in some data loss.  Even though the files are downloads, and likely still available to be downloaded...what if the user was offline when he restarted Firefox?  Would Firefox then erase the files?  That could be very frustrating if the user couldn't get back online then, but needed those files.
Can someone please reproduce this with trunk and give the appropriate line numbers for the JS exception? The line numbers mentioned by Henrik or CHEN either point to empty lines or totally different functions.

I am not yet sure how those exceptions are affecting this bug, but proper line numbers will be helpful.
Brahama, simply create a new profile on an USB stick which has only some MB left of free space. Downloading to that drive should bring up those JS errors. See my comment 9.
Bug 544800 is related to this one.
I believe the data loss problem to be much more critical than the non-responsiveness (although both are important, of course).
Marking bug 544800 as a duplicate of this one would conceal how critical this bug is. If my conjecture that both are symptoms of the same problem is correct, it would be desirable to have a 'best of both' report.
I just experienced this issue... on FF 3.6.4 (Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.4) Gecko/20100527 Firefox/3.6.4).  The download manager is now basically hung up.. I can add new downloads to it, but they won't progress, and I cannot clean them out of the dialog box (can't cancel or pause or otherwise remove.)

My immediate suggestion is to change the way FF downloads files of a known size to pre-allocate all the space first... and then download into the pre-allocated space.  This would generally prevent the actual problem from occurring, as a file that failed to pre-allocate would never be attempted to download... and additionally it would allow for a more graceful recovery, because the download attempt could auto-pause (at user's option) until the user says they have made some space.  This doesn't seem to bad of an idea because the pre-allocated file can still be called a .PART file until such time as the whole file is downloaded, so while it might look full sized before completion of download, it at least wouldn't end up looking complete to a user until after the rename at completion.
I can confirm this, the exact thing happened to me on "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4"
It is very annoying if your download went for an hour and then fails because of disc full. This is a case of data loss.
Firefox should prompt the user to allocate some space (empty trash can, clean temp files) or move the download location (and moving the up-to-then downloaded part of file).
Which are all duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=425143
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
This bug report is far more informative and useful than bug 425143, which only has a single message--the reporter's.
(In reply to Adam Porter from comment #23)
> This bug report is far more informative and useful than bug 425143, which
> only has a single message--the reporter's.

+1 to this bug being more informative.
You need to log in before you can comment on or make changes to this bug.