After upgrading Unraid from 7.0.1 to 7.1.0, Proxmox Backup Server (PBS) backups to an SMB3 share hosted on Unraid fail due to a segmentation fault in smbd. This was working reliably for over a year prior to the upgrade (on various v6 and 7.0.1). The issue appears related to SMB2/3 leases or oplocks, and is resolved by disabling oplock (adding `oplocks = no`) in the Samba configuration (under extra configuration). This disables SMB2/3 leases and prevents the segfault, allowing PBS backups to complete successfully.
From what I can see, the Samba differnce between 7.0.1 and 7.1.0 is 4.21.1 vs. 4.21.3.
The backup server throws this error: Error: inserting chunk on store failed ... Atomic rename failed ... Invalid argument (os error 22)
Relevant Samba Log (log.smbd excerpt) on Unraid:
INTERNAL ERROR: Signal 11: Segmentation fault in smbd (smbd[192.168.x.x])
PANIC (pid ...): Signal 11: Segmentation fault in 4.21.3
BACKTRACE: ...
#4 smb2_lease_key_equal
#5 share_mode_forall_entries
#6 smbd_smb2_request_process_setinfo
That backtrace tells us:
PBS issues an SMB2 SetInfo (atomic-rename) RPC.
Samba’s lease code (in libsmbd-base) blows up with EINVAL, then crashes.
This is a bug/regression in Samba 4.21.3 as shipped by Unraid 7.1.0.
Notes:
A manual mv or rename from a Linux shell (on the PBS host) via the mounted SMB share works fine.
The issue appears limited to certain compound SMB2/3 operations triggered by PBS.
This was not an issue on Unraid 7.0.1 / Samba 4.21.1 (and earlier versions).
Possibly related to internal lease handling changes introduced in Samba 4.21.3.
Is this due to a change Lime Tech made to Samba in 7.1.0? Or is Unraid using a "vanilla" version of Samba?
Thanks,
SoftIce
debug.log