Bug 445549 - kioslave5 blocking umount
Summary: kioslave5 blocking umount
Status: REPORTED
Alias: None
Product: krusader
Classification: Applications
Component: general (show other bugs)
Version: 2.8.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Krusader Bugs Distribution List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-15 20:35 UTC by dutchkind
Modified: 2024-10-26 11:53 UTC (History)
12 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 dutchkind 2021-11-15 20:35:28 UTC
SUMMARY
When I copy files to an external file system like an sd-card, encrypted device or disk, I cannot unmount the device when the copying is finished. Trying a manual closing of a Luks device I saw that this was blocked by a kioslave5 process. The only way to be able to unmount / close is to close the krusader window. After this I can safely remove the sd-card, close the Luks file system etc. This behavior is quite recent, only since a few weeks, and seems to affect only krusader, dolphin doesn't seem to be affected and also uses kioslaves.

STEPS TO REPRODUCE
1. Copy files to external file system
2. Try to safely remove
3. 

OBSERVED RESULT
Cannot safely remove or close file system

EXPECTED RESULT
Remove file system, safely unmount

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: On Opensuse Tumbleweed
(available in About System)
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 dzert127 2021-11-23 19:10:26 UTC
I confirm, same here.

Operating System: Kubuntu 21.10
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: 5.13.0-21-generic (64-bit)
Comment 2 Nikita Melnichenko 2021-12-23 20:49:41 UTC
I'm on KF-5.85 and this doesn't repro. Is it possible for you to downgrade and see if it's still happening? Otherwise, let's keep it open and see if it's related to an upstream change in >= 5.86 as new version is getting stabilized in different distros.
Comment 3 dutchkind 2022-01-05 17:32:59 UTC
It's not really possible to downgrade since tumbleweed is a rolling release and the rollback is really limited. So let's wait and see if it will be solved upstream.
Comment 4 Vaclav Pravda 2022-03-13 19:03:58 UTC
Maybe it is not just Krusader problem, but a general mount/umout problem in ubuntu/KDE.  I am experiencing exactly the same behavior as reported above, plus I have problems with mounting flash drives. After reboot it works OK for limited time.
Kubuntu 21.10
Comment 5 WiseLord 2022-03-30 07:13:42 UTC
In my case something similar happens only when I delete some files from USB flash.

Typical cases with USB flash drive:
1. Mount -> copy some files to the flash drive -> unmount => Everything is OK
2. Mount -> delete some files -> unmount => Fails because of kioslave5 uses it (can be seen with lsof)
3. Mount -> delete some file -> copy some files to the flash drive -> unmount => Also fails.

Additionally, when new files are copied to the flash drive, the panel content is updated properly. But, when I delete some files, it's not updated until I press F5.

I guess, the problem may be related to inotify when deleting files. Krusader doesn't receive a signal that files were deleted.

Killing  kioslave5 process allows to unmount the drive. Alternatively, restarting Krusader helps.

With Dolphin everything works OK. It properly updates its visual representation of the folder when some files are deleted.
Comment 6 darek 2022-10-13 19:58:25 UTC
Reproducible under fully updated Kubuntu 22.04. Removable media cannot be unmounted until Krusader is closed - then everything works normally. Very annoying.
Comment 7 darek 2022-10-13 20:02:47 UTC
I can also confirm that copying the same files using Dolphin doesn't block unmount as it does under Krusader. So I can also confirm that it looks like this is Krusader-specific.
Comment 8 jmisak 2022-10-15 20:59:13 UTC
This has been happening to me for a very long time, possibly for years. I've been using Krusader on Manjaro with KDE Plasma and Linux Mint with Xfce. The same problem in both. When I use an external device while using Krusader, I often have to either close/restart Krusader or find and kill the kioslave5 process that blocks it (the former is usually quicker) if I want to unmount it. Even if I navigate to a different device in the Krusader tab which was displaying the contents of the device, even if I close the tab and there is no other tab showing the device, the device still cannot be unmounted. This never happens to me with any other software. Only with Krusader. For me, this is by far the most annoying, fundamental bug in Krusader.

As for the comment by WiseLord, I can also confirm that the panels don't get updated properly. For example, if I have 10 files on an external device and delete all of them, the panel still often (not always) shows two, three or more files left. Only when I update the panel view (for example by going back and forward), it gets properly updated. I don't know of these 2 bugs are related.
Comment 9 Hartmut 2023-07-19 15:44:06 UTC
I have the same problem on Ubuntu 22.04 with KDE-Plasma-Desktop and Krusader 2.7.2: if I delete a file on a USB flash drive with Krusader, I cannot unmount this USB flash drive, because of kioslave5 blocking this. So I always must close Krusader. This is very uncomfortable. Dolphin and Nautilus do NOT have this problem.
Comment 10 Hartmut 2023-07-20 16:04:58 UTC
This bug is reproducable: if I delete a file on a USB flash drive with Krusader and afterwards close that TAB in Krusader, then in 9 of 10 cases I cannot unmount this USB flash drive, because of kioslave5 is blocking this. Please fix.
Comment 11 Sławek 2023-08-26 10:38:08 UTC
I do face the same problem. Is there any chance that this will be fixed soon?
Comment 12 Jim 2024-02-09 23:08:47 UTC
I've been plagued by this same flaw for a long time now, but really didn't have anything substantive to contribute until now.

A system at work has Ubuntu 20.04 on it with Krusader 2.7.2-1.  It does not have this problem.

My home system has Ubuntu 22.04 on it with Krusader 2.7.2-1.  It does have the issue.

---

Here are the packages I have installed that match the pattern 'kio':

kio-extras-data/jammy,jammy,now 4:21.12.3-0ubuntu1 all [installed,automatic]
kio-extras/jammy,now 4:21.12.3-0ubuntu1 amd64 [installed,automatic]
kio/jammy,now 5.92.0-0ubuntu1 amd64 [installed,automatic]
libkf5kiocore5/jammy,now 5.92.0-0ubuntu1 amd64 [installed,automatic]
libkf5kiofilewidgets5/jammy,now 5.92.0-0ubuntu1 amd64 [installed,automatic]
libkf5kiogui5/jammy,now 5.92.0-0ubuntu1 amd64 [installed,automatic]
libkf5kiontlm5/jammy,now 5.92.0-0ubuntu1 amd64 [installed,automatic]
libkf5kiowidgets5/jammy,now 5.92.0-0ubuntu1 amd64 [installed,automatic]

On the unaffected system at work, these are the versions of the above packages:
kio-extras - 4.19.12.3a
kio-extras-data - 4.19.12.3a
kio - 5.68.6
libkf5kiocore5 - 5.68.0
libkf5kiofilewidgets5 - 5.68.0
libkf5kiogui5 - 5.68.0
libkf5kiontlm5 - 5.68.0
libkf5kiowidgets5 - 5.68.0

There is also a qml-module-org-kde-kio package at version 5.68.0 that is not installed on my home machine.

---

Honestly, I do not know what most of these packages do or how they interact with one another, but it at least narrows down things a bit.  Unfortunately, ubuntu does not like people installing old packages and so I cannot easily install old versions on my home machine to isolate it further.

# apt list --all-versions kio
Listing... Done
kio/jammy,now 5.92.0-0ubuntu1 amd64 [installed,automatic]

Is there a repository of .deb files with older versions of these kio libraries?  If so, I'd be willing to play on my home laptop to figure out what version it was introduced in, though only if there's a reasonable chance of getting it fixed... this bug has been open for well over 2 years and there doesn't seem to be any activity on it.
Comment 13 Jim 2024-03-27 20:35:45 UTC
Given the lack of response, I'm assuming that this bug is not going to be addressed, so I began searching for a workaround on my own.  It failed, but I wanted to document what I did and the results for anyone following this bug report or finding it in the future.

I found that the kio packages are not flagged as being built for a specific version of ubuntu and that https://repo.miserver.it.umich.edu/ubuntu/pool/universe/ has the older (5.68) versions.

First, I installed qml-module-org-kde-kio_5.92.0-0ubuntu1_amd64.deb in the hope that this behavior was simply due to a missing dependency not being installed.  Unfortunately, the problem still existed, so I removed the package.

I then installed kio-extras_19.12.3a-0ubuntu2_amd64.deb & kio-extras-data_19.12.3a-0ubuntu2_all.deb - dpkg complained of missing libopenexr24_2.3.0-6ubuntu0.5_amd64.deb so I downloaded & installed it.  It then complained of missing libilmbase24_2.3.0-6build1_amd64.deb so I did the same for that package too.  The problem still existed.

I installed libkf5kiowidgets5_5.68.0-0ubuntu1_amd64.deb over version 5.92 that was on my system (installed by apt when the laptop was first set up).  Krusader would not start - krusader: symbol lookup error: /lib/x86_64-linux-gnu/libKF5Parts.so.5: undefined symbol: _ZN3KIO13JobUiDelegateC1E6QFlagsIN14KJobUiDelegate4FlagEEP7QWidget when run from a command line.

Figuring it needed the rest of the kio libraries, I installed these one at a time, testing between each:
   libkf5kiontlm5_5.68.0-0ubuntu1_amd64.deb - same error
   libkf5kiofilewidgets5_5.68.0-0ubuntu1_amd64.deb - same error
   libkf5kiogui5_5.68.0-0ubuntu1_amd64.deb - same error
   libkf5kiocore5_5.68.0-0ubuntu1_amd64.deb - different error this time - krusader: symbol lookup error: /lib/x86_64-linux-gnu/libKF5Parts.so.5: undefined symbol: _ZN3KIO11TransferJob13mimeTypeFoundEPNS_3JobERK7QString
   kio_5.68.0-0ubuntu1_amd64.deb - second error repeated itself

Since krusader would still not start, I got to thinking that there are probably other dependencies out there, so queried apt & found that there are 104 (!!!) libkf5* packages on my system.  Decided that I do not have the patience to go through the list, manually download each, and chase dependencies for every one of them.

Removed libilmbase24 libopenexr24 kio-extras kio-extras-data with dpkg, then installed kio kio-extras kio-extras-data libkf5kiocore5 libkf5kiofilewidgets5 libkf5kiogui5 libkf5kiontml5 libkf5kiowidgets5 via apt to put my system back how it was, defect and all. :( 

---

Does anyone know of any programs that look / feel / behave like krusader that may not be affected by this flaw in the underlying KDE system?  Or know of a viable workaround to fix the file locking issues introduced between 5.68 & 5.92?  Love the program, but it's just plain broken at this point, especially with my using flash drives every single day.
Comment 14 Michael Lashkevich 2024-10-02 19:44:44 UTC
I confirm this bug.

OpenSUSE 15.5,
Plasma-5.27.9
krusader-2.8.1
Comment 15 Michael Lashkevich 2024-10-02 19:50:21 UTC
(In reply to Michael Lashkevich from comment #14)
> I confirm this bug.
> 
> OpenSUSE 15.5,
> Plasma-5.27.9
> krusader-2.8.1
Forgot to add: encryption does not matter. Copying does not matter. It is sufficient to open a filesystem in krusader, and it is blocked till killing kioslave5 or exiting krusader.
Comment 16 Michael Lashkevich 2024-10-03 20:49:48 UTC
(In reply to Michael Lashkevich from comment #14)
> I confirm this bug.
> 
> OpenSUSE 15.5,
> Plasma-5.27.9
> krusader-2.8.1
I found that the problem appears when I use the (default) option "Mount and open" from the tray. If I use the option "Mount", and open the mounted filesystem directly from krusader, I can unmount flawlessly after I close the corresponding tab in krusader.
Comment 17 darek 2024-10-04 18:32:55 UTC
(In reply to Michael Lashkevich from comment #16)
> I found that the problem appears when I use the (default) option "Mount and
> open" from the tray. If I use the option "Mount", and open the mounted
> filesystem directly from krusader, I can unmount flawlessly after I close
> the corresponding tab in krusader.

This statement is false. I never use "Mount and open" but "Mount" only and I have the same problem with locking. See my comment #6 and #7 for sysinfo.
Comment 18 Michael Lashkevich 2024-10-04 18:37:13 UTC
(In reply to darek from comment #17)
> (In reply to Michael Lashkevich from comment #16)
> This statement is false. I never use "Mount and open" but "Mount" only and I
> have the same problem with locking. See my comment #6 and #7 for sysinfo.
Maybe it behaves different in different versions of KDE. I tell what happens in my system (which can be seen in my first comment).
Comment 19 darek 2024-10-21 20:08:51 UTC
Guys, there's hope. After upgrading to the newest Kubuntu 24.04.1 LTS the problem is gone. I've been testing it for last 2 weeks and verified on multiply occasions.
Comment 20 dzert127 2024-10-21 20:49:00 UTC
(In reply to darek from comment #19)
> Guys, there's hope. After upgrading to the newest Kubuntu 24.04.1 LTS the
> problem is gone. I've been testing it for last 2 weeks and verified on
> multiply occasions.

Not in my case. I've been using Kubuntu 24.04 for 6 months, now I use 24.10 and the problem has been and still exists. I can replicate it every time e.g. by using 'Unlock and Open' button on a Vault and it cannot be locked until Krusader is closed. Message is always the same '... it is being used by kioslave5'. Same thing with flash drive using 'Mount and Open' option.
Comment 21 Alex Bikadorov 2024-10-26 11:53:53 UTC
Note that the Krusader developer (= git master) version has been ported to KF6. So, (for those who know how) could build this version and try if the problem still exists with it.

(And yes, a release of this version would be good but is some effort for me as developer. I will see what I can do.)