[Samba] [smbd] get_static_share_mode_data failed: NT_STATUS_NO_MEMORY

Andrew Bartlett abartlet at samba.org
Sun Nov 3 21:00:55 UTC 2019

On Sun, 2019-11-03 at 07:16 +0300, Виктор via samba wrote:
> Hi all. help please:
> # systemctl status smbd.service
> ...
> Nov 03 06:53:09 server1.local.my smbd[4585]: [2019/11/03 
> 06:53:09.857837,  1] 
> ../../source3/locking/share_mode_lock.c:597(get_share_mode_lock)
> Nov 03 06:53:09 server1.local.my smbd[4585]:   get_share_mode_lock: 
> get_static_share_mode_data failed: NT_STATUS_NO_MEMORY
> ...
> current version (but w older too)
> # smbd -V
> Version 4.11.2
> client - macos, (time machine session).
> where can i add this memory?

I don't think it is actually memory, but some more logs would help.  If
talloc actually fails then it would say "talloc failed" in

Can you check that for me?

Assuming it doesn't say that, then the conditions for returning
N_STATUS_NO_MEMORY from fresh_share_mode_lock() and
so get_static_share_mode_data() are:

	if ((servicepath == NULL) || (smb_fname == NULL) ||
	    (old_write_time == NULL)) {
		return NULL;

None of these are memory related, confusingly. 

The full smb.conf Rowland asked for might help.

Otherwise, if you are confident and if you have self-compiled this then
if you can patch in a smb_panic() rather than the return NULL, and
catch it under gdb when it panics, a 'bt full' will tell us which of
these are the problem.


Andrew Bartlett

Andrew Bartlett
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   

More information about the samba mailing list