Bug 402542 - Failed copy from mtp with large number of files and large amount of data
Summary: Failed copy from mtp with large number of files and large amount of data
Status: RESOLVED WORKSFORME
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: MTP (show other bugs)
Version: 18.12.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-25 00:56 UTC by Cameron Tanner
Modified: 2023-02-12 13:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Tanner 2018-12-25 00:56:16 UTC
Started dolphin, used mtp to enter folders on andoid cell phone, selected 602 files comprising 16.3 GB of data, mostly images, copied and then pasted into an empty folder on desktop.  Due to the amount of data, the job took a long time.  System became slow to respond so I decided to be patient and let the job finsish.  While waiting, the screensaver started.  Attempt to log in failed despite entering the correct password and screensaver crashed leaving only a mouse pointer.  Crtl-Alt-F1 to log in as root, top showed high cpu usage 12+, but no job registered more than 20% of cpu.  Eventually even the root terminal became unresponsive leaving power button reboot as the only option.


STEPS TO REPRODUCE
1. Plug in android phone with USB-C connector
2. Start dolphin
3. Click phone icon in panel to left for mtp access to its files
4. Navigate to mtp:/V30S/Internal storage/DCIM/Camera/
5. Select a large number of files
6. Copy files
7. Paste files into an empty folder on the desktop

OBSERVED RESULT

System slows progressively and eventually is unresponsive requiring a hard restart.

EXPECTED RESULT

Files copied successively to destination folder


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: OpenSuSE
(available in About System)
KDE Plasma Version: 5.14.4
KDE Frameworks Version: 5.53
Qt Version: 5.12

ADDITIONAL INFORMATION
Comment 1 Cameron Tanner 2018-12-25 01:10:04 UTC
Not easy to reproduce. Worked the third and forth times.
Comment 2 Christoph Feck 2019-01-17 05:19:07 UTC
Could be a memory leak? Monitoring Ctrl+Esc and watching kded5 process might shed some light on the issue.
Comment 3 Harald Sitter 2022-01-07 12:50:27 UTC
Note what Christoph asked. Also, is this even still an issue?
Comment 4 Bug Janitor Service 2022-01-22 04:37:25 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2022-02-06 04:37:35 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 6 Gabriel Barros 2023-02-12 03:12:13 UTC
still happens on 22.12.2

I was about to create a dup:

SUMMARY

Dolphin holds the MTP queue when copying large directories from Android phones. Nothing works until reconnect.

All file operations via Dolphin that happens after trying to copy a large directory (anything that shows the enumeration notification before the overwrite dialogs/progress notification)

Dolphin doesn't seem to know it is holding the connection open, as all file operations that is not moving directories will also fail after that bug triggers. It shows the "access denied" dialog error.

running `mtp-detect` while dolphin is idle but holding that ghost connection shows
"""
  Attempting to connect device(s)
  libusb_claim_interface() reports device is busy, likely in use by GVFS or KDE MTP device handling alreadyLIBMTP PANIC: Unable to initialize device
   Unable to open raw device 0
"""



STEPS TO REPRODUCE
1.  open a MTP listing with a directory that contais several files (TBD minimal number of files)
2. hit Ctrl+C/Copy on that directory
3. move to a regular FS directory and hit Ctrl+v/Paste

OBSERVED RESULT
Dolphin counts the files correctly, but then every single read operation from MTP shows the "access denied" error dialog. Retries always fail. Going trhu the file list (either via ignore or ignore all) will execute over the correct file list, but show access denied for each file.

EXPECTED RESULT
Dolphin will count the files, and execute the copy operation.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 6.1.11-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 PRO 6650U with Radeon Graphics
Memory: 30.7 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: HP
Product Name: HP EliteBook 845 14 inch G9 Notebook PC
Comment 7 Gabriel Barros 2023-02-12 03:16:00 UTC
I'm still having trouble to see anything anormal in logs etc. and to figure out the exact way to reproduce.

One thing i noted but is not 100%, is that copying multiple folders at once on the root of the operation (i.e. select multiple folders and hit Ctrl+c as opposed to a single folder with lots of subfolders) seems to caus the bug more often than copying a single root folder with much more files inside.
Comment 8 Harald Sitter 2023-02-12 13:16:48 UTC
I may be missing something crucial here, but what you wrote has nothing to do with what this bug report is about (i.e. the system eventually deadlocking, running out of memory). Please file a new bug - in doing so please elaborate a bit more on what exactly you do to cause this issue, your steps to reproduce most definitely work just fine. While you are at it, maybe check if https://bugs.kde.org/show_bug.cgi?id=462059 is what you are encountering?