[Samba] Samba 4.7.6-ubuntu taking 100% CPU

Olaf Marzocchi lists at marzocchi.net
Thu Apr 1 23:41:41 UTC 2021


I forgot the ZFS dataset properties:

NAME            PROPERTY                    VALUE
tank/home/olaf  type                        filesystem
tank/home/olaf  creation                    Sun Mar 10 13:54 2019
tank/home/olaf  used                        2.00T
tank/home/olaf  available                   1010G
tank/home/olaf  referenced                  435G
tank/home/olaf  compressratio               1.01x
tank/home/olaf  mounted                     yes
tank/home/olaf  quota                       none
tank/home/olaf  reservation                 none
tank/home/olaf  recordsize                  128K
tank/home/olaf  mountpoint                  /tank/home/olaf
tank/home/olaf  sharenfs                    off
tank/home/olaf  checksum                    on
tank/home/olaf  compression                 lz4
tank/home/olaf  atime                       off
tank/home/olaf  devices                     on
tank/home/olaf  exec                        on
tank/home/olaf  setuid                      on
tank/home/olaf  readonly                    off
tank/home/olaf  zoned                       off
tank/home/olaf  snapdir                     hidden

tank/home/olaf  aclmode                     discard
tank/home/olaf  aclinherit                  restricted

tank/home/olaf  createtxg                   27
tank/home/olaf  canmount                    on

tank/home/olaf  xattr                       sa

tank/home/olaf  copies                      1
tank/home/olaf  version                     5
tank/home/olaf  utf8only                    on
tank/home/olaf  normalization               formD
tank/home/olaf  casesensitivity             mixed
tank/home/olaf  vscan                       off
tank/home/olaf  nbmand                      off
tank/home/olaf  sharesmb                    off
tank/home/olaf  refquota                    none
tank/home/olaf  refreservation              none
tank/home/olaf  guid                        16212392165534091407
tank/home/olaf  primarycache                all
tank/home/olaf  secondarycache              all
tank/home/olaf  usedbysnapshots             7.11G
tank/home/olaf  usedbydataset               435G
tank/home/olaf  usedbychildren              1.57T
tank/home/olaf  usedbyrefreservation        0B
tank/home/olaf  logbias                     latency
tank/home/olaf  objsetid                    70
tank/home/olaf  dedup                       off
tank/home/olaf  mlslabel                    none
tank/home/olaf  sync                        standard
tank/home/olaf  dnodesize                   auto
tank/home/olaf  refcompressratio            1.03x
tank/home/olaf  written                     0
tank/home/olaf  logicalused                 2.04T
tank/home/olaf  logicalreferenced           451G
tank/home/olaf  volmode                     default
tank/home/olaf  filesystem_limit            none
tank/home/olaf  snapshot_limit              none
tank/home/olaf  filesystem_count            none
tank/home/olaf  snapshot_count              none
tank/home/olaf  snapdev                     hidden

tank/home/olaf  acltype                     posix

tank/home/olaf  context                     none
tank/home/olaf  fscontext                   none
tank/home/olaf  defcontext                  none
tank/home/olaf  rootcontext                 none
tank/home/olaf  relatime                    off
tank/home/olaf  redundant_metadata          all
tank/home/olaf  overlay                     on
tank/home/olaf  encryption                  off
tank/home/olaf  keylocation                 none
tank/home/olaf  keyformat                   none
tank/home/olaf  pbkdf2iters                 0
tank/home/olaf  special_small_blocks        0


Regards,
Olaf Marzocchi



Il 02/04/2021 01:31, Olaf Marzocchi ha scritto:
> 
> Dear all,
> I recently incurred in an issue with Samba 4.7.6-ubuntu (Ubuntu 18.04.05 
> LTS, with latest updates).
> I'm not sure what caused the issue, since at the same time I performed 
> updates to Ubuntu (apt upgrade) and I separately updated the zfs kernel 
> module to 2.0.4 from the latest version available mid last year and some 
> time passed before I noticed the issue.
> 
> The issue manifests itself as following: when I try to open some files 
> (not all of them) from any SMB share (I tried two different Windows 10 
> machines and one macOS 10.14), the smb3 process takes 100% CPU, it 
> doesn't seem to retrieve the file, and I have to kill it "-9", the hard 
> way. I found that, sometimes, after I kill smbd3 Windows gets the file I 
> tried to open, but it's not a way that always works: sometimes it's 
> corrupted (cut too short).
> I tested locally from ssh and the same files have no issues whatsoever, 
> it's not a hardware issue. I can read and copy them without problems.
> 
> I run influxdb on the same server to track disk and system load and I 
> can see that at the same time smb goes crazy the ZFS cache stats jump 
> from about 90 read ops/s to about 250K read ops/s (requested, less than 
> 1 op/s actually goes to disk thanks to caching). I attach synchronised 
> CPU and ZFS cache graphs.
> 
> I set logging in smb.conf to level 3 and I deleted all the logs, then I 
> restarted smbd and nmbd. I opened a file I know causes the locking and 
> after I verified the issue, I killed smbd3 and compressesd the logs.
> 
> I attach a tgz with all the logs and a text file with the smbd.conf, 
> cleaned up from comments.
> 
> I also paste the output of "ls -l" and "getfacl" on a file which I know 
> causes the issue. I don't post the same information for any other file, 
> for the simple reason that the attributes are the same... there is no 
> apparent difference between safe and troubling files.
> 
> root at ml110g7:/var/log/samba# ls -l /tank/home/olaf/Documents/Documenti\ 
> ufficiali/Documenti\ di\ identità/CI\ 2017.pdf
> -rwxrw---- 1 olaf olaf 1570923 Feb 15 21:49 
> '/tank/home/olaf/Documents/Documenti ufficiali/Documenti di identità/CI 
> 2017.pdf'
> 
> root at ml110g7:/var/log/samba# getfacl 
> /tank/home/olaf/Documents/Documenti\ ufficiali/Documenti\ di\ 
> identità/CI\ 2017.pdf
> getfacl: Removing leading '/' from absolute path names
> # file: tank/home/olaf/Documents/Documenti ufficiali/Documenti di 
> identità/CI 2017.pdf
> # owner: olaf
> # group: olaf
> user::rwx
> group::rw-
> other::---
> 
> Can someone please help me debug the issue? I couldn't find any previous 
> occurrence in Internet, so I'm not sure where to start with.
> 
> I hope I provided all the needed information, but I can post more if I 
> missed some.
> 
> Thanks in advance
> Olaf Marzocchi



More information about the samba mailing list