namequery.c

Willis, Robert Rwillis at castlebank.com
Tue Dec 9 03:00:43 GMT 2003


Below is the log and the bt from gdb, ip addresses have been changed to
'*' and the domain has been changed for security reasons. 




Deleting cache entry (key = NBT/DOMAIN.SECRET.COM#1C)
resolve_hosts: Attempting to resolve DC's for DOMAIN.SECRET.COM using
DNS
remove_duplicate_addrs2: looking for duplicate address/port pairs
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
Storing name DOMAIN.SECRET.COM of type 28 (208.135.142.9:0)
Storing name DOMAIN.SECRET.COM of type 28 (49.50.55.46:774909488)
Storing name DOMAIN.SECRET.COM of type 28 (49.0.9.48:1785868338)
Storing name DOMAIN.SECRET.COM of type 28 (119.116.101.115:1668218996)
Storing name DOMAIN.SECRET.COM of type 28 (0.108.111.99:1869114465)
Storing name DOMAIN.SECRET.COM of type 28 (115.116.0.0:160335881)
Storing name DOMAIN.SECRET.COM of type 28 (*:389)
namecache_store: storing 44 addresses for DOMAIN.SECRET.COM#1c: <bunch
of valid ip addresses deleted>,
208.135.142.9:0,49.50.55.46:774909488,49.0.9.48:1785868338,119.116.101.1
15:1668218996,0.108.111.99:1869114465,115.116.0.0:160335881,<valid ip
address>:389
Adding cache entry with key = NBT/DOMAIN.SECRET.COM#1C; value = <bunch
of valid ip addresses
deleted>,208.135.142.9:0,49.50.55.46:774909488,49.0.9.48:1785868338,119.
116.101.115:1668218996,0.108.111.99:1869114465,115.116.0.0:160335881,<va
lid ip address>, and timeout = Mon Dec  8 20:59:08 2003
 (660 seconds ahead)
internal_resolve_name: returning 44 addresses: <bunch of valid ip
addresses deleted>, 208.135.142.9:0 49.50.55.46:774909488
49.0.9.48:1785868338 119.116.101.115:1668218996 0.108.111.99:1869114465
115.116.0.0:160335881 <valid ip address>
Adding 44 DC's from auto lookup
===============================================================
INTERNAL ERROR: Signal 11 in pid 4685 (3.0.1rc1)
Please read the appendix Bugs of the Samba HOWTO collection
===============================================================
smb_panic: clobber_region() last called from [strupper_static(327)]
smb_panic(): calling panic action [gdb /usr/sbin/winbindd 4685]
GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".

Attaching to program: /usr/sbin/winbindd, process 4685
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libpopt.so.0...done.
Loaded symbols for /usr/lib/libpopt.so.0
Reading symbols from /usr/lib/libgssapi_krb5.so.2...done.
Loaded symbols for /usr/lib/libgssapi_krb5.so.2
Reading symbols from /usr/lib/libkrb5.so.3...done.
Loaded symbols for /usr/lib/libkrb5.so.3
Reading symbols from /usr/lib/libk5crypto.so.3...done.
Loaded symbols for /usr/lib/libk5crypto.so.3
Reading symbols from /lib/libcom_err.so.2...done.
Loaded symbols for /lib/libcom_err.so.2
Reading symbols from /usr/lib/libldap.so.2...done.
Loaded symbols for /usr/lib/libldap.so.2
Reading symbols from /usr/lib/liblber.so.2...done.
Loaded symbols for /usr/lib/liblber.so.2
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/libsasl2.so.2...done.
Loaded symbols for /usr/lib/libsasl2.so.2
Reading symbols from /lib/libssl.so.4...done.
Loaded symbols for /lib/libssl.so.4
Reading symbols from /lib/libcrypto.so.4...done.
Loaded symbols for /lib/libcrypto.so.4
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/gconv/IBM850.so...done.
Loaded symbols for /usr/lib/gconv/IBM850.so
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
0x0095dc32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) bt
#0  0x0095dc32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00a1b0d3 in __waitpid_nocancel () from /lib/tls/libc.so.6
#2  0x009b2672 in do_system () from /lib/tls/libc.so.6
#3  0x080c4c3c in smb_panic (why=0x819065e "internal error") at
lib/util.c:1391
#4  0x080b1116 in fault_report (sig=11) at lib/fault.c:41
#5  0x080b116e in sig_fault (sig=11) at lib/fault.c:61
#6  <signal handler called>
#7  0x009e530b in _int_free () from /lib/tls/libc.so.6
#8  0x009e428b in free () from /lib/tls/libc.so.6
#9  0x08110ed7 in get_dc_list (domain=0xbff122c0 "DOMAIN.SECRET.COM",
ip_list=0xbff126c0, count=0xbff126c8, dns_only=1, ordered=0xbff12174)
    at libsmb/namequery.c:1340
#10 0x081109d7 in get_sorted_dc_list (domain=0xbff122c0
"DOMAIN.SECRET.COM", ip_list=0xbff126c0, count=0xbff126c8, dns_only=1)
at libsmb/namequery.c:1217
#11 0x0816a031 in ads_find_dc (ads=0x9841cf8) at libads/ldap.c:149
#12 0x0816a250 in ads_connect (ads=0x9841cf8) at libads/ldap.c:211
#13 0x08176039 in ads_dc_name (domain=0x98e7f00 "DOMAIN.SECRET.COM",
dc_ip=0xbff128a4, srv_name=0xbff12e98 "") at libsmb/namequery_dc.c:53
#14 0x08176487 in get_dc_name (domain=0x98e7f00 "DOMAIN.SECRET.COM",
srv_name=0xbff12e98 "", ip_out=0xbff12d44) at libsmb/namequery_dc.c:178
#15 0x0807c299 in cm_open_connection (domain=0x98e7f00
"DOMAIN.SECRET.COM", pipe_index=1, new_conn=0xbff12d90) at
nsswitch/winbindd_cm.c:134
#16 0x0807d08d in cm_check_for_native_mode_win2k (domain=0x98e7f00
"DOMAIN.SECRET.COM") at nsswitch/winbindd_cm.c:422
#17 0x080738ef in add_trusted_domain (domain_name=0x9841f28 "SECRETP",
alt_name=0x98e7428 "DOMAIN.SECRET.COM", methods=0x81c2560, sid=0x0)
    at nsswitch/winbindd_util.c:140
#18 0x08073eab in init_domain_list () at nsswitch/winbindd_util.c:272
#19 0x080735b4 in domain_list () at nsswitch/winbindd_util.c:57
#20 0x08073f7a in find_domain_from_name (domain_name=0x9841f28 "SECRET")
at nsswitch/winbindd_util.c:304
#21 0x08073ab3 in rescan_trusted_domains () at
nsswitch/winbindd_util.c:172
#22 0x0806d92b in process_loop () at nsswitch/winbindd.c:584
#23 0x0806e50b in main (argc=2, argv=0xbff13864) at
nsswitch/winbindd.c:939
(gdb)

-----Original Message-----
From: Jeremy Allison [mailto:jra at samba.org] 
Sent: Monday, December 08, 2003 8:23 PM
To: Willis, Robert
Cc: samba-technical at lists.samba.org
Subject: Re: namequery.c


On Mon, Dec 08, 2003 at 07:07:07PM -0600, Willis, Robert wrote:
> First, let me say I haven't done any C programming since college (10 
> years ago), but I've been trying to debug a problem that I've had with

> Samba 3.0 in an ADS environment,  Basically I'm getting signal 11 
> crashes in Winbindd.
>  
> I think that I have narrowed down to the internal_resolve_name 
> function in namequery.c at line 993 is it malloc'ing room for one 
> ip_service struct, but at line 1041 it is passing it to the 
> resolve_hosts function that could overfill it?
>  
> I think the reason why I'm seeing the issue is that we have alot (30+)

> dc in our ads domain.
>  
> Is this what I am seeing or should I be looking elsewhere?

This is not actually the bug. When it mallocs room for only one
ip_service struct it's inside an if statement that will fill that one
entry and return immediately :

if (allzeros || allones || is_address) {

Although the code could do with a little cleaning here.

Can you catch the winbindd in the crash using the "panic action"
parameter and then use gdb to get a stack backtrace ? Remember to
compile with -g.

Thanks,

	Jeremy.




More information about the samba-technical mailing list