Rainer Krienke
2023-Feb-01  09:18 UTC
[Samba] Hanging, uninterruptible smbd-process in "D"-state
Hello,
I run a samba server for windows users who access their user data via 
samba. The samba server is NOT the domaincontroller. This task is 
performed by a native windows machine. The samba server is  running on a 
pve virtual machine. All data that samba delivers to the windows users 
are stored on two NFS servers (also VMs) and accessed via an automounted 
NFS mount for each user on the samba server. At most times of the day 
there are about 70-100 different users accessing this smb server.
The samba version is: samba-4.15.13+git.591.ab36624310c-150400.3.19.1 on 
a SuSE SLES15SP4 system.
This system worked flawless for years (of course using older versions of 
linux and samba) but since about a month  every now and then I have the 
problem that a windows user reports that her/his windows session is 
hanging or he/she gets only a black screen when loggin in  windows. In 
such a situation there always is a process of the user in question in 
the process state "D" on the smb server. The nfs-mount for this user
on
the smb-server is however available without problems.
Since the process is in state "D" its not killable and the only
solution
is a reboot of the samba server itself which of course is an "ugly" 
solution.
I cannot find anything special in the logs.
The samba.conf is included below.
Any ideas?
Thanks Rainer
------------------
smb.conf:
[global]
         workgroup = UNI
         server string = Samba %v
         log file = /var/log/samba/log.%m
         log level = 2 winbind:2
         max log size = 0
         unix extensions = no
         wide links = yes
         kernel oplocks = no
         oplocks = yes
         posix locking = no
         acl allow execute always = yes
         store dos attributes = no
         socket options = TCP_NODELAY SO_RCVBUF=524288 SO_SNDBUF=524288 
IPTOS_LOWDELAY
         max open files = 32808
         dead time = 15
         getwd cache = yes
         stat cache = yes
         browseable = no
         use sendfile = true
         aio read size = 32768
         aio write size = 32768
         disable netbios = yes
         smb ports = 445
         dos charset = CP850
         unix charset = CP850
         name resolve order = host wins bcast
         netbios name = unismb
         clustering = no
         passdb backend = tdbsam
         vfs objects = fileid
         realm = UNI.UNI-KOBLENZ.DE
         security = ADS
         winbind use default domain = no
         winbind max domain connections = 10
         winbind max clients = 1000
         winbind reconnect delay = 20
         map to guest = bad user
         min domain uid = 0
         idmap config UNIKO : backend = nss
         idmap config UNIKO : range = 0-2000000
         idmap config UNIKO : read only = yes
         idmap config * : backend = tdb
         idmap config * : range = 3000000-4000000
         idmap config * : read only = no
         map acl inherit = yes
         include = /etc/samba/smbshares.conf
-- 
Rainer Krienke, Uni Koblenz, IT-Services, A22, Universitaetsstrasse 1
56070 Koblenz, Tel: +49261287 1312 Fax +49261287 100 1312
Web: http://userpages.uni-koblenz.de/~krienke
PGP: http://userpages.uni-koblenz.de/~krienke/mypgp.html
Rowland Penny
2023-Feb-01  10:18 UTC
[Samba] Hanging, uninterruptible smbd-process in "D"-state
On 01/02/2023 09:18, Rainer Krienke via samba wrote:> Hello, > > I run a samba server for windows users who access their user data via > samba. The samba server is NOT the domaincontroller. This task is > performed by a native windows machine. The samba server is? running on a > pve virtual machine. All data that samba delivers to the windows users > are stored on two NFS servers (also VMs) and accessed via an automounted > NFS mount for each user on the samba server. At most times of the day > there are about 70-100 different users accessing this smb server.It sounds like that you are mounting data via NFS and then re-sharing this via Samba. If this is the case, then this has never been a good idea.> > The samba version is: samba-4.15.13+git.591.ab36624310c-150400.3.19.1 on > a SuSE SLES15SP4 system. > > This system worked flawless for years (of course using older versions of > linux and samba) but since about a month? every now and then I have the > problem that a windows user reports that her/his windows session is > hanging or he/she gets only a black screen when loggin in? windows. In > such a situation there always is a process of the user in question in > the process state "D" on the smb server. The nfs-mount for this user on > the smb-server is however available without problems. > > Since the process is in state "D" its not killable and the only solution > is a reboot of the samba server itself which of course is an "ugly" > solution. > > I cannot find anything special in the logs. > > The samba.conf is included below. > > Any ideas? > > Thanks Rainer > > ------------------ > smb.conf: > [global] > ??????? workgroup = UNI > ??????? server string = Samba %v > ??????? log file = /var/log/samba/log.%m > ??????? log level = 2 winbind:2 > ??????? max log size = 0 > ??????? unix extensions = no > ??????? wide links = yes > ??????? kernel oplocks = no > ??????? oplocks = yes > ??????? posix locking = no > > ??????? acl allow execute always = yes > ??????? store dos attributes = no > ??????? socket options = TCP_NODELAY SO_RCVBUF=524288 SO_SNDBUF=524288 > IPTOS_LOWDELAY > > ??????? max open files = 32808 > ??????? dead time = 15 > ??????? getwd cache = yes > ??????? stat cache = yes > ??????? browseable = no > ??????? use sendfile = true > ??????? aio read size = 32768 > ??????? aio write size = 32768 > > ??????? disable netbios = yes > ??????? smb ports = 445 > > ??????? dos charset = CP850 > ??????? unix charset = CP850 > ??????? name resolve order = host wins bcast > ??????? netbios name = unismb > ??????? clustering = no > ??????? passdb backend = tdbsam > ??????? vfs objects = fileidWhy are you using 'fileid' ? I thought this was meant for a clustered setup and you have explicitly set 'clustering = no' (even though it is the default).> > ??????? realm = UNI.UNI-KOBLENZ.DE > ??????? security = ADS > ??????? winbind use default domain = no > ??????? winbind max domain connections = 10 > ??????? winbind max clients = 1000 > ??????? winbind reconnect delay = 20 > ??????? map to guest = bad user > ??????? min domain uid = 0 > > ??????? idmap config UNIKO : backend = nss > ??????? idmap config UNIKO : range = 0-2000000 > ??????? idmap config UNIKO : read only = yesPossible typo here, above it says the workgroup is 'UNI', but the 'idmap config' lines use 'UNIKO', which is it ? They should match.> ??????? idmap config * : backend = tdb > ??????? idmap config * : range = 3000000-4000000 > ??????? idmap config * : read only = no > > ??????? map acl inherit = yes > ??????? include = /etc/samba/smbshares.confIt might help to see the shares, you also may get more in the logs if you raise the loglevel. Rowland
Ralph Boehme
2023-Feb-01  10:38 UTC
[Samba] Hanging, uninterruptible smbd-process in "D"-state
On 2/1/23 10:18, Rainer Krienke via samba wrote:> Since the process is in state "D" its not killable and the only > solution is a reboot of the samba server itself which of course is an > "ugly" solution.as for "D" state: ask the the kernel, that's out of Samba's control. You can start with a /proc/PID/stack to find out where in the kernel the process is stuck, my guess would be somewhere in the NFS code. As pointed out by Rowland, resharing NFS should be avoided by all means. It will work initially and then it will bite you hard at some point. :) -slow -- Ralph Boehme, Samba Team https://samba.org/ SerNet Samba Team Lead https://sernet.de/en/team-samba -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20230201/fe636904/OpenPGP_signature.sig>