Bug 206953 - net/samba43: smbd spikes CPU then process dies
Summary: net/samba43: smbd spikes CPU then process dies
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Timur I. Bakeyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-05 14:24 UTC by snackmasterx
Modified: 2018-03-01 01:37 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description snackmasterx 2016-02-05 14:24:05 UTC
I'm seeing high CPU utilization when performing file copy operations from my samba share to my windows server, and they always seem to hang at 322kb copied from my samba share to my local system. When the copy hangs I can use top and watch CPU utilization for smbd climb to 100% where it will just sit for a while. If I wait long enough, then I will receive an error from Windows stating there "an unexpected network error has occurred" and smbd will no longer be at 100%. Alternately, if I cancel the copy operation from the windows side then I will watch smbd stay at 100% for some time before eventually returning to disappearing. I'm unsure if the process crashes entirely or is just returning to a normal state.

That said, I don't seem to have any issues copying data to the samba share from my Windows Server. I can also access data on the zpool from FreeBSD. I have tried restarting the samba server and even the entire FreeBSD system, but the behavior seems to remain unchanged.

Environment:
FreeBSD 10.2-p9 (only functions are ZFS and SMB/NFS)
Samba 4.3.3
Windows Server 2012 R2 (fully updated)

I've configured samba for AD user authentication which seems to be working flawlessly. I am using a domain user to perform my testing

I used google and a lot of web sites until I finally managed to get this working, so it wouldn't surprise me if this behavior was somehow due to a poorly configured smb4.conf so please let me know if this seems like it could be contributing to the issue:

==========BEGIN SMB4.CONF==========

[global]

  case sensitive = yes
  unix extensions = no
  nt acl support = yes
  inherit acls = no
  map acl inherit = yes

       netbios name = HOSTNAME
       security = ADS
       workgroup = REALM
       realm = REALM.LOCAL
       socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
       use sendfile = true

       log file = /var/log/samba43/log.%m
       log level = 1
       max log size = 50

       dedicated keytab file = /etc/krb5.keytab
       kerberos method = secrets and keytab

       idmap config * : backend = tdb
       idmap config * : range = 100000-299999
       idmap config REALM : backend = rid
       idmap config REALM : range = 10000-99999

       winbind separator = +
       winbind use default domain = yes
       winbind enum users  = yes
       winbind enum groups = yes
       winbind use default domain = yes
       winbind refresh tickets = yes



[storage]
   comment = Storage Share
   path = /transition/storage
   available = yes
   browsable = yes
   read only = no
   public = no
   guest ok = no
   writable = yes
   force group = "Domain Users"
   directory mask = 0770
   force directory mode = 0770
   create mask = 0660
   force create mode = 0660

==========END OF FILE==========


So all of the above stated, any ideas on what I could do next to understand why smbd is spiking the CPU utilization when performing copy operations from the samba share to my windows server?
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2016-02-05 16:06:47 UTC
Fix Summary and assign.
Comment 2 Andrew Stevenson 2018-01-03 22:10:25 UTC
https://github.com/samba-team/samba/pull/76 appears to be related.
Comment 3 Walter Schwarzenfeld 2018-03-01 01:37:56 UTC
net/samba43|net/samba44|2017-06-07|Has expired: not supported upstream https://wiki.samba.org/index.php/Samba_Release_Planning

=> Overcome by events.