public inbox for [email protected]
 help / color / mirror / Atom feed
* Samba 4.19.9 Anomaly with CIFS getdents on Large File Sets (Reproducible via "find" Command)
@ 2024-11-05  3:21 Ammar Faizi
  0 siblings, 0 replies; only message in thread
From: Ammar Faizi @ 2024-11-05  3:21 UTC (permalink / raw)
  To: Samba Mailing List; +Cc: GNU/Weeb Mailing List


Samba 4.19.9 Anomaly with CIFS getdents on Large File Sets (Reproducible
via "find" Command).

When using Samba 4.19.9, there's a reproducible issue with the CIFS
`getdents` system call during extensive file listings, such as with
the `find` command. The bug renders the mounted partition unusable
after listing a large number of files. This problem initially surfaced
on Ubuntu 22.04 with Samba 4.15.13, where the `find` command on the
client triggered a SIGABRT on the smbd server. 

Upgrading to Samba 4.19 fixed the SIGABRT bug, but unfortunately it
still has an issue which prevents me from using the shared directory
from the client.

Action details:

1. Initial Setup with Samba on Ubuntu:
  - Tested Samba 4.15.13 on Ubuntu 22.04's package manager, which
    repeatedly crashed with a SIGABRT when running `find`. To remedy
    this, I compiled and installed Samba 4.19. While the SIGABRT was
    fixed, `getdents` calls on large directories still proved too
    much, triggering the new bug.

2. Configuration Details:
  - Added the following entry to `smb.conf` to share the home
    directory:

    [integral2_home]
    path = /home
    valid users = ammarfaizi2
    read only = yes

3. Mounting the Share:
  - From a second machine, mounted the shared directory with:

    mount -t cifs -o ro,username=ammarfaizi2,password=858869123 //10.0.0.2/integral2_home /mnt/integral2/home

4. Triggering the Bug:
  - Navigated to `/mnt/integral2/home` and ran:

    find .

  - Initially, thousands of files were listed, but the process soon
    halted with this error:

    find: failed to read file names from file system at or below ‘.’: No such file or directory

5. Aftermath:
   - The share becomes entirely inaccessible. Running `ls -l` results
     in:

    root@integral3:/mnt/integral2# ls -l
    ls: cannot access 'home': No such file or directory
    total 0
    d????????? ? ? ? ?            ? home

6. dmesg Output:
   - Error logs from `dmesg`:

    [149466.542691] CIFS: VFS: Autodisabling the use of server inode numbers on \\10.0.0.2\integral2_home
    [149466.542704] CIFS: VFS: The server doesn't seem to support them properly or the files might be on different servers (DFS)
    [149466.542708] CIFS: VFS: Hardlinks will not be recognized on this mount. Consider mounting with the "noserverino" option to silence this message.

What seems to be the problem here?

I need guidance on the specific information needed for a more thorough
diagnosis.

-- 
Ammar Faizi


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-05  3:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-05  3:21 Samba 4.19.9 Anomaly with CIFS getdents on Large File Sets (Reproducible via "find" Command) Ammar Faizi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox