Bug 329 - pdbedit and smbd dead lock (100% CPU used) in init_sam_from_ldap with ldapsam_compat
pdbedit and smbd dead lock (100% CPU used) in init_sam_from_ldap with ldapsam...
Product: Samba 3.0
Classification: Unclassified
Component: User/Group Accounts
All Linux
: P2 major
: 3.0.0rc2
Assigned To: Gerald (Jerry) Carter
Depends on:
  Show dependency treegraph
Reported: 2003-08-20 02:59 UTC by Alek Kowalczyk
Modified: 2005-11-14 09:28 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Alek Kowalczyk 2003-08-20 02:59:03 UTC
I tried to use 3.0.0rc1 as PDC with ldapsam_compat (I had already nice 2.2 LDAP
structure so I was lazy :) ). I've altered samba.schema from 3.0.0rc1 to enable
2.2 objectClass=SambaAccount

When joining new machine (win2k) to domain, smbd hangs forever with 100% of CPU
Power used.
Also pdbedit --list does the same after listing some users.

gdb'ing pdbedit --list and Ctrl-C after hang shows the following backtrace:
#0  realloc_string_sub (
pattern=0x80c82d1 "%L",
at lib/util_str.c:923
#1  0x080998d8 in alloc_sub_basic (smb_name=0xbfffd420 "inf1$", str=0x1a4d4
<Address 0x1a4d4 out of bounds>)
    at lib/substitute.c:496
#2  0x08099c93 in alloc_sub_specified (input_string=0x1a4d4 <Address 0x1a4d4 out
of bounds>,
    username=0xbfffd420 "inf1$", domain=0xbfffd020 "NEWAREX", uid=1006, gid=553)
at lib/substitute.c:642
#3  0x08099b33 in talloc_sub_specified (mem_ctx=0x1a4d4, input_string=0x1a4d4
<Address 0x1a4d4 out of bounds>,
    username=0x1a4d4 <Address 0x1a4d4 out of bounds>, domain=0x1a4d4 <Address
0x1a4d4 out of bounds>, uid=107732,
    gid=107732) at lib/substitute.c:577
#4  0x0806eb7c in init_sam_from_ldap (ldap_state=0x8196820, sampass=0x8198388,
    at passdb/pdb_ldap.c:643
#5  0x0807041d in ldapsam_getsampwent (my_methods=0x1a4d4, user=0x8198388) at
#6  0x0806a557 in context_getsampwent (context=0x81966c8, user=0x8198388) at
#7  0x0805a5ac in print_users_list (in=0x81966c8, verbosity=0, smbpwdstyle=0) at
#8  0x0805ba33 in main (argc=107732, argv=0x1a4d4) at utils/pdbedit.c:716
#9  0x42015574 in __libc_start_main () from /lib/tls/libc.so.6

It seems that it is infinitely adding some string in some 'while' loop.
(newmaster is pdc server name)

pdbedit --list --debug 10 shows on the end (before hang):
ldapsam_search_one_group: searching
Entry found for group: 553
smbldap_get_single_attribute: [description] = [<does not exist>]
pdb_set_group_sid: setting group sid S-1-5-21-3814305432-3506490953-2292666802-2107
element 18 -> now SET
element 20 -> now SET
element 5 -> now SET
element 6 -> now SET
element 7 -> now SET
element 8 -> now SET
element 9 -> now SET
smbldap_get_single_attribute: [displayName] = [<does not exist>]
pdb_set_full_name: setting full name inf1$, was
element 12 -> now SET
smbldap_get_single_attribute: [homeDrives] = [<does not exist>]
pdb_set_dir_drive: setting dir drive H:, was NULL
smbldap_get_single_attribute: [smbHome] = [<does not exist>]
Comment 1 Gerald (Jerry) Carter 2003-08-25 13:45:08 UTC
This should be fixed in the SAMBA_3_0 cvs tree.  Duplicate
of bug 250 & bug 289.
Comment 2 Gerald (Jerry) Carter 2005-02-07 09:06:31 UTC
originally reported against one of the 3.0.0rc[1-4] releases.
Cleaning up non-production versions.
Comment 3 Gerald (Jerry) Carter 2005-08-24 10:24:11 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.
Comment 4 Gerald (Jerry) Carter 2005-11-14 09:28:12 UTC
database cleanup