microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.56k stars 28.13k forks source link

Unable to Delete Files to Trash: vscode( V > 1.89 ) (on debian kde) #214728

Open sonk33 opened 1 month ago

sonk33 commented 1 month ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Disable all extensions (Not exactly relevant)
  2. Attempt to delete any file to the trash.

Expected Behavior: When attempting to delete a file, VSCode should delete it to the trash without any issues.

Actual Behavior: VSCode keeps trying to delete the file endlessly without success.

Additional Information:

I tracked what VSCode was trying to do. It launches this command: kioclient5 move /path/file_name.any trash:/ and this command keeps running endlessly without success.

So, I used the same command in the system terminal (Konsole), and it works fine, and the file was deleted successfully. Then, I used the same command in VSCode's integrated terminal, but it runs endlessly.

I used strace to trace the call, and here are the results:

the result of runing strace -f -e trace=execve kioclient5 move /home/userName/path_longPath/file.any trash:/

kde konsole execve("/usr/bin/kioclient5", ["kioclient5", "move", "/home/userName/path_lo"..., "trash:/"], 0x7fff0da66a70 /* 66 vars */) = 0 strace: Process 102239 attached strace: Process 102240 attached strace: Process 102241 attached strace: Process 102242 attached strace: Process 102243 attached [pid 102243] +++ exited with 0 +++ [pid 102242] +++ exited with 0 +++ strace: Process 102244 attached strace: Process 102245 attached strace: Process 102246 attached [pid 102246] execve("/lib/x86_64-linux-gnu/libexec/kf5/kioslave5", ["/lib/x86_64-linux-gnu/libexec/kf"..., "/usr/lib/x86_64-linux-gnu/qt5/pl"..., "trash", "", "local:/run/user/1000/kioclientvu"...], 0x7ffde30daaa0 /* 66 vars */ [pid 102245] +++ exited with 1 +++ [pid 102238] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=102245, si_uid=1000, si_status=1, si_utime=0, si_stime=0} --- [pid 102246] <... execve resumed>) = 0 strace: Process 102247 attached strace: Process 102248 attached [pid 102246] --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=102238, si_uid=1000} --- [pid 102247] --- SIGRTMIN {si_signo=SIGRTMIN, si_code=SI_TKILL, si_pid=102246, si_uid=1000} --- [pid 102247] +++ exited with 0 +++ [pid 102248] +++ exited with 0 +++ [pid 102246] +++ exited with 0 +++ [pid 102241] +++ exited with 0 +++ [pid 102239] +++ exited with 0 +++ [pid 102240] +++ exited with 0 +++ [pid 102244] +++ exited with 0 +++ +++ exited with 0 +++
vscode default integrated terminal execve("/usr/bin/kioclient5", ["kioclient5", "move", "/home/userName/path_lo"..., "trash:/"], 0x7fff9778abe0 /* 66 vars */) = 0 strace: Process 102649 attached strace: Process 102650 attached strace: Process 102651 attached strace: Process 102652 attached strace: Process 102653 attached [pid 102653] +++ exited with 0 +++ [pid 102652] +++ exited with 0 +++ strace: Process 102654 attached strace: Process 102655 attached strace: Process 102656 attached [pid 102656] execve("/lib/x86_64-linux-gnu/libexec/kf5/kioslave5", ["/lib/x86_64-linux-gnu/libexec/kf"..., "/usr/lib/x86_64-linux-gnu/qt5/pl"..., "trash", "", "local:/run/user/1000/kioclientxf"...], 0x7ffc2cd588f0 /* 66 vars */ [pid 102655] +++ exited with 1 +++ [pid 102648] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=102655, si_uid=1000, si_status=1, si_utime=0, si_stime=0} --- [pid 102656] <... execve resumed>) = 0 i had to kill it (ctr+c) to make it end.

In short, when trying to Delete Files to Trash in VSCode, it hangs at this step: /lib/x86_64-linux-gnu/libexec/kf5/kioslave5 /usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/kio_trash.so trash local:/run/user/1000/kioclientfXUcta.1.kiowork

After reverting to the previous version of VSCode (1.89.0-1714530869_amd64), the issue was resolved.

arsinclair commented 3 weeks ago

I can confirm that the problem started reproducing recently. For me the deletion hangs for 20-30 seconds but the file is deleted in the end. The kioslave5 CPU usage rises to 80-100% during this operation.