Bug 7217 - smb_panic on startup after pop_sec_ctx Samba 3.5.0/Ubuntu 9.04
smb_panic on startup after pop_sec_ctx Samba 3.5.0/Ubuntu 9.04
Status: RESOLVED WORKSFORME
Product: Samba 3.5
Classification: Unclassified
Component: File services
unspecified
x86 Linux
: P3 normal
: ---
Assigned To: Volker Lendecke
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-06 06:35 UTC by Tom Burkholder
Modified: 2010-03-07 06:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Burkholder 2010-03-06 06:35:12 UTC
Just compiled 3.5.0 under Ubuntu 9.04 w/kernel their 2.6.28-15-server, and smbd quits.  Reversion to 3.4.5 works fine.  Config command was

./configure --prefix=/usr --with-configdir=/etc/samba \
        --target=i686-linux-gnu --with-privatedir=/var/lib/samba \
        --with-piddir=/var/run/samba --with-lockdir=/var/lib/samba \
        --libdir=/usr/lib/samba --with-pam --with-pam-smbpass

Excerpt of the level 3 log from the crash (email if you'd like a full log 10 & core file):
---------------------------
[2010/03/06 06:40:04.388173,  2] lib/interface.c:340(add_interface)
  added interface lo ip=127.0.0.1 bcast=127.255.255.255 netmask=255.0.0.0
[2010/03/06 06:40:04.388233,  2] lib/interface.c:340(add_interface)
  added interface eth0 ip=fe80::****:43ea%eth0 bcast=fe80::ffff:ffff:ff
ff:ffff%eth0 netmask=ffff:ffff:ffff:ffff::
[2010/03/06 06:40:04.388443,  2] lib/interface.c:340(add_interface)
  added interface eth0 ip=130.207.76.73 bcast=***.***.***.*** netmask=255.255.255.128
[2010/03/06 06:40:04.388627,  2] lib/interface.c:463(interpret_interface)
  interpret_interface: using netmask value 30 from config file on interface ppp0
[2010/03/06 06:40:04.388687,  3] lib/interface.c:315(add_interface)
  not adding non-broadcast interface ppp0
[2010/03/06 06:40:04.388954,  3] smbd/server.c:1135(main)
  loaded services
[2010/03/06 06:40:04.389012,  3] smbd/server.c:1150(main)
  Becoming a daemon.
[2010/03/06 06:40:04.390925,  2] lib/smbldap_util.c:277(smbldap_search_domain_in
fo)
  smbldap_search_domain_info: Searching for:[(&(objectClass=sambaDomain)(sambaDo
mainName=MUSLAB))]
[2010/03/06 06:40:04.393114,  2] lib/smbldap.c:950(smbldap_open_connection)
  smbldap_open_connection: connection opened
[2010/03/06 06:40:04.402438,  3] lib/smbldap.c:1166(smbldap_connect_system)
  ldap_connect_system: successful connection to the LDAP server
[2010/03/06 06:40:04.407734,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2010/03/06 06:40:04.407869,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2010/03/06 06:40:04.407919,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2010/03/06 06:40:04.408022,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 2
[2010/03/06 06:40:04.408124,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 1
[2010/03/06 06:40:04.408172,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 2
[2010/03/06 06:40:04.409784,  2] passdb/pdb_ldap.c:572(init_sam_from_ldap)
  init_sam_from_ldap: Entry found for user: root
[2010/03/06 06:40:04.410494,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 3
[2010/03/06 06:40:04.410556,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 2
[2010/03/06 06:40:04.410600,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 3
[2010/03/06 06:40:04.436584,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 2
[2010/03/06 06:40:04.437153,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 1
[2010/03/06 06:40:04.437243,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2010/03/06 06:40:04.437372,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2010/03/06 06:40:04.437430,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2010/03/06 06:40:04.437474,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2010/03/06 06:40:04.438758,  2] passdb/pdb_ldap.c:2446(init_group_from_ldap)
  init_group_from_ldap: Entry found for group: 0
[2010/03/06 06:40:04.439006,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2010/03/06 06:40:04.439285,  0] lib/fault.c:46(fault_report)
  ===============================================================
[2010/03/06 06:40:04.439350,  0] lib/fault.c:47(fault_report)
  INTERNAL ERROR: Signal 6 in pid 4448 (3.5.0)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2010/03/06 06:40:04.439414,  0] lib/fault.c:49(fault_report)
  
  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2010/03/06 06:40:04.439474,  0] lib/fault.c:50(fault_report)
  ===============================================================
[2010/03/06 06:40:04.439516,  0] lib/util.c:1465(smb_panic)
  PANIC (pid 4448): internal error
[2010/03/06 06:40:04.445074,  0] lib/util.c:1569(log_stack_trace)
  BACKTRACE: 19 stack frames:
   #0 /usr/sbin/smbd(log_stack_trace+0x2d) [0xb79f9c21]
   #1 /usr/sbin/smbd(smb_panic+0x78) [0xb79f9d6e]
   #2 /usr/sbin/smbd [0xb79e8ea8]
   #3 [0xb7673400]
   #4 /lib/tls/i686/cmov/libc.so.6(abort+0x188) [0xb7352098]
   #5 /usr/lib/libtalloc.so.1 [0xb71c5650]
   #6 /usr/lib/libtalloc.so.1 [0xb71c56a1]
   #7 /usr/lib/libtalloc.so.1(talloc_free+0x51) [0xb71c93c5]
   #8 /usr/lib/libwbclient.so.0(wbcFreeMemory+0x21) [0xb749fd93]
   #9 /usr/lib/libwbclient.so.0(wbcSidToGid+0xb4) [0xb74a226d]
   #10 /usr/sbin/smbd(winbind_sid_to_gid+0x38) [0xb79c4e28]
   #11 /usr/sbin/smbd(sid_to_gid+0x12d) [0xb79a1e05]
   #12 /usr/sbin/smbd(create_local_nt_token+0x31f) [0xb7a55883]
   #13 /usr/sbin/smbd(get_root_nt_token+0x15a) [0xb7a55e5f]
   #14 /usr/sbin/smbd(svcctl_init_keys+0x2e) [0xb78ff737]
   #15 /usr/sbin/smbd(registry_init_full+0x85) [0xb7d499b5]
   #16 /usr/sbin/smbd(main+0xac3) [0xb7d7a019]
   #17 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb733b775]
   #18 /usr/sbin/smbd [0xb77425a1]
[2010/03/06 06:40:04.446146,  0] lib/fault.c:326(dump_core)
  dumping core in /usr/var/cores/smbd

-----------------------------------------

Excerpt of level 10 log between the last pop_set_ctx and fault_report:
-----------------------------------------
[2010/03/06 07:22:05.655846,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2010/03/06 07:22:05.655897, 10] passdb/lookup_sid.c:1182(legacy_gid_to_sid)
  LEGACY: gid 0 -> sid S-1-5-21-4160363053-2865065018-2452975118-1016
[2010/03/06 07:22:05.655957, 10] auth/token_util.c:356(create_local_nt_token)
  Create local NT token for S-1-5-21-4160363053-2865065018-2452975118-1004
[2010/03/06 07:22:05.656069, 10] lib/gencache.c:334(gencache_get_data_blob)
  Cache entry with key = IDMAP/SID2GID/S-1-5-32-544 couldn't be found 
[2010/03/06 07:22:05.656274,  0] lib/fault.c:46(fault_report)
-----------------------------------------

LDAP does have a group named Administrators with sambaSID S-1-5-32-544 and unix gid 544

I saw LDAP in the log just before the crash, so I reverted to a tdb backend (we migrated to ldap about the time of samba 3.4.3).  This also crashes, with log 3:
-----------------------------------------
[2010/03/06 06:54:54.908739,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2010/03/06 06:54:54.908850,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 2
[2010/03/06 06:54:54.908902,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 1
[2010/03/06 06:54:54.908945,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 2
[2010/03/06 06:54:54.930897,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 3
[2010/03/06 06:54:54.931047,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 2
[2010/03/06 06:54:54.931093,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 3
[2010/03/06 06:54:54.931299,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 2
[2010/03/06 06:54:54.931382,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 1
[2010/03/06 06:54:54.931445,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2010/03/06 06:54:54.931579,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2010/03/06 06:54:54.931634,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2010/03/06 06:54:54.931677,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2010/03/06 06:54:54.958015,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2010/03/06 06:54:54.958472,  0] lib/fault.c:46(fault_report)
  ===============================================================
[2010/03/06 06:54:54.958551,  0] lib/fault.c:47(fault_report)
  INTERNAL ERROR: Signal 6 in pid 6892 (3.5.0)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2010/03/06 06:54:54.958617,  0] lib/fault.c:49(fault_report)
  
  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2010/03/06 06:54:54.958670,  0] lib/fault.c:50(fault_report)
  ===============================================================
[2010/03/06 06:54:54.958712,  0] lib/util.c:1465(smb_panic)
  PANIC (pid 6892): internal error
[2010/03/06 06:54:54.964483,  0] lib/util.c:1569(log_stack_trace)
  BACKTRACE: 19 stack frames:
   #0 /usr/sbin/smbd(log_stack_trace+0x2d) [0xb79e9c21]
   #1 /usr/sbin/smbd(smb_panic+0x78) [0xb79e9d6e]
   #2 /usr/sbin/smbd [0xb79d8ea8]
   #3 [0xb7663400]
   #4 /lib/tls/i686/cmov/libc.so.6(abort+0x188) [0xb7342098]
   #5 /usr/lib/libtalloc.so.1 [0xb71b5650]
   #6 /usr/lib/libtalloc.so.1 [0xb71b56a1]
   #7 /usr/lib/libtalloc.so.1(talloc_free+0x51) [0xb71b93c5]
   #8 /usr/lib/libwbclient.so.0(wbcFreeMemory+0x21) [0xb748fd93]
   #9 /usr/lib/libwbclient.so.0(wbcSidToGid+0xb4) [0xb749226d]
   #10 /usr/sbin/smbd(winbind_sid_to_gid+0x38) [0xb79b4e28]
   #11 /usr/sbin/smbd(sid_to_gid+0x12d) [0xb7991e05]
   #12 /usr/sbin/smbd(create_local_nt_token+0x31f) [0xb7a45883]
   #13 /usr/sbin/smbd(get_root_nt_token+0x15a) [0xb7a45e5f]
   #14 /usr/sbin/smbd(svcctl_init_keys+0x2e) [0xb78ef737]
   #15 /usr/sbin/smbd(registry_init_full+0x85) [0xb7d399b5]
   #16 /usr/sbin/smbd(main+0xac3) [0xb7d6a019]
   #17 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb732b775]
   #18 /usr/sbin/smbd [0xb77325a1]
[2010/03/06 06:54:54.964975,  0] lib/fault.c:326(dump_core)
-------------------------------------

testparm gives:
-------------------------------------
Press enter to see a dump of your service definitions

[global]
        unix charset = iso8859-1
        workgroup = MUSLAB
        server string = Muscle Lab Server
        interfaces = lo, eth0
        server schannel = Yes
        passdb backend = ldapsam:ldap://muscle.ap.gatech.edu
        passwd program = /usr/sbin/smbldap-passwd %u
        passwd chat = *New*password* %n\n *Retype*new*password* %n\n *all*authentication*tokens*updated*
        client NTLMv2 auth = Yes
        log level = 1
        syslog = 0
        log file = /var/log/samba/log.%U
        name resolve order = hosts lmhosts wins bcast
        time server = Yes
        server signing = Yes
        deadtime = 30
        keepalive = 180
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        printcap name = cups
        add user script = /usr/sbin/smbldap-useradd -m "%u" -m
        delete user script = /usr/sbin/smbldap-userdel "%u"
        add group script = /usr/sbin/smbldap-groupadd -p "%g"
        delete group script = /usr/sbin/smbldap-groupdel "%g"
        add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g"
        delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" "%g"
        set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u"
        add machine script = /usr/sbin/smbldap-useradd -w "%u"
        logon script = scripts\logon.bat
        logon path = \\%L\data\Users\%U\Profile
        logon drive = e:
        logon home = \\%L\data
        domain logons = Yes
        os level = 65
        preferred master = Yes
        domain master = Yes
        wins support = Yes
        kernel oplocks = No
        ldap admin dn = "cn=root,dc=****,dc=****,dc=****"
        ldap machine suffix = ou=machines
        ldap passwd sync = yes
        ldap suffix = dc=****,dc=****,dc=****
        ldap ssl = no
        ldap user suffix = ou=People
        eventlog list = syslog, apache2
        remote announce = ***.***.***.***
        idmap uid = 10000-15000
        idmap gid = 10000-15000
        winbind enum users = Yes
        winbind enum groups = Yes
        hosts allow = 127.0.0.0/16, ***.***.***.***/25, 0.0.0.0
        hosts deny = all
[service definitions]
Comment 1 Volker Lendecke 2010-03-07 01:36:12 UTC
Can you replace the system libwbclient with the one from 3.5.0 and retry?

Volker
Comment 2 Tom Burkholder 2010-03-07 06:10:37 UTC
Yes, that was it exactly. All of the 3.5.0 libraries were installed in /usr/lib/samba, while (at least) nmbd and smbd were using libraries in /usr/lib.  I did configure with --libdir=/usr/lib/samba

Thanks for the very rapid response.  Samba is 80% of why I started using linux back in 1999, and it's still my favorite part from a just-works perspective.  You guys are great.