Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#25663 closed defect (duplicate)

Downloaded files are corrupted (sometimes)

Reported by: dgr Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


This happened several times to me already using the Tor Browser Bundle:

  1. Downloading a file.
  2. Saving the file in the default folder that TBB offers me (should be Downloads in the TBB's subtree).
  3. The Download finishes successfully.
  4. After some time I try to open the file. The file is corrupted. Its size is much smaller than what it should be. Observation: all files in the folder have the same date.

OS: Linux
Filesystem (this may be the key here!): btrfs

My speculations:
The last time it happened, I am pretty sure that TBB did an auto-update while the file was downloading. Considering the changed date of all files, I guess the whole subtree was rewritten including the Downloads folder. Maybe the copy-on-write feature of btrfs has something to do with the problem?

Child Tickets

Change History (2)

comment:1 Changed 2 years ago by gk

Resolution: duplicate
Status: newclosed

I think your speculation is correct and I think this is a Tor Browser bug and not one of your filesystem. The problem is that on Linux and Windows we ship Tor Browser in an easy to delete bundle: you just have to get rid of your tor-browser_$YOUR_LOCALE folder an *everything* is gone. Which is good. The downside is that the updater copies everything including and below the topmost directory, i.e. it touches your profile folder and your downloads as well. This has a bunch of negative consequences including the one that you describe. We have #18369 for redoing this for Linux. Thus, this is a duplicate.

comment:2 Changed 2 years ago by mcs

While waiting for a fix for #18369, you can set app.update.staging.enabled = false via about:config to avoid this kind of problem. This helps because when staging is disabled, copying of files (including your profile and the contents of the Downloads directory) will not occur while the browser (firefox process) is running.

Note: See TracTickets for help on using tickets.