Scheduled Maintenance: General search, newposts, yourposts, and other search driven queries may fail from a suspected phpBB software update. Details and discussion here: viewtopic.php?t=159736

[Solved] Samba/CIFS problems when copying files within network share

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
a_priori
Posts: 5
Joined: 2024-01-20 06:59
Has thanked: 2 times

[Solved] Samba/CIFS problems when copying files within network share

#1 Post by a_priori »

Dear all,

As of late, I experience the following issues with regard to my following Samba setup: I am running a Debian 12 Bookworm instance on my desktop in conjunction with a Debian 11 Bullseye instance on my server. Both boxes are up-to-date regarding maintenance updates.

When mounting my Samba share on my desktop via Nautilus --> Other locations --> Connect to server --> "smb://server/share", I can perform the following file operations without difficulties within Nautlius:
1. copying files from a desktop folder to the Samba share
2. copying files from the Samba share to a desktop folder
3. copying files within the Samba share

However, problems emerge when instead mounting the Samba share via /etc/fstab:
//server/share /home/user/share cifs credentials=/home/user/.cifs-credentials,uid=1000,gid=100 0 1

Suddenly, copying files within the Samba share (see #3 above) stalls at the beginning of the first file: Though created, no content is being copied. Nautilus indicates that open and active operations exist. When performing the same operation on the command line, the cp command is terminated with the error message "Killed". In such a situation, /proc/fs/cifs/open_files on the desktop exhibits according entries. The desktop shut down procedure would run into a timeout. To prevent this from happening, the Samba share has first to be unmounted via: umount --force --lazy /home/user/share

Most interestingly, file operations from or to local folders remain possible (see #1 and #2 above).

I am a bit puzzled about the sudden emergence of this error on an otherwise stable configuration: My samba configuration has not changed for *ages*. My overall server configuration has not been touched for at least a month. The only reason I can think of are the above maintenance updates executed on a regular basis on both the desktop and the server (and that I might not have paid enough attention to lately).

And I am a bit puzzled about the next steps that I could take to tackle this issue. Has anybody experienced the same or similar issues lately? Or could somebody at least point me into the right direction for solving this issue? I will gladly share more information but am a bit clueless about where to start.

Thanks in advance!

Aki
Global Moderator
Global Moderator
Posts: 3443
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 95 times
Been thanked: 453 times

Re: Samba/CIFS problems when copying files within network share

#2 Post by Aki »

Hello,

Take a look at this discussion: Hope this helps. Let me know.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

a_priori
Posts: 5
Joined: 2024-01-20 06:59
Has thanked: 2 times

Re: Samba/CIFS problems when copying files within network share

#3 Post by a_priori »

Aki,

thanks for your valuable hint! The situation described within the link exactly represents my issue: linux-image-6.1.0-17-amd64 causes the pain, going back to linux-image-6.1.0-16-amd64 avoids the issue for the time being.

In the end, it doesn't resolve the issue concludingly. But at least there's hope that the cavalry arrives soon. :)

Your help is very much appreciated!
a_priori
Last edited by a_priori on 2024-01-20 11:20, edited 1 time in total.

Aki
Global Moderator
Global Moderator
Posts: 3443
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 95 times
Been thanked: 453 times

Re: Samba/CIFS problems when copying files within network share

#4 Post by Aki »

Hello,
a_priori wrote: 2024-01-20 11:13 In the end, it doesn't resolve the issue concludingly. But at least there's hope that the cavalry arrives soon. :)
According to this update in the Debian Bug Tracking System, a testbuild of the kernel with the fix is available at https://people.debian.org/~carnil/tmp/linux/1060005/:
From: Salvatore Bonaccorso <carnil@debian.org>
To: 1060005@bugs.debian.org, 1060052@bugs.debian.org, 1060005-submitter@bugs.debian.org, 1060052-submitter@bugs.debian.org
Cc: Eduardo Nunes <eduardo.david.nunes@gmail.com>, Michael Tokarev <mjt@tls.msk.ru>, JD Walsh <math@jdwalsh03.com>, Hans66 <hans66@freedom.nl>, "Andreas B. Mundt" <andi@debian.org>
Subject: Re: Bug#1060005: cifs-utils: Copy file with cp, hangs with a kernel NULL pointer dereference.
Date: Sat, 13 Jan 2024 10:38:43 +0100

Hi

A fix for this issue has been queued for the 6.1.y series:

https://lore.kernel.org/stable/ZaJYgkI9 ... a3592465b2

If someone additionally might or want to test testbuilds please have a
look at:
https://people.debian.org/~carnil/tmp/linux/1060005/

The builds are signed with my key in the Debian keyring.

Regards,
Salvatore
Affected people can test it and report to the Debian Bug Tracking System (referring the bug report #1060005) if it works correctly.

Hope this helps.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Aki
Global Moderator
Global Moderator
Posts: 3443
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 95 times
Been thanked: 453 times

Re: Samba/CIFS problems when copying files within network share

#5 Post by Aki »

@a_priori:
The following bug report has been fixed with kernel 6.1.76-1 that is going to be released todaty with Debian 12.5 point release: Can you please confirm it ?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

a_priori
Posts: 5
Joined: 2024-01-20 06:59
Has thanked: 2 times

Re: Samba/CIFS problems when copying files within network share

#6 Post by a_priori »

Sorry for the late reply. I can confirm that this issue has been fixed with the kernel 6.1.76-1.

a_priori
Posts: 5
Joined: 2024-01-20 06:59
Has thanked: 2 times

Samba/CIFS problems with vanishing directories in network share

#7 Post by a_priori »

Dear all,

As of late, I experience issues with regard to my following Samba configuration:
1. I am running a Debian 12 Bookworm instance on my desktop in conjunction with a Debian 11 Bullseye instance on my server.
2. Both boxes are up-to-date regarding maintenance updates. In particular, I am using the latest stable Linux kernel 6.1.85-1 (linux-image-6.1.0-20-amd64.deb) on my desktop.
3. I am mounting Samba shares via /etc/fstab (thus, with the kernel's implementation).
4. My samba configuration has not changed for *ages*. My overall server configuration has not been touched for at least half a year.

My issue: In this setting, some directories suddenly vanish from directory listings of network shares and simply stop showing up. Both Gnome Nautilus and the terminal are affected. However, in the terminal I can still access these directories by typing out memorized directory names. At all times, directories remain physically present on the server.

On the other hand, the following workarounds seem to solve the issue temporarily:
1. When falling back to Linux kernel 6.1.76-1 (linux-image-6.1.0-18-amd64.deb) directories show up reliably. (Or are at least much less likely to vanish so that I do not experience issues -- if that makes any sense?!)
2. Alternatively, when mounting the Samba share via Gnome's (userland) implementation (even under Linux kernel 6.1.85-1).

In my setting, the issue with Linux kernel 6.1.85-1 and the workarounds are reproducible. In my view, this seems to be a Linux kernel issue.

Has anybody experienced the same or similar issues lately and confirm? Or could somebody point me into the right direction for solving this issue? I will gladly share more information if necessary.

Thanks in advance!

a_priori
Posts: 5
Joined: 2024-01-20 06:59
Has thanked: 2 times

Re: Samba/CIFS problems with vanishing directories in network share

#8 Post by a_priori »

Just noticed that my issues seems to reproduce the following post:

viewtopic.php?t=158585

Aki
Global Moderator
Global Moderator
Posts: 3443
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 95 times
Been thanked: 453 times

Re: Samba/CIFS problems with vanishing directories in network share

#9 Post by Aki »

a_priori wrote: 2024-05-02 13:27 Just noticed that my issues seems to reproduce the following post:
viewtopic.php?t=158585
Does Samba/CIFS problems happen with kernel 6.1.0-18 ?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Aki
Global Moderator
Global Moderator
Posts: 3443
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 95 times
Been thanked: 453 times

Re: Samba/CIFS problems when copying files within network share

#10 Post by Aki »

The bug report has been closed with a fix in Linux kernel with Debian version 6.1.90-1: EDIT Fri Jul 12 19:21:14 CEST 2024: discussion marked as "solved".
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply