You are not logged in.

#1 2023-11-15 17:06:18

fenying
Member
Registered: 2023-11-15
Posts: 6
Website

CIFS stopped working after system updated

Hi, guys. I am using ArchLinux in Hyper-V, on my Windows 11 PC. And I use CIFS to shared files between my guest OS and host OS.

Everything is fine, until yesterday, I guess, my Windows 11 updated, and I updated my arch to latest with pacman -Syu, too...

# mount.cifs --version
mount.cifs version: 7.0
# uname -a
Linux xxxxxxxxx 6.6.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 08 Nov 2023 16:05:38 +0000 x86_64 GNU/Linux

And today, I found that the CIFS stopped working after I boot the arch VM.

My host's folders should be auto-mounted in fstab as below

//Angus-Laptop-PC/VMShared  /mnt/vmshared cifs credentials=/etc/cifs_credentials,ip=192.168.137.1,iocharset=utf8,file_mode=0600,dir_mode=0700,uid=1000,gid=1001,x-systemd.automount 0 0

There are some error messages in dmesg:

# dmesg
[ 3163.978334] CIFS: Attempting to mount //Angus-Laptop-PC/VMShared
[ 3163.980632] CIFS: VFS: cifs_mount failed w/return code = -4

I also tried mount it manually:

mount.cifs --verbose //Angus-Laptop-PC/VMShared  /mnt/vmshared -o credentials=/etc/cifs_credentials,ip=192.168.137.1,iocharset=utf8,file_mode=0600,dir_mode=0700,uid=1000,gid=1001

Without any useful info:

ip address 192.168.137.1 override specified
mount.cifs kernel mount options: ip=192.168.137.1,unc=\\Angus-Laptop-PC\VMShared,iocharset=utf8,file_mode=0600,dir_mode=0700,uid=1000,gid=1001,user=xxxxxxxxxxxxxxx,pass=********
mount error(4): Interrupted system call
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

I thought it's a problem on Windows 11. To identify it, I tried samba client:

smbclient -L '\\Angus-Laptop-PC' -I 192.168.137.1 --user=xxxxxxxxx%yyyyyyyyyyy
smbclient '\\Angus-Laptop-PC\VMShared' -I 192.168.137.1 --user=xxxxxxxxx%yyyyyyyyyyy

Both of them work, and I could list files insides VMShared folder. Ok, it doesn't look like a problem on Win11...

I googled about this error code, and there are no relative results. I even can't find the exact explaination.of error code -4.

Now I really have no idea about this, can anybody help? Or just show me a way to find out the reason?

Last edited by fenying (2023-11-15 17:08:37)

Offline

#2 2023-11-15 17:53:52

Awebb
Member
Registered: 2010-05-06
Posts: 6,610

Re: CIFS stopped working after system updated

The error recommends the kernel error log. Has dmesg given you any insight?

Offline

#3 2023-11-15 20:51:25

schan
Member
Registered: 2019-07-25
Posts: 6

Re: CIFS stopped working after system updated

He has already provided the output of dmesg. I'm having similar issues, just with a different error code.

[   60.465646] CIFS: VFS: Error connecting to socket. Aborting operation. 
[   60.465651] CIFS: VFS: cifs_mount failed w/return code = -115

I have tried downgrading to the previous kernel, systemd, systemd-libs and libnbd but to no avail. These were the only updates I deemed relevant in the past week, although I am not too sure I'm not missing something.
Connecting via PCManFM, which uses gvfs-smb, works as expected. Can you please try using your file manager?

Last edited by schan (2023-11-15 20:54:12)

Offline

#4 2023-11-16 04:13:49

fenying
Member
Registered: 2023-11-15
Posts: 6
Website

Re: CIFS stopped working after system updated

I did more search about this problem, and still getting no related results

More info:

  • Error code 4 in mount error(4): Interrupted system call is the common error EINTR in Linux, from linux/error.h file.

  • Error code -4 in CIFS: VFS: cifs_mount failed w/return code = -4 may stand for internal mount bug, check this

  • cifs-utils v7.0 was released on 2022-08-11, it shouldn't cause this problem recently.

  • Some people said it's possibly related to DFS, I am not sure what it is, but the recent changes in kernal about cifs are indeed related to DFS mostly. check this

Linux v6.6 (module version 2.45) (47 changesets)

DFS (global namespace) fixes Improvements handling reparse points (e.g. can now view FIFOs to current Samba, and better handle DFS reparse points). Perf improvement for querying reparse point symlinks. Reconnect improvement (write retry with channel sequence number). Add new mount parm "max_cached_dirs" to control how many directories are cached when server supports directory leases. Various laundromat (drectory cache cleanup) fixes. Add new module param /sys/module/cifs/parameters/dir_cache_timeout to control length of time a directory is cached with directory leases.

Maybe I would look into the kernal code changes later, or just find another way to share files between my guest/host OS. sad

Offline

#5 2023-11-16 09:43:30

seth
Member
Registered: 2012-09-03
Posts: 58,790

Re: CIFS stopped working after system updated

@schan, EINTR and EINPROGRESS are not the same error - I'd almost suspect you're trying to reach an SMBv1 server?
See eg. https://superuser.com/questions/1375545 … buntu-cifs

@fenying, did you try the LTS kernel?

Offline

#6 2023-11-16 11:06:26

Awebb
Member
Registered: 2010-05-06
Posts: 6,610

Re: CIFS stopped working after system updated

I suspect this is a larger problem in WIndows. Since yesterday's updates and after a reboot, my WSL instances cannot access the internet anymore. I have Arch running as WSL and it can't talk to the outside.

Offline

#7 2023-11-16 12:29:40

fenying
Member
Registered: 2023-11-15
Posts: 6
Website

Re: CIFS stopped working after system updated

Hi @seth and @awebb, thank you for paying attention.

I am still not  sure if it's caused by Windows updates, but I couldn't find any possible reason because smbclient works well.

As for LTS kernal, I could try it in weekend. smile

Offline

#8 2023-11-18 15:44:20

fenying
Member
Registered: 2023-11-15
Posts: 6
Website

Re: CIFS stopped working after system updated

@seth good god, it works. I switched to linux-lts 6.1.62-1, and everything is fine now. Thank you so much. tongue

Offline

#9 2023-11-18 15:55:50

seth
Member
Registered: 2012-09-03
Posts: 58,790

Re: CIFS stopped working after system updated

That's unfortunately not a long-term-strategy, 6.6 will become LTS fairly soon.

Some people said it's possibly related to DFS

Did you try https://man.archlinux.org/man/extra/cif … 8.en#nodfs ?

Offline

#10 2023-11-18 16:05:35

fenying
Member
Registered: 2023-11-15
Posts: 6
Website

Re: CIFS stopped working after system updated

seth wrote:

That's unfortunately not a long-term-strategy, 6.6 will become LTS fairly soon.

Some people said it's possibly related to DFS

Did you try https://man.archlinux.org/man/extra/cif … 8.en#nodfs ?

Yes, I did try adding nodfs option, but it made no difference. sad

Offline

#11 2023-11-18 22:01:14

seth
Member
Registered: 2012-09-03
Posts: 58,790

Re: CIFS stopped working after system updated

Can you mount other cifs shares? In doubt an sambad one on the system itself?

Offline

#12 2023-11-19 19:47:35

schan
Member
Registered: 2019-07-25
Posts: 6

Re: CIFS stopped working after system updated

seth wrote:

@schan, EINTR and EINPROGRESS are not the same error - I'd almost suspect you're trying to reach an SMBv1 server?

I was explicitly connecting using vers=2.1 (SMBv2) for a long time. While I now believe that my problem is different from OP's, I would like to add for anyone searching that under the LTS kernel (6.1.62-1) the issue is not present anymore.

Offline

#13 2023-11-19 20:10:34

seth
Member
Registered: 2012-09-03
Posts: 58,790

Re: CIFS stopped working after system updated

Since we're dealing w/ somewhat partial information it might be that either or both of you get both errors?
Can you mount a SBM3 (SMB3_11, the default) share (in dobut a local samba)?

Offline

#14 2023-11-19 20:53:32

schan
Member
Registered: 2019-07-25
Posts: 6

Re: CIFS stopped working after system updated

seth wrote:

Since we're dealing w/ somewhat partial information it might be that either or both of you get both errors?

I'm getting exclusively the -115 error code.

seth wrote:

Can you mount a SBM3 (SMB3_11, the default) share (in dobut a local samba)?

No luck using 3.0/3.02/3.11. The mount.cifs man pages state that the highest version supported by both client and server is used by default. Using this nmap script, I can confirm the server supports the following:

Host script results:
| smb-protocols:
|   dialects:
|     NT LM 0.12 (SMBv1) [dangerous, but default]
|     202
|     210
|     300
|     302
|_    311

Offline

#15 2024-01-10 14:12:51

fenying
Member
Registered: 2023-11-15
Posts: 6
Website

Re: CIFS stopped working after system updated

@seth Now the linux-lts is v6.6.10. I try it today, and the problem was gone. smile Amazing

Offline

Board footer

Powered by FluxBB