Bug 472716 - Copying a large selection of files (2000+) often does not copy some of them
Summary: Copying a large selection of files (2000+) often does not copy some of them
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 23.04.3
Platform: Manjaro Linux
: NOR major
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 473159 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-07-27 20:20 UTC by Valeri
Modified: 2023-08-08 15:41 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Valeri 2023-07-27 20:20:37 UTC
SUMMARY
Selecting a large number of files and then copying them tends to not copy at least some without any apparent error or warning message from dolphin. This may make user erroneously believe that operation (in the sense of copying all files to destination) succeeded while it actually did not - which is what happened to me in regards to a large dataset I've been copying.


STEPS TO REPRODUCE
1. Run the following commands in bash to generate a directory with 3000 empty files:
1.1 mkdir /tmp/dolphin_copy_test_src /tmp/dolphin_copy_test_dst
1.2 cd /tmp/dolphin_copy_test_src
1.3 for ((i=1;i<=3000;i++)); do touch $(uuidgen); done
2. Open Dolphin file manager, preferably from terminal
3. Navigate to /tmp/dolphin_copy_test_src
4. Press Ctrl+A to select all 3000 files in directory
5. Press Ctrl+C to copy files; at this point console will be spammed with

QDBusConnection: error: could not send message to service "org.freedesktop.portal.Documents" path "/org/freedesktop/portal/documents" interface "org.freedesktop.portal.FileTransfer" member "AddFiles": Marshalling failed: Invalid file descriptor passed in arguments

6. Navigate to /tmp/dolphin_copy_test_dst
7. Press Ctrl+V to paste files you've copied

OBSERVED RESULT
Only some files will be copied - target directory will contain less than 3000 files. The exact number I've seen in my tests varies from around 1500 to around 2700. Pasting again will results in the exact same files being copied until one selects some files to copy again.

EXPECTED RESULT
All 3000 files are copied.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
None.
Comment 1 Patrick Silva 2023-07-28 23:27:25 UTC
probalby dupicate of bug 468836
Comment 2 Ben Bonacci 2023-07-29 11:49:15 UTC
(In reply to Valeri from comment #0)
> 4. Press Ctrl+A to select all 3000 files in directory

(In reply to Patrick Silva from comment #1)
> probalby dupicate of bug 468836

*** This bug has been marked as a duplicate of bug 468836 ***
Comment 3 Harald Sitter 2023-08-03 10:41:42 UTC
Git commit bcde6f31eef99acc113b44c370f66fe6a66b2f4c by Harald Sitter.
Committed on 03/08/2023 at 12:41.
Pushed by sitter into branch 'master'.

kurlmimedata: limit amount of in-flight FDs for portal submission

previously we could end up with the qdbuspendingcalls holding too many
open file descriptors breaking further open calls. we now regularly
flush all pending calls to make sure we stay within a reasonable limit
of open fds.

M  +30   -1    src/lib/io/kurlmimedata.cpp

https://invent.kde.org/frameworks/kcoreaddons/-/commit/bcde6f31eef99acc113b44c370f66fe6a66b2f4c
Comment 4 Harald Sitter 2023-08-03 10:55:45 UTC
Git commit 55b0af4b2e7cb9c80602ff4c26a89335f5eec50c by Harald Sitter.
Committed on 03/08/2023 at 12:41.
Pushed by sitter into branch 'kf5'.

kurlmimedata: limit amount of in-flight FDs for portal submission

previously we could end up with the qdbuspendingcalls holding too many
open file descriptors breaking further open calls. we now regularly
flush all pending calls to make sure we stay within a reasonable limit
of open fds.


(cherry picked from commit bcde6f31eef99acc113b44c370f66fe6a66b2f4c)

M  +30   -1    src/lib/io/kurlmimedata.cpp

https://invent.kde.org/frameworks/kcoreaddons/-/commit/55b0af4b2e7cb9c80602ff4c26a89335f5eec50c
Comment 5 Patrick Silva 2023-08-08 15:41:21 UTC
*** Bug 473159 has been marked as a duplicate of this bug. ***