[Samba] Memory leak in 3.0.22?
Mark Cullen
mark.r.cullen at gmail.com
Sun Jun 25 21:48:35 GMT 2006
Hi,
I have just switched from FreeBSD 4.11 using 3.0.21b to NetBSD 3.0.1
using 3.0.22. With the same configuration, and the same clients, I am
now seeing what appears to be some rather large memory leakage [ I am
not sure if this is the fault of Samba or NetBSD ]. Eventually the
process will run out of memory (machine only has 256MB of RAM) and the
Windows clients (2000, SP4 and all the latest updates) pop up a message:
"Insufficient system resources exist to complete the requested service"
At which point the Samba server becomes unresponsive to the current user
logged in. At the same time, I am seeing alot of errors in the logs
regarding memory allocation errors:
---
[..snip extract..]
[2006/06/25 22:03:48, 0] lib/util.c:Realloc(969)
Memory allocation error: failed to expand to 4896 bytes
[2006/06/25 22:03:48, 0] lib/util.c:Realloc(969)
Memory allocation error: failed to expand to 4896 bytes
[2006/06/25 22:03:48, 0] lib/util.c:Realloc(969)
Memory allocation error: failed to expand to 4896 bytes
[2006/06/25 22:03:58, 0] lib/util.c:Realloc(969)
Memory allocation error: failed to expand to 4136 bytes
[2006/06/25 22:03:58, 0] lib/util.c:Realloc(969)
Memory allocation error: failed to expand to 4136 bytes
[2006/06/25 22:03:58, 0] lib/util.c:Realloc(969)
Memory allocation error: failed to expand to 4136 bytes
[2006/06/25 22:03:58, 0] lib/util.c:Realloc(969)
Memory allocation error: failed to expand to 4136 bytes
[2006/06/25 22:03:58, 0] lib/util.c:Realloc(969)
Memory allocation error: failed to expand to 4136 bytes
[2006/06/25 22:03:59, 0] lib/util.c:Realloc(969)
Memory allocation error: failed to expand to 4120 bytes
[2006/06/25 22:03:59, 0] lib/util.c:Realloc(969)
Memory allocation error: failed to expand to 4120 bytes
---
The smbd process memory usage according to `top` at this time:
---
28795 admin 2 0 130M 58M select 5:31 0.00% 0.00% smbd
---
I never had this problem with FreeBSD 4.11 and 3.0.21b. Another user
logged in is currently sitting at:
---
10090 donna 2 0 52M 2704K select 3:25 0.00% 0.00% smbd
---
I have logged back on and I am instantly seeing:
---
25971 admin 2 0 24M 4040K select 0:22 0.00% 0.00% smbd
---
Something doesn't seem quite right here!
I'm not sure what kind of info you need, but I have attached my smb.conf
(it's a bit messy, perhaps this issue is just a misconfiguration
somewhere?) to get started. If anything else is required (it didn't dump
a core so I have no backtrace or anything) I will try my best to provide it.
---
#======================= Global Settings
=====================================
[global]
workgroup = PIE-NET
netbios name = BONE
server string = Login Server
hosts allow = 10. 127.
log file = /var/log/samba/samba.%m
max log size = 500
csc policy = disable
security = user
encrypt passwords = yes
passdb backend = smbpasswd
# socket options = TCP_NODELAY SO_RCVBUF=65535 SO_SNDBUF=65535
# interfaces = 10.0.0.0/8 127.0.0.0/8
os level = 34
local master = yes
domain master = yes
preferred master = yes
domain logons = yes
logon script = %G\connect.bat
logon path = \\%L\profiles\%u
logon home = \\%L\nt
null passwords = yes
# unix password sync = yes
# passwd program = /usr/bin/passwd %u
utmp = no
nt acl support = yes
#============================ Share Definitions
==============================
[unix]
comment = Unix Home
volume = Unix Home
path = /home/%u
read only = no
directory mode = 0700
create mode = 0700
[nt]
comment = NT Home
volume = NT Home
path = /home/%u/.NT
read only = no
directory mode = 0700
create mode = 0700
csc policy = disable
[userhome]
comment = User Homes
path = /home
browsable = no
read only = no
admin users = @admin
valid users = @admin
csc policy = disable
[netlogon]
comment = Network Logon Service
path = /samba/netlogon
browsable = no
read only = no
directory mode = 0755
create mode = 0755
acl check permissions = no
map readonly = yes
csc policy = disable
[profiles]
comment = Samba Roaming Profiles
path = /samba/profiles
browsable = no
read only = no
create mode = 0700
directory mode = 0700
admin users = @admin
profile acls = no
csc policy = disable
[www]
comment = WWW
path = /var/www
browsable = no
read only = no
valid users = @admin
admin users = @admin
csc policy = disable
[vh]
comment = Virtual Hosts
path = /var/vh
read only = no
admin users = @admin
valid users = @admin
browsable = no
csc policy = disable
[admtools]
comment = Administration Tools
path = /samba/admtools
browsable = no
read only = no
admin users = @admin
valid users = @admin
csc policy = disable
[spare]
comment = RAID left over
path = /spare
browsable = no
read only = no
admin users = @admin
valid users = @admin
create mode = 0700
directory mode = 0700
csc policy = disable
Thanks in advance,
Mark
More information about the samba
mailing list