Bug 493178 - SSHFS client hangs when attempting to browse mounted directory containing hundreds of files
Summary: SSHFS client hangs when attempting to browse mounted directory containing hun...
Status: CONFIRMED
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (show other bugs)
Version: unspecified
Platform: Android Android 14.x
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-16 00:13 UTC by smokythebearonthemountain
Modified: 2025-01-20 10:17 UTC (History)
4 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 smokythebearonthemountain 2024-09-16 00:13:53 UTC
SUMMARY

Using the Play Store version 1.32.2 of the kdeconnect Android Client, the sshfs on the desktop system hang when attempting to remotely browse a sftp-mounted directory containing 500 photos.

STEPS TO REPRODUCE
1. Place hundreds of photos (or files) in a directory on an Android phone.
2. Configure SFTP file browsing on the phone and on a Linux system.
3. Mount the directory on the Linux system.
4. Attempt to ls or browse the mounted directory.

OBSERVED RESULT

Sshfs hangs on the Linux system. No directory contents are displayed and further browsing of the Android device is not possible. Ls and Gnome Files eventually report zero files found; Dolphin hangs indefinitely.

Killing the ssfhs mount with sudo umount -f -l ... succeeds and allows the Android device to be re-mounted, but the sftp connection will fail again when attempting to list a directory containing many files.

EXPECTED RESULT

Directories containing many files should be browsable.

SOFTWARE/OS VERSIONS
Phone: kdeconnect version 1.32.2 - Play Store running on Android 14.

Desktop 1: gsconnect 49 running on OpenSUSE 15.6.
Desktop 2: kdeconnect 23.08.5  running on OpenSUSE 15.6.


ADDITIONAL INFORMATION

This behavior can be replicated using both kdeconnect and gsconnect. It appears to be an issue with the Android component of kdeconnect. I speculate that androidx.documentfile.provider.DocumentFile (which is notoriously slow; see [1]) does not enumerate the directory contents fast enough and the sftp connection stalls indefinitely. Reworking the sftp plugin to use some of the alternatives suggested in [1] may correct this problem.


[1] https://stackoverflow.com/questions/42186820/why-is-documentfile-so-slow-and-what-should-i-use-instead
Comment 1 Nikos Chantziaras 2024-09-30 11:04:47 UTC
Same here.
Comment 2 Eugenio Bonifacio 2024-10-19 10:48:18 UTC
I can confirm the same issue