Bug 4667 - Winbind 3.0.25a crashes with ADS authentication
Winbind 3.0.25a crashes with ADS authentication
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: winbind
3.0.25a
x86 Linux
: P3 normal
: none
Assigned To: Simo Sorce
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-29 11:12 UTC by Ton Hoogstraten
Modified: 2009-05-30 10:52 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ton Hoogstraten 2007-05-29 11:12:54 UTC
During testing with samba 3.0.25a winbind all of a sudden crashes with the following entries written in the log files.

It happens at random when accessing the shares from different windows XP workstations all joined at the same AD. If wanted I can send core dumps of the system. Just let me know. To give an indication how often it crashed. I've installed 3.0.25a this morning.

System: Fedora Core 5 (2.6.15-1.2054_FC5smp)
Compaq Proliant 6400R (3 CPU) Memory: 1292060 kB

/var/log/samba/cores/winbindd
-rw------- 1 root root 1462272 May 29 12:00 core.23385
-rw------- 1 root root 1507328 May 29 11:59 core.23390
-rw------- 1 root root 1572864 May 29 12:09 core.23485
-rw------- 1 root root 1503232 May 29 12:08 core.23493
-rw------- 1 root root 1601536 May 29 12:20 core.23601
-rw------- 1 root root 1515520 May 29 12:19 core.23607
-rw------- 1 root root 1355776 May 29 13:49 core.23899
-rw------- 1 root root 1458176 May 29 14:01 core.24012
-rw------- 1 root root 1355776 May 29 14:00 core.24017
-rw------- 1 root root 1511424 May 29 14:10 core.24044
-rw------- 1 root root 1355776 May 29 14:13 core.24104
-rw------- 1 root root 1527808 May 29 15:35 core.24220
-rw------- 1 root root 1585152 May 29 17:25 core.24636
-rw------- 1 root root 1511424 May 29 17:25 core.24640

==> /var/log/samba/log.winbindd-idmap <==
winbindd: ../../../libraries/libldap/getentry.c:48: ldap_next_entry: Assertion `entry != ((void *)0)' failed.
[2007/05/29 17:25:14, 0] lib/fault.c:fault_report(41)
  ===============================================================
[2007/05/29 17:25:14, 0] lib/fault.c:fault_report(42)
  INTERNAL ERROR: Signal 6 in pid 24640 (3.0.25a)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2007/05/29 17:25:14, 0] lib/fault.c:fault_report(44)
  
  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2007/05/29 17:25:14, 0] lib/fault.c:fault_report(45)
  ===============================================================
[2007/05/29 17:25:14, 0] lib/util.c:smb_panic(1632)
  PANIC (pid 24640): internal error
[2007/05/29 17:25:14, 0] lib/util.c:log_stack_trace(1736)
  BACKTRACE: 24 stack frames:
   #0 winbindd(log_stack_trace+0x2d) [0xa78b3d]
   #1 winbindd(smb_panic+0x5d) [0xa78c6d]
   #2 winbindd [0xa6360a]
   #3 [0x3e3420]
   #4 [0x3e3402]
   #5 /lib/libc.so.6(gsignal+0x49) [0x40c159]
   #6 /lib/libc.so.6(abort+0x103) [0x40d6e3]
   #7 /lib/libc.so.6(__assert_fail+0xfd) [0x405abd]
   #8 /usr/lib/libldap-2.3.so.0(ldap_next_entry+0x9c) [0x1b7f6c]
   #9 winbindd [0xbb32a0]
   #10 winbindd(idmap_unixids_to_sids+0x394) [0xbaa774]
   #11 winbindd(idmap_gid_to_sid+0x6b) [0xbae36b]
   #12 winbindd(winbindd_dual_gid2sid+0x63) [0xa10ff3]
   #13 winbindd [0xa0e6b2]
   #14 winbindd [0xa10dc5]
   #15 winbindd(winbindd_sid2uid_async+0xaf) [0xa13bcf]
   #16 winbindd [0x9e3cdc]
   #17 winbindd [0xa10306]
   #18 winbindd [0xa10f87]
   #19 winbindd [0xa0f782]
   #20 winbindd [0x9e0918]
   #21 winbindd(main+0x94d) [0x9e136d]
   #22 /lib/libc.so.6(__libc_start_main+0xdc) [0x3f97e4]
   #23 winbindd [0x9df651]
[2007/05/29 17:25:15, 0] lib/fault.c:dump_core(181)
  dumping core in /var/log/samba/cores/winbindd

==> /var/log/samba/samba.log <==
[2007/05/29 17:25:15, 0] lib/fault.c:fault_report(41)
  ===============================================================
[2007/05/29 17:25:15, 0] lib/fault.c:fault_report(42)
  INTERNAL ERROR: Signal 6 in pid 24636 (3.0.25a)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2007/05/29 17:25:15, 0] lib/fault.c:fault_report(44)
  
  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2007/05/29 17:25:15, 0] lib/fault.c:fault_report(45)
  ===============================================================
[2007/05/29 17:25:15, 0] lib/util.c:smb_panic(1632)
  PANIC (pid 24636): internal error
[2007/05/29 17:25:15, 0] lib/util.c:log_stack_trace(1736)
  BACKTRACE: 15 stack frames:
   #0 winbindd(log_stack_trace+0x2d) [0xa78b3d]
   #1 winbindd(smb_panic+0x5d) [0xa78c6d]
   #2 winbindd [0xa6360a]
   #3 [0x3e3420]
   #4 [0x3e3402]
   #5 /lib/libc.so.6(gsignal+0x49) [0x40c159]
   #6 /lib/libc.so.6(abort+0x103) [0x40d6e3]
   #7 winbindd(talloc_get_name+0x3e) [0xa5bc6e]
   #8 winbindd(talloc_check_name+0x2c) [0xa5bedc]
   #9 winbindd(talloc_check_name_abort+0x2c) [0xa78dfc]
   #10 winbindd [0xa0f518]
   #11 winbindd [0x9e0979]
   #12 winbindd(main+0x94d) [0x9e136d]
   #13 /lib/libc.so.6(__libc_start_main+0xdc) [0x3f97e4]
   #14 winbindd [0x9df651]
[2007/05/29 17:25:15, 0] lib/fault.c:dump_core(181)
  dumping core in /var/log/samba/cores/winbindd


My smb.conf is as followed for the general section (names have been changed for corporate reasons):

[global]
        workgroup = EXAMPLE
        netbios name = SERVER1
        realm = EXAMPLE.COM
        server string = Samba FileServer
        security = ADS
        encrypt passwords = yes
        disable netbios = yes

        client schannel = no        
        client use spnego = no
        server signing = auto
        large readwrite = no
        restrict anonymous = 2
        log file = /var/log/samba/samba.log
        name resolve order = host bcast
        
        max log size = 150
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
        preferred master = No
        local master = No
        domain master = No
        time server = NO
        dns proxy = No


        idmap domains = EXAMPLE
        #Local LDAP (read-only) backend configuration:
        idmap config EXAMPLE: default = yes
        idmap config EXAMPLE: backend = ldap
        idmap config EXAMPLE: range = 10000-2000000
        idmap config EXAMPLE: ldap_url = ldap://127.0.0.1
        idmap config EXAMPLE: ldap_user_dn = cn=Manager,dc=example,dc=com
        idmap config EXAMPLE: ldap_base_dn = ou=Idmap,dc=example,dc=com

        #Master LDAP (read/write) backend configuration:
        idmap alloc backend = ldap
        idmap alloc config: range =  10000-2000000
        idmap alloc config: ldap_url = ldap://127.0.0.1
        idmap alloc config: ldap_user_dn = cn=Manager,dc=example,dc=com
        idmap alloc config: ldap_base_dn = ou=Idmap,dc=example,dc=com

        winbind enum users=no
        winbind enum groups=no
        enable privileges = yes
        template homedir = /home/%U
        winbind use default domain = Yes
        printing = cups
        printcap name = /etc/printcap
Comment 1 Ton Hoogstraten 2007-06-03 08:55:00 UTC
I can replicate the crashing easily by doing a 'ls -l' in a directory which has active directory groups assigned to files. The winbind daemon is not able to resolve the GID's to name and crashes.
Comment 2 Simo Sorce 2007-06-09 13:20:31 UTC
(In reply to comment #1)
[...] 
> ==> /var/log/samba/log.winbindd-idmap <==
> winbindd: ../../../libraries/libldap/getentry.c:48: ldap_next_entry: Assertion
> `entry != ((void *)0)' failed.
> [2007/05/29 17:25:14, 0] lib/fault.c:fault_report(41)
>   ===============================================================
> [2007/05/29 17:25:14, 0] lib/fault.c:fault_report(42)
>   INTERNAL ERROR: Signal 6 in pid 24640 (3.0.25a)
>   Please read the Trouble-Shooting section of the Samba3-HOWTO
> [2007/05/29 17:25:14, 0] lib/fault.c:fault_report(44)
> 
>   From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
> [2007/05/29 17:25:14, 0] lib/fault.c:fault_report(45)
>   ===============================================================
> [2007/05/29 17:25:14, 0] lib/util.c:smb_panic(1632)
>   PANIC (pid 24640): internal error
> [2007/05/29 17:25:14, 0] lib/util.c:log_stack_trace(1736)
>   BACKTRACE: 24 stack frames:
>    #0 winbindd(log_stack_trace+0x2d) [0xa78b3d]
>    #1 winbindd(smb_panic+0x5d) [0xa78c6d]
>    #2 winbindd [0xa6360a]
>    #3 [0x3e3420]
>    #4 [0x3e3402]
>    #5 /lib/libc.so.6(gsignal+0x49) [0x40c159]
>    #6 /lib/libc.so.6(abort+0x103) [0x40d6e3]
>    #7 /lib/libc.so.6(__assert_fail+0xfd) [0x405abd]
>    #8 /usr/lib/libldap-2.3.so.0(ldap_next_entry+0x9c) [0x1b7f6c]
>    #9 winbindd [0xbb32a0]
>    #10 winbindd(idmap_unixids_to_sids+0x394) [0xbaa774]
>    #11 winbindd(idmap_gid_to_sid+0x6b) [0xbae36b]
>    #12 winbindd(winbindd_dual_gid2sid+0x63) [0xa10ff3]
>    #13 winbindd [0xa0e6b2]
>    #14 winbindd [0xa10dc5]
>    #15 winbindd(winbindd_sid2uid_async+0xaf) [0xa13bcf]
>    #16 winbindd [0x9e3cdc]
>    #17 winbindd [0xa10306]
>    #18 winbindd [0xa10f87]
>    #19 winbindd [0xa0f782]
>    #20 winbindd [0x9e0918]
>    #21 winbindd(main+0x94d) [0x9e136d]
>    #22 /lib/libc.so.6(__libc_start_main+0xdc) [0x3f97e4]
>    #23 winbindd [0x9df651]
> [2007/05/29 17:25:15, 0] lib/fault.c:dump_core(181)
>   dumping core in /var/log/samba/cores/winbindd


Ok I fixed this one in svn rev.23404
Comment 3 Simo Sorce 2007-06-09 13:23:00 UTC
I need debugging symbols to trace what's going on with the second one.
Comment 4 Ton Hoogstraten 2007-06-12 03:07:53 UTC
Do you require a core dump for that? I probably still have those.
Comment 5 Simo Sorce 2007-06-12 07:50:37 UTC
(In reply to comment #4)
> Do you require a core dump for that? I probably still have those.
> 

No, just a stack trace with full debugging symbols.
Which packages are you using?
Comment 6 Ton Hoogstraten 2007-06-12 08:15:17 UTC
I'm running on a system build of samba-3.0.25a-1.src.rpm. No changes made, just ran rpmbuild and build the packages.

doing 'ls -la' in a Directory with groups assigned from AD makes winbind crash with the following info the log file.

Winbindd running with -d 10 output:

pdb backend smbpasswd has a valid init
could not convert gid 10111 to sid
process_request: request fn GETGRGID
[    0]: getgrgid 10059
Could not send async request
Could not trigger gid2sid
could not convert gid 10059 to sid
process_request: request fn GETGRGID
[    0]: getgrgid 10055
===============================================================
INTERNAL ERROR: Signal 6 in pid 17813 (3.0.25a)
Please read the Trouble-Shooting section of the Samba3-HOWTO

From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
===============================================================
PANIC (pid 17813): internal error
BACKTRACE: 15 stack frames:
 #0 winbindd(log_stack_trace+0x2d) [0x4a0b3d]
 #1 winbindd(smb_panic+0x5d) [0x4a0c6d]
 #2 winbindd [0x48b60a]
 #3 [0xf6f420]
 #4 [0xf6f402]
 #5 /lib/libc.so.6(gsignal+0x49) [0x6af159]
 #6 /lib/libc.so.6(abort+0x103) [0x6b06e3]
 #7 winbindd(talloc_get_name+0x3e) [0x483c6e]
 #8 winbindd(talloc_check_name+0x2c) [0x483edc]
 #9 winbindd(talloc_check_name_abort+0x2c) [0x4a0dfc]
 #10 winbindd [0x437518]
 #11 winbindd [0x408979]
 #12 winbindd(main+0x94d) [0x40936d]
 #13 /lib/libc.so.6(__libc_start_main+0xdc) [0x69c7e4]
 #14 winbindd [0x407651]
dumping core in /var/log/samba/cores/winbindd
read_data: read of 2084 returned 0. Error = Success
Got invalid request length: 0
Comment 7 Simo Sorce 2007-06-12 09:47:46 UTC
Can you please install the samba-debuginfo package as well if not already installed and retry?

There are 2 missing symbols there that would let me guess where that crash comes from.

Simo.
Comment 8 Alvaro Fernandez 2007-06-25 06:03:48 UTC
Hello,

Using 3.0.25a compiled from source, RHEL3U6. Binaries stripped.

I've also experienced OCASIONAL winbind crashes, but 'ls -al' on shares with ADS group mappings doesn't crash our installation.

Note: Using name resolve order = wins bcast caused us majority of winbind crashes, until last week I've switch to "lmhost wins". 

Also, now running winbind without "-B" - crashes also with "-B" on.

regards, 

[global]
        workgroup = EXAMPLE
        realm = EXAMPLE.INT
        security = ADS
        netbios name = EXAMPLE_LNX
        preferred master = no
        server string = Servidor Ficheros Example
        encrypt passwords = Yes
        log file = /var/log/samba/%m.log
       
        log level = 0
        max log size = 0
        dns proxy = No
        wins server = xxx.xxx.xxx.xxx  yyy.yyy.yyy.yyyy
        winbind uid = 10000-20000
       
        idmap uid = 10000-20000
        idmap gid = 10000-20000

        template homedir = /export/data/home/%D/%U
        winbind separator = +
        winbind enum users = yes
        winbind enum groups = yes
        hosts allow = 10.174.123.
              
        load printers = no
        socket options = TCP_NODELAY SO_RCVBUF=262144 SO_SNDBUF=262144 SO_KEEPALIVE IPTOS_LOWDELAY
        read raw = yes
        use sendfile = yes
        write raw = yes
        getwd cache = yes
        smb ports = 139
-
Comment 9 Simo Sorce 2009-05-30 10:52:39 UTC
I believe this is completely fixed in master (the code has changed a lot since 3.0.x anyway).
Closing as fixed, please reopen if you can reproduce in latest 3.3.x series.