New issue
Advanced search Search tips

Issue 810119 link

Starred by 17 users

Issue metadata

Status: Verified
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Copy operation failed to MTP device

Project Member Reported by mkarkada@chromium.org, Feb 7 2018

Issue description

Chrome OS Version: 10323.21.0, 65.0.3325.56 dev channel coral and eve devices

What steps will reproduce the problem?
1. Device connected to MTP phone.
2. In Files window, perform copy operation from Downloads or Gdrive folders to MTP phone.

What is the expected result?
Files should be successfully copied to MTP folders.

What happens instead?
Copy operation failed.

Attached screenshot.

 
Screenshot 2018-02-07 at 12.38.18 PM.png
739 KB View Download
Owner: fukino@chromium.org
Status: Assigned (was: Untriaged)
fukino@ - Can we investigate this issue for M65?
It reproduced by dragging files in Google Drive to MTP device.

mkarkada@, have you reproduced this issue even when you dragged a file from Downloads?
Cc: yawano@chromium.org yamaguchi@chromium.org
Cc: -weifangsun@chromium.org fukino@chromium.org
Owner: mkarkada@chromium.org
mkarkada@ - Please let us know if you are also seeing this behavior for files from Downloads.
@weifangsun, @fukino: I could reproduce this issue when drag-drop or copy-paste file from Downloads folder as well. Tested on eve.
Cc: -fukino@chromium.org mkarkada@chromium.org
Owner: fukino@chromium.org
fukino@ - Is this a regression? I thought should be able to drag these files locally?

Comment 7 by fukino@chromium.org, Feb 22 2018

Yes, this should be a regression.
Also, I was able to reproduce the issue on eve.
I'm bisecting the change.

Comment 8 by fukino@chromium.org, Feb 22 2018

According to /var/log/messages, there is a failure when calling a method on mtpd.
ERR mtpd[1779]: ReadDirectoryEntryIds(...): Domain=dbus, Code=org.chromium.Mtpd.Error, Message=ReadDirectoryEntryIds failed

Copying a file from MTP device to Downloads succeeded.

Comment 9 by sashab@chromium.org, Feb 22 2018

Labels: CrOS-FilesApp-ExternalMedia
Labels: -CrOS-FilesApp-ExternalMedia CrOSFilesFeature-ExternalMedia
Labels: -M-65 M-67
Moving to M-67.
Fukino-san - are you still working on this and/or is this still P-1 for M-67?
Do we know when this regressed? mtp_device_delegate_impl_chromeos.cc changes rather infrequently.
Since this issue has flakiness, it was hard to identify the regression timing.
My guess is that https://chromium-review.googlesource.com/c/chromium/src/+/581931 changed the timing to execute OpenFileDescriptor(), which made this issue easier to reproduce.
Makes sense. Thanks for investigating and catching this bug.
Project Member

Comment 16 by bugdroid1@chromium.org, Mar 21 2018

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

commit 76a76b644f6c53e8296f42bdcae69858118b5c1d
Author: Naoki Fukino <fukino@chromium.org>
Date: Wed Mar 21 17:55:13 2018

MTP: Fix corruption of source file path of copy operation.

Source file's path was passed by a pointer to string, but the string can
be destroyed since OpenFileDescriptor() runs asynchronously.
When it is destroyed, finding source file fails then copy fails.
This CL fixes it by passing a copy of FilePath.

Bug:  810119 
Test: Manually tested following the bug description.
Change-Id: I1be1b9375ac601a66996ce2fa179e36a95cc4dd4
Reviewed-on: https://chromium-review.googlesource.com/970981
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Naoki Fukino <fukino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544764}
[modify] https://crrev.com/76a76b644f6c53e8296f42bdcae69858118b5c1d/chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.cc

Labels: -M-67 Merge-Request-66 M-66
This issue is serious for users who want to copy files to phone. There is no workaround for them.
I'd like to request a merge to M66 to fix it ASAP. The fix is simple and relatively safe.
Project Member

Comment 18 by sheriffbot@chromium.org, Mar 22 2018

Labels: -Merge-Request-66 Merge-Review-66 Hotlist-Merge-Review
This bug requires manual review: M66 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 19 by josa...@google.com, Mar 23 2018

Labels: -Merge-Review-66 Merge-Approved-66
Project Member

Comment 20 by bugdroid1@chromium.org, Mar 23 2018

Labels: -merge-approved-66 merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e8738f8c64058bb9a10bd3e3550442b7991902e8

commit e8738f8c64058bb9a10bd3e3550442b7991902e8
Author: Naoki Fukino <fukino@chromium.org>
Date: Fri Mar 23 05:25:18 2018

MTP: Fix corruption of source file path of copy operation.

Source file's path was passed by a pointer to string, but the string can
be destroyed since OpenFileDescriptor() runs asynchronously.
When it is destroyed, finding source file fails then copy fails.
This CL fixes it by passing a copy of FilePath.

Bug:  810119 
Test: Manually tested following the bug description.
Change-Id: I1be1b9375ac601a66996ce2fa179e36a95cc4dd4
Reviewed-on: https://chromium-review.googlesource.com/970981
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Naoki Fukino <fukino@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#544764}(cherry picked from commit 76a76b644f6c53e8296f42bdcae69858118b5c1d)
Reviewed-on: https://chromium-review.googlesource.com/977187
Reviewed-by: Naoki Fukino <fukino@chromium.org>
Cr-Commit-Position: refs/branch-heads/3359@{#391}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/e8738f8c64058bb9a10bd3e3550442b7991902e8/chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.cc

Status: Fixed (was: Assigned)

Comment 22 by jase...@gmail.com, Mar 27 2018

Just got bitten by this bug. I can't believe I was not able to transfer files from Pixelbook to Pixel 2. I am on stable Chrome OS 65. It is actually embarrassing.
This is happening currently when I try to manually transfer files from my Acer Chromebook 11 to my Nook.  Please see the screenshot and recommend a fix. Thanks!
Screenshot 2018-03-27 at 6.18.53 PM.png
180 KB View Download
We're sorry for the inconvenience.
The fix has on Canary, and will be delivered with Chrome OS 66.
Labels: -M-66 M-65 Merge-Request-65
We get several reports from users about this issue.
I'd like to request a merge to M65 if possible, assuming there will be an update on M65 in the future (before M66 goes stable).

The fix (mentioned in comment #16) is simple and relatively safe.
Labels: -Hotlist-Merge-Review -Merge-Request-65 Merge-Approved-65
Project Member

Comment 27 by bugdroid1@chromium.org, Mar 30 2018

Labels: -merge-approved-65 merge-merged-3325
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/351eee7194e92362ff2b56820c348dd7a4be4470

commit 351eee7194e92362ff2b56820c348dd7a4be4470
Author: Naoki Fukino <fukino@chromium.org>
Date: Fri Mar 30 03:56:08 2018

MTP: Fix corruption of source file path of copy operation.

Source file's path was passed by a pointer to string, but the string can
be destroyed since OpenFileDescriptor() runs asynchronously.
When it is destroyed, finding source file fails then copy fails.
This CL fixes it by passing a copy of FilePath.

Bug:  810119 
Test: Manually tested following the bug description.
Change-Id: I1be1b9375ac601a66996ce2fa179e36a95cc4dd4
Reviewed-on: https://chromium-review.googlesource.com/970981
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Naoki Fukino <fukino@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#544764}(cherry picked from commit 76a76b644f6c53e8296f42bdcae69858118b5c1d)
Reviewed-on: https://chromium-review.googlesource.com/987572
Reviewed-by: Naoki Fukino <fukino@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#751}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
[modify] https://crrev.com/351eee7194e92362ff2b56820c348dd7a4be4470/chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.cc

Merged to M65. Thank you for the approval!
 Issue 828682  has been merged into this issue.
Status: Verified (was: Fixed)
Verified on M67 (10575.52.0, 67.0.3396.69) nautilus.

Sign in to add a comment