canonical / multipass

Multipass orchestrates virtual Ubuntu instances
https://multipass.run
GNU General Public License v3.0
7.85k stars 651 forks source link

sshfs freezing on cd with >=1.13.0 version #3442

Open soredake opened 7 months ago

soredake commented 7 months ago

Describe the bug sshfs freezing with >=1.13.0 version when doing cd/tab-completion.

To Reproduce How, and what happened? 1) sudo multipass set local.driver=virtualbox 2) multipass set local.privileged-mounts=yes 3) multipass set client.gui.autostart=no 4) multipass launch --name primary -c 4 -m 4G --mount C:\:/mnt/c_host 5) multipass exec primary bash wsl.sh (https://github.com/soredake/dotfiles_windows/blob/60fa0a1d92391d9d77c59c4b985da09abc19a508/wsl.sh) 6) Go to newly created instance 7) Do tmux 8) Do cd /mnt/c_host/Users/<your user> 9) Do cd .. 10) Fail 11) In another pane, try to do cd /mnt/c_host/Users/user 12) Also fail

Expected behavior Sshfs mount should work without freezing.

Logs Export.txt

Additional info

Additional context Add any other context about the problem here.

townsend2010 commented 7 months ago

Hi @soredake,

I could not reproduce on my Windows machine. However, I looked through the log you provided. There is an unhandled exception occurring with an error string in Russian. I translated this and it says, A Unicode character has no mapping in the final multibyte code page. It appears the problem is that it is not handling localized paths correctly and then errors out.

This is is caused by or related to https://github.com/canonical/multipass/issues/1314 which we should fix.

soredake commented 6 months ago

I tested older version, 1.12.2+win works fine, no freezes.

Rewrite of some parts of the cross platform SFTP server used for classic mounts to use std::filesystem instead of QFile. This avoids some bugs in Qt along with using more of the stdlib when we can.

Maybe this change broke sshfs.

soredake commented 2 weeks ago

Still a problem with 1.14.1