[Samba] A disconnected network can, for all practical purposes, hang your system.

Rowland Penny rpenny at samba.org
Thu Apr 7 08:26:10 UTC 2022


On Thu, 2022-04-07 at 08:17 +0000, Jaideep Shankar via samba wrote:
> Hi,
> 
> Record locks taken on a remote file remains valid, even after 1 hour
> of network disconnection. The following test case describes the set
> of activities done in chronological order:
> 
> 
>   *   A process (P1) on a windows client (C1) and another process
> (P2) on a Linux client (C2) are connected to a common Linux server
> and accessing the same remote file.
>   *   Both P1 and P2 opens the remote file and gets a handle each.
>   *   P1 takes exclusive lock on offset 0.
>   *   P2 tries to take exclusive lock on offset 0 in a loop but does
> not get since P1 holds an exclusive lock on the same offset.
>   *   Now, P1 is disconnected from remote file (C1 is disconnected
> from server).
> 
> Result: P2 does not get lock, returns 'EACCES' instantaneously, tried
> for around an hour.
> 
> The results were surprising, since in a Wi-Fi environment, where
> systems keep coming in and out, it can potentially stall the system.
> 
> OS specs of C1                                   - Windows 10
> Enterprise (version: 20H2, build: 19042.1237)
> OS specs of C2                                   - Ubuntu 20.04.3 LTS
> (GNU/Linux 5.13.0-1021-azure x86_64)
> OS specs of Linux Server                - Ubuntu 20.04.1 LTS
> (GNU/Linux 5.13.0-37-generic x86_64)
> 
> Samba version on C2                      - 4.13.17-
> Ubuntu                                            Command used -
> smbststus
> Samba version on Linux server   - 4.13.17-
> Ubuntu                                              Command used -
> smbstatus
> Samba version on C1                      -
> SMBv2/v3                                                      Command

I think you mean SMB version used the Win10, Samba is a Unix program
that emulates SMB.

> >
> Protocol version                               - 3.1.1 (same on both
> connections)           Command used - smbstatus
> 
> The smb config file on the Linux server is also attached.

This list strips attachments, so can you post the smb.conf inline.

Rowland





More information about the samba mailing list