New issue
Advanced search Search tips

Issue 816928 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Zip Archiver: Clearing Drive local data makes Zip Archiver frozen

Project Member Reported by yamaguchi@chromium.org, Feb 27 2018

Issue description

Chrome Version: 66.0.3354.0

Steps To Reproduce:
(1) Create a zip file (round 40MB) and copy to Drive.
(2) Open the file in the Files app.
(3) Go to: chrome://drive-internals
(4) Click "Clear local data" button
(5) Drag the file inside the zip volume into Downloads (=file copy).

Expected Result:

The file is unzipped and copied to Downloads.

Actual Result:

File copy operation is very slow.
In-flight Operations in chrome://drive-internals shows download task of the archive is queued, but cancelled and rescheduled frequently if there are multiple files in the zip. When there is only 1 file in the zip, the download progress stays 0% for long.
 
Blocking: 690217
Labels: -Pri-3 M-65 Pri-1
Owner: yamaguchi@chromium.org
Status: Started (was: Unconfirmed)
We've found this can be an actual issue when free disk space is small.

- condition: mount the zip file, then attempt to sync a large file that doesn't fit in the local drive without evicting other files.
- workaround: Sign out and sign in again. Then retry opening the zip file manually.


The file should be marked as mounted in the class.
Otherwise, FileCache::Store may clean the cached file.
https://cs.chromium.org/chromium/src/components/drive/chromeos/file_cache.cc?type=cs&q=FileCache::Store+FreeDiskSpace&sq=package:chromium&l=379

Here is a debug hack which I used to quickly check this.

1. modify source https://cs.chromium.org/chromium/src/components/drive/chromeos/file_cache.cc?type=cs&q=FileCache::Unpin+FreeDiskSpaceIfNeededFor&sq=package:chromium&l=473
  // Now it's a chance to free up space if needed.
-  FreeDiskSpaceIfNeededFor(0);
+  FreeDiskSpaceIfNeededFor(1e99);
2. Mount a zip file
3. pin and unpin the zip file by "Available offline" context menu command
4. Try to copy the content inside zip to Downloads
Description: Show this description
nitpick.
>  FreeDiskSpaceIfNeededFor(1e99);
Should be 1e18 or so because the parameter is int64_t.
Blocking: -690217
Labels: -Pri-1 -M-65 Pri-2
Removing blocker and M65 labels because this is not regression.
We confirmed this happens with ZIP unpacker as well. In other words, this also happens on M64 or before as well.

Comment 5 by sashab@chromium.org, Feb 28 2018

Labels: CrOSFilesFeature-Zip
Labels: M-67
Project Member

Comment 7 by bugdroid1@chromium.org, Mar 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/533c62725be56fe49be4ab548e7dd7061b1c977c

commit 533c62725be56fe49be4ab548e7dd7061b1c977c
Author: Tatsuhisa Yamaguchi <yamaguchi@google.com>
Date: Mon Mar 05 03:29:26 2018

Zip Archiver: mark Drive cache file as mounted.

This will protect mounted zip file caches from the disk cleanup logic.

Bug:  816928 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I73d36a2317d643fdbbc74c342960b027b99dddb0
Reviewed-on: https://chromium-review.googlesource.com/940645
Commit-Queue: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Reviewed-by: Yuki Awano <yawano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540778}
[modify] https://crrev.com/533c62725be56fe49be4ab548e7dd7061b1c977c/chrome/browser/chromeos/extensions/file_manager/private_api_mount.cc
[modify] https://crrev.com/533c62725be56fe49be4ab548e7dd7061b1c977c/chrome/browser/chromeos/extensions/file_manager/private_api_mount.h
[modify] https://crrev.com/533c62725be56fe49be4ab548e7dd7061b1c977c/chrome/browser/resources/chromeos/zip_archiver/js/app.js
[modify] https://crrev.com/533c62725be56fe49be4ab548e7dd7061b1c977c/chrome/common/extensions/api/file_manager_private.idl
[modify] https://crrev.com/533c62725be56fe49be4ab548e7dd7061b1c977c/extensions/browser/extension_function_histogram_value.h
[modify] https://crrev.com/533c62725be56fe49be4ab548e7dd7061b1c977c/third_party/closure_compiler/externs/file_manager_private.js
[modify] https://crrev.com/533c62725be56fe49be4ab548e7dd7061b1c977c/tools/metrics/histograms/enums.xml

Status: Fixed (was: Started)
Will be shipped with M67.

Sign in to add a comment