[Samba] Processes freezing and monopolising the CPU

Roel Slegers deroel at gmail.com
Tue Apr 25 09:07:59 GMT 2006


HP-UX 11.00
Samba 3.0.21a PDC
OpenLDAP backend

When we log on to an XP box, the smbd process freezes for one to two
minutes, while taking up almost 100% CPU. However, this does NOT
happen when logging on to an NT box.
We use no roaming profiles, so it's not that XP is copying files or
something. In fact the pc seems to do nothing but wait.

Moreover we often have the same effect when using the pdbedit command
to modify a user's parameter. So the problem seems to be completely
isolated within the samba server (which also runs the openldap).

Below some extracts of log.smbd; two during an XP logon and one during
a "pdbedit" command. And also our smb.conf.
I inserted "..... PROCESS FREEZES HERE ....." where the process (smbd
or pdbedit) froze while consuming all the server's CPU. As you see
there seems to be no real error at that time, the process just stalls.

This all happens on test server, with just a few pcs connected (so the
servers aren't busy at all).

Any ideas?
THX


---------------------------------------
-- (1) DURING XP LOGON (LOG LEVEL 3) --
---------------------------------------
, 2] smbd/server.c:exit_server(614)
  Closing connections
[Tue Apr 25 09:49:30 2006
, 3] smbd/connection.c:yield_connection(69)
  Yielding connection to
[Tue Apr 25 09:49:30 2006
, 3] smbd/connection.c:yield_connection(75)
  yield_connection: tdb_delete for name  failed with error Record does
not exist.
[Tue Apr 25 09:49:30 2006
, 3] smbd/server.c:exit_server(655)
  Server exit (normal exit)
..... PROCESS FREEZES HERE (see timestamps above and below) .....
[Tue Apr 25 09:50:27 2006
, 3] smbd/oplock.c:init_oplocks(711)
  open_oplock_ipc: opening loopback UDP socket.
[Tue Apr 25 09:50:27 2006
, 3] smbd/process.c:process_smb(1194)
  Transaction 0 of length 137
[Tue Apr 25 09:50:27 2006
, 3] smbd/process.c:switch_message(993)
  switch message SMBnegprot (pid 18561) conn 0x0
[Tue Apr 25 09:50:27 2006
, 3] smbd/sec_ctx.c:set_sec_ctx(287)


----------------------------------------
-- (2) DURING XP LOGON (LOG LEVEL 10) --
----------------------------------------
[Tue Apr 25 10:32:45 2006
, 10] lib/smbldap.c:smbldap_get_single_attribute(297)
  smbldap_get_single_attribute: [sambaBadPasswordTime] = [<does not exist>]
[Tue Apr 25 10:32:45 2006
, 10] lib/smbldap.c:smbldap_get_single_attribute(297)
  smbldap_get_single_attribute: [sambaLogonHours] = [<does not exist>]
..... PROCESS FREEZES HERE (see timestamps above and below) .....
[Tue Apr 25 10:34:12 2006
, 3] smbd/process.c:check_reload(1428)
  Printcap cache time expired.
[Tue Apr 25 10:34:12 2006
, 7] param/loadparm.c:lp_servicenumber(4339)


------------------------------------------------
-- (3) DURING COMMAND 'pdbedit veron002 -h "' --
------------------------------------------------
ldap_connect_system: succesful connection to the LDAP server
The LDAP server is succesfully connected
init_sam_from_ldap: Entry found for user: veron002
ldapsam_update_sam_account: user veron002 to be modified has dn: uid=veron002,ou
=People,dc=fedpol,dc=be
init_ldap_from_sam: Setting entry for user: veron002
ldapsam_update_sam_account: successfully modified uid = veron002 in the LDAP dat
abase
init_sam_from_ldap: Entry found for user: veron002
..... PROCESS FREEZES HERE FOR ABOUT A MINUTE .....
Unix username:        veron002
NT username:          veron002
Account Flags:        [U          ]
User SID:             S-1-5-21-1486758421-968182038-119103078-1025
Primary Group SID:    S-1-5-21-1486758421-968182038-119103078-513
Full Name:            Jean, Du Deux
Home Directory:
HomeDir Drive:        X:
Logon Script:         login.com stdlgn $RMTSITE=veronikx $TOWNID=veronikx $LANGU
---------------------------
----- SMB.CONF -----
---------------------------
[global]
        workgroup = VERONIKX_DOM

        domain master = yes
        domain logons = yes

        passdb backend = ldapsam:ldap://localhost:390
        ldap port = 390
        guest account = www

        admin users = admin

        create mask = 0664
        directory mask = 0775

        Unix charset = ISO8859-1
        printcap name = lpstat

        ldap admin dn = cn=smbadmin,dc=fedpol,dc=be
        ldap group suffix = ou=Groups
        ldap machine suffix = ou=Computers
        ldap suffix = dc=fedpol,dc=be
        ldap ssl = no
        ldap user suffix = ou=People
        ldap idmap suffix = ou=Idmap

        logon path =
        logon drive = X:
        logon home =

        log level = 1

# smbldap-tools requirements
        ldap delete dn = Yes

        add user script = /opt/smbldap-tools/sbin/smbldap-useradd -m "%u"
        delete user script = /opt/smbldap-tools/sbin/smbldap-userdel -r "%u"
        add machine script = /opt/pip/system/smb-add-machine "%u"
        add group script = /opt/smbldap-tools/sbin/smbldap-groupadd -p "%g"
        delete group script = /opt/smbldap-tools/sbin/smbldap-groupdel "%g"
        add user to group script = /opt/smbldap-tools/sbin/smbldap-groupmod -m "
%u" "%g"
        delete user from group script = /opt/smbldap-tools/sbin/smbldap-groupmod
 -x "%u" "%g"
        set primary group script = /opt/smbldap-tools/sbin/smbldap-usermod -g "%
g" "%u"

# All services (shares) are defined in this seperate file, which
# is automatically generated by lmshare (lmshare.pkg):

        include = /usr/local/samba/lib/smb-shares.conf


More information about the samba mailing list