Bug 390691 - File explorer hangs while copying files to nfs mounted directory
Summary: File explorer hangs while copying files to nfs mounted directory
Status: REPORTED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.43.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-18 17:35 UTC by nono31393
Modified: 2019-12-15 07:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nono31393 2018-02-18 17:35:16 UTC
Hello,

My laptop runs Archlinux with KDE plasma 5.12.1.
I also own an old desktop computer running Debian with a couple of hard drives shared with NFS.

Sometimes I mount these drives from my laptop using entries from my fstab with the options "rw,noauto,user". I open Dolphin, click on the drive in the "Peripheral" section of the left pane.

The first strange thing that happens is that the icon I have clicked on stays as disconnected (red icon) and a new entry appears at the bottom of the pane with the green "connected" icon.

After that I click on the green icon and am able to naviguate through the folders. If I try to copy a file from my local hard drive (actually an SSD) to this mounted NFS drive, Dolphin hangs and nothing on the Dolphin UI is responsive anymore. Once the copy is finished, Dolphin comes back alive and is usable again.

I have trying using Krusader for the copy and there also the Krusader window becomes unresponsive when the copy starts and until it finishes.
Comment 1 Méven Car 2019-12-15 07:27:54 UTC
Git commit c97f0b2a3076731b35435f200bd09a22859f3e03 by Méven Car.
Committed on 15/12/2019 at 07:27.
Pushed by meven into branch 'master'.

Ensure mounted nfs filesystems matches their fstab declared counterpart

Summary:
When a nfs fs is declared in /etc/fstab and the filesystem path ends with a / (like 192.168.1.16:/home/meven/ ), once mounted the detected filesystem path does not have the slash.
This causes the mounted drive not to match the umounted filesystem, causing the later bug.

I.e :

$ solid-hardware list
[...]
udi = '/org/kde/fstab/192.168.1.16:/home/meven/'  (fstab declared mount)
udi = '/org/kde/fstab/192.168.1.16:/home/meven'    (mounted drive as returned by getmntent)

The patch makes the logic in Solid::Backends::Fstab::FstabHandling::deviceList matching mounted and unmounted filesytems unsensitive to their path ending with /
Related: bug 406242
FIXED-IN: 5.66

Test Plan:
Locally tested with Linux with a nfs drive set up with a path ending with a slash like
192.168.1.16:/home/meven/ /media/NFS nfs defaults,user,auto,noatime,bg 0 0

After patch
$ solid-hardware list
[...]
udi = '/org/kde/fstab/192.168.1.16:/home/meven'    (mounted drive as returned by getmntent)

Only one icon appears for the drive in places panel in Dolphin.

Not tested with getmntinfo / BSD code path, but the patch does not alter the code behavior much and don't foresee any risk there.

Reviewers: bruns, #frameworks, ngraham

Reviewed By: bruns, ngraham

Subscribers: broulik, dhaumann, anthonyfieroni, ngraham, bruns, apol, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D21204

M  +26   -3    src/solid/devices/backends/fstab/fstabhandling.cpp

https://commits.kde.org/solid/c97f0b2a3076731b35435f200bd09a22859f3e03