[Samba] get_share_mode_lock: get_static_share_mode_data failed: NT_STATUS_NO_MEMORY
Peter Eriksson
pen at lysator.liu.se
Thu Nov 14 14:21:57 UTC 2019
Samba 4.10.8 - > 4.11.2 (latest update)
FreeBSD 11.3-RELEASE-p3
Dell PowerEdge R730xd with 256GB RAM and some 140TB disk
ZFS filesystems
smb.conf:
[global]
private directory = /liu/etc/samba/private
lock directory = /liu/var/samba/locks
cache directory = /liu/var/samba/cache
state directory = /liu/var/samba/state
ncalrpc dir = /liu/var/samba/ncalrpc
;; Network interfaces
bind interfaces only = true
interfaces = lagg0
;; Server names
server string = ServerName File Server
netbios name = ServerName
;; Security type
security = ADS
realm = OurRealm
workgroup = AD
;; ID Mappings
idmap config * : backend = tdb
idmap config * : range = 2000000001-2100000000
idmap config AD : backend = ad
idmap config AD : range = 1-2000000000
idmap config AD : schema_mode = rfc2307
idmap config AD : unix_primary_group = yes
;; Enable shared robust mutexes
dbwrap_tdb_mutexes:* = yes
;; VFS objects to enable
vfs objects = shadow_copy2 zfsacl full_audit
;; Auditing
full_audit:prefix = %u|%I
full_audit:success = none
full_audit:failure = none
full_audit:facility = LOCAL7
full_audit:priority = notice
;; Snapshots/Previous Versions
shadow:snapdir = .zfs/snapshot
shadow:format = auto-%Y-%m-%d.%H:%M:%S
shadow:sort = desc
shadow:localtime = yes
hadow:snapdirseverywhere = yes
;; Handle ZFS ACLs
zfsacl:acesort = dontcare
nfs4:mode = special
nfs4:acedup = merge
; nfs4:chown = yes
kerberos method = system keytab
kernel change notify = false
socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
client ldap sasl wrapping = seal
socket listen backlog = 1024
invalid users = root
min protocol = SMB2
smb encrypt = auto
time server = true
hostname lookups = false
follow symlinks = true
wide links = false
unix extensions = false
winbind nested groups = false
winbind enum users = false
winbind enum groups = false
winbind use default domain = yes
winbind normalize names = yes
winbind max clients = 2000
winbind max domain connections = 5
winbind nss info = template
template homedir = /home/%U
template shell = /bin/sh
nt acl support = yes
inherit acls = yes
inherit permissions = yes
store dos attributes = yes
ea support = false
map hidden = false
map system = false
map archive = false
map read only = permissions
case sensitive = auto
logging = syslog:1 file:2
log level = 1 auth:2 winbind:2 acls:0
load printers = false
printing = bsd
printcap name = /dev/null
disable spoolss = true
veto files = /.zfs/
hide files = /__--None--__/
delete veto files = yes
[homes]
browseable = false
printable = false
public = false
writeable = true
[admin$]
copy = homes
full_audit:success = connect disconnect opendir mkdir rmdir closedir open close read pread write pwrite sendfile rename unlink chmod fchmod chown fchown chdir ftruncate lock symlink readlink link mknod realpath
full_audit:failure = connect
comment = Admin Access
path = /export
valid users = user1, user2, user3, @fs-admins, @fs-superusers
admin users = user1, user2, user3, @fs-admins, @fs-superusers
preexec close = yes
preexec = /usr/local/bin/mfa_auth %u
[students]
copy = homes
comment = Student Home Directories
path = /export/students
inherit owner = yes
[coop]
copy = homes
comment = Co-operative Directories
path = /export/coop
create mask = 0700
directory mask = 0700
inherit owner = no
# cd /var/samba
# ls -l locks
total 45942
-rw-r--r-- 1 root wheel 233472 Nov 14 15:13 brlock.tdb
-rw------- 1 root wheel 20480 Nov 14 07:00 g_lock.tdb
-rw-r--r-- 1 root wheel 135168 Jun 17 15:57 gencache_notrans.tdb
-rw-r--r-- 1 root wheel 33992704 Nov 14 15:14 gencache.tdb
-rw-r--r-- 1 root wheel 389120 Nov 14 15:14 leases.tdb
-rw-r--r-- 1 root wheel 42577920 Nov 14 15:14 locking.tdb
-rw-r--r-- 1 root wheel 102633472 Aug 23 07:00 locking.tdb.OLD
drwxr-xr-x 2 root wheel 1811 Nov 14 15:14 msg.lock
-rw------- 1 root wheel 696 Nov 14 07:00 mutex.tdb
-rw-r----- 1 root wheel 12288 Nov 14 07:00 names.tdb
-rw-r--r-- 1 root wheel 4792 Nov 6 15:54 printer_list.tdb
-rw-r--r-- 1 root wheel 36864 Dec 28 2018 serverid.tdb
drwxr-xr-x 2 root wheel 4 Nov 14 15:14 smb_krb5
-rw-r--r-- 1 root wheel 12288 Nov 14 15:14 smbd_cleanupd.tdb
-rw------- 1 root wheel 4792 Nov 14 07:00 smbXsrv_client_global.tdb
-rw------- 1 root wheel 884736 Nov 14 15:14 smbXsrv_open_global.tdb
-rw------- 1 root wheel 32440320 Nov 14 15:14 smbXsrv_session_global.tdb
-rw------- 1 root wheel 327680 Nov 14 15:14 smbXsrv_tcon_global.tdb
-rw------- 1 root wheel 20480 Nov 14 07:00 smbXsrv_version_global.tdb
# ls -l cache
total 2002
-rw-r--r-- 1 root wheel 40172 Jun 17 15:57 gencache.tdb.OLD
-rw------- 1 root wheel 7184384 Nov 14 15:14 netsamlogon_cache.tdb
-rw------- 1 root wheel 1810432 Nov 14 06:59 netsamlogon_cache.tdb.OLD
# tdbtool locks/locking.tdb info
Size of file/data: 42577920/425560
Header offset/logical size: 81920/42496000
Number of records: 806
Incompatible hash: yes
Active/supported feature flags: 0x00000001/0x00000001
Robust mutexes locking: yes
Smallest/average/largest keys: 24/24/24
Smallest/average/largest data: 304/503/2080
Smallest/average/largest padding: 4/1528/19120
Number of dead records: 11146
Smallest/average/largest dead records: 416/2688/21816
Number of free records: 4049
Smallest/average/largest free records: 12/2579/6959332
Number of hash chains: 10007
Smallest/average/largest hash chains: 0/1/5
Number of uncoalesced records: 3473
Smallest/average/largest uncoalesced runs: 1/8/90
Percentage keys/data/padding/free/dead/rechdrs&tailers/hashes: 0/1/3/25/70/1/0
(Around 120k users in AD, around 1600 concurrent SMB users right now (on the server where this data is from), but we see this even on single-user servers)
- Peter
> On 14 Nov 2019, at 15:02, L.P.H. van Belle via samba <samba at lists.samba.org> wrote:
>
> Upgrade from samba version?
> OS=?
> Smb.conf content = ?
>
> These thing do help us in helping to find your problem.
> So can you tell a bit more about the server.
>
>
> Greetz,
>
> Louis
>
>
>> -----Oorspronkelijk bericht-----
>> Van: samba [mailto:samba-bounces at lists.samba.org] Namens
>> Peter Eriksson via samba
>> Verzonden: donderdag 14 november 2019 14:34
>> Aan: samba at lists.samba.org
>> Onderwerp: [Samba] get_share_mode_lock:
>> get_static_share_mode_data failed: NT_STATUS_NO_MEMORY
>>
>> Upgraded to Samba 4.11.2 and I’ve now too started seeing the message:
>>
>> get_share_mode_lock: get_static_share_mode_data failed:
>> NT_STATUS_NO_MEMORY
>>
>> A lot. I modified the source in
>> source3/locking/share_mode_lock.c a bit in order to print out
>> the values of the service path, smb_fname & old_write_time
>> when it fails and it seems they are all NULL…
>>
>>
>> [2019/11/14 14:24:23.358441, 0]
>> ../../source3/locking/share_mode_lock.c:457(fresh_share_mode_lock)
>> servicepath=0x0, smb_fname=0x0, old_write_time=0x0
>> [2019/11/14 14:24:23.358965, 1]
>> ../../source3/locking/share_mode_lock.c:598(get_share_mode_lock)
>> get_share_mode_lock: get_static_share_mode_data failed:
>> NT_STATUS_NO_MEMORY
>>
>>
>> fresh_share_mode_lock() only get’s called from
>> get_static_share_mode_data() when dbwrap_record_getvalue(rec)
>> returns a value.dptr == NULL.
>>
>> I’m a bit unsure at the moment if this is a real problem is
>> just an annoying log entry that can be ignored…
>>
>> - Peter
>> --
>> To unsubscribe from this list go to the following URL and read the
>> instructions: https://lists.samba.org/mailman/options/samba
>>
>>
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
More information about the samba
mailing list