Built on OpenIndiana 151 just fine. Following the Samba-4 howto, all the way up to configuring Bind. Compiled Bind 9.8.1-P1. When I try to start named, I get the following error... 18-Feb-2012 14:22:14.595 starting BIND 9.8.1-P1 -g 18-Feb-2012 14:22:14.595 built with defaults 18-Feb-2012 14:22:14.595 found 4 CPUs, using 4 worker threads 18-Feb-2012 14:22:14.598 using up to 4096 sockets 18-Feb-2012 14:22:14.634 loading configuration from '/etc/named.conf' 18-Feb-2012 14:22:14.636 reading built-in trusted keys from file '/etc/bind.keys' 18-Feb-2012 14:22:14.637 using default UDP/IPv4 port range: [1024, 65535] 18-Feb-2012 14:22:14.638 using default UDP/IPv6 port range: [1024, 65535] 18-Feb-2012 14:22:14.644 listening on IPv4 interface lo0, 127.0.0.1#53 18-Feb-2012 14:22:14.652 listening on IPv4 interface e1000g1, 192.168.1.10#53 18-Feb-2012 14:22:14.660 generating session key for dynamic DNS 18-Feb-2012 14:22:14.661 sizing zone task pool based on 0 zones 18-Feb-2012 14:22:14.661 Loading 'AD DNS Zone' using driver dlopen 18-Feb-2012 14:22:14.664 dlz_dlopen failed to open library '/usr/local/samba/lib/bind9/dlz_bind9.so' - ld.so.1: named: fatal: relocation error: file /usr/local/samba/lib/bind9/dlz_bind9.so: symbol ndr_pull_dnsp_DnssrvRpcRecord: referenced symbol not found 18-Feb-2012 14:22:14.664 dlz_dlopen of 'AD DNS Zone' failed 18-Feb-2012 14:22:14.664 SDLZ driver failed to load. 18-Feb-2012 14:22:14.664 DLZ driver failed to load. 18-Feb-2012 14:22:14.665 loading configuration: failure 18-Feb-2012 14:22:14.665 exiting (due to fatal error) I've deleted the Samba installation and started over re-compiling both Samba and Bind, only to have the same problem. If I instead build Samba as configure.developer, I get a mysterious segfault instead at the same spot.
Apparently lib/private was missing from the runpath. I've added it with the following command... elfedit -e 'dyn:runpath /usr/ccs/lib:/lib:/usr/lib:/usr/sfw/lib:/usr/local/samba/lib:/usr/local/samba/lib/private' /usr/local/samba/lib/bind9/dlz_bind9.so Now, I get the segfault again.
I'm not sure if this addendum would better be served as a new but, but for reference here is the tail of the truss output for starting named after the elfedit fix applied... /5: memcntl(0xFD2F0000, 26092, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 /5: stat64("/usr/ccs/lib/libsamba-modules.so", 0xFE70C8E0) Err#2 ENOENT /5: stat64("/lib/libsamba-modules.so", 0xFE70C8E0) Err#2 ENOENT /5: stat64("/usr/lib/libsamba-modules.so", 0xFE70C8E0) Err#2 ENOENT /5: stat64("/usr/sfw/lib/libsamba-modules.so", 0xFE70C8E0) Err#2 ENOENT /5: stat64("/usr/local/samba/lib/libsamba-modules.so", 0xFE70C8E0) Err#2 ENOENT /5: mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFD2D0000 /5: stat64("/usr/local/samba/lib/private/libsamba-modules.so", 0xFE70C8E0) = 0 /5: resolvepath("/usr/local/samba/lib/private/libsamba-modules.so", "/usr/local/samba/lib/private/libsamba-modules.so", 1023) = 48 /5: open("/usr/local/samba/lib/private/libsamba-modules.so", O_RDONLY) = 3 /5: mmapobj(3, MMOBJ_INTERPRET, 0xFD2E0CA8, 0xFE70C94C, 0x00000000) = 0 /5: close(3) = 0 /5: mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFD2A0000 /5: memcntl(0xFD2B0000, 3512, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 /5: stat64("/lib/libmp.so.2", 0xFE70CCF0) = 0 /5: resolvepath("/lib/libmp.so.2", "/lib/libmp.so.2", 1023) = 15 /5: open("/lib/libmp.so.2", O_RDONLY) = 3 /5: mmapobj(3, MMOBJ_INTERPRET, 0xFD2A0A98, 0xFE70CD5C, 0x00000000) = 0 /5: close(3) = 0 /5: memcntl(0xFD280000, 3676, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 /5: mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFD270000 /5: brk(0x0869EBB0) = 0 /5: brk(0x086A0BB0) = 0 /5: sysinfo(SI_HOSTNAME, "activeD", 255) = 8 /5: brk(0x086A0BB0) = 0 /5: brk(0x086A2BB0) = 0 /5: stat64("/usr/local/samba/etc/smb.conf", 0xFE70D820) = 0 /5: stat64("/usr/local/samba/etc/smb.conf", 0xFE70D7C0) = 0 /5: open64("/usr/local/samba/etc/smb.conf", O_RDONLY) = 3 /5: fstat64(3, 0xFE70D760) = 0 /5: read(3, " # G l o b a l p a r".., 361) = 361 /5: close(3) = 0 /5: brk(0x086A2BB0) = 0 /5: brk(0x086A4BB0) = 0 /5: time() = 1329643979 /5: stat("/etc/krb5/krb5.conf", 0xFE70D680) = 0 /5: open("/etc/krb5/krb5.conf", O_RDONLY) = 3 /5: open("/etc/krb5/krb5.conf", O_RDWR) = 8 /5: llseek(8, 0, SEEK_CUR) = 0 /5: close(8) = 0 /5: fstat64(3, 0xFE70D510) = 0 /5: fstat64(3, 0xFE70D420) = 0 /5: ioctl(3, TCGETA, 0xFE70D4C0) Err#25 ENOTTY /5: read(3, " #\n # C D D L H E A".., 2048) = 1943 /5: read(3, 0x086A34D4, 2048) = 0 /5: llseek(3, 0, SEEK_CUR) = 1943 /5: close(3) = 0 /5: getuid() = 0 [0] /5: stat64("/lib/libpkcs11.so.1", 0xFE70CD88) Err#2 ENOENT /5: getpid() = 4680 [4679] /5: getpid() = 4680 [4679] /5: open("/dev/urandom", O_WRONLY) Err#13 EACCES [sys_devices] /5: time() = 1329643979 /5: time() = 1329643979 /5: time() = 1329643979 /5: time() = 1329643979 /5: time() = 1329643979 /5: time() = 1329643979 /5: time() = 1329643979 /5: open64("/usr/local/samba/etc/krb5.conf", O_RDONLY) Err#2 ENOENT /5: open64("/etc/krb5.conf", O_RDONLY) = 3 /5: fstat64(3, 0xFE70CEB0) = 0 /5: fstat64(3, 0xFE70CDC0) = 0 /5: ioctl(3, TCGETA, 0xFE70CE60) Err#25 ENOTTY /5: read(3, " #\n # C D D L H E A".., 2048) = 1943 /5: read(3, 0x086A2D24, 2048) = 0 /5: llseek(3, 0, SEEK_CUR) = 1943 /5: close(3) = 0 /5: Incurred fault #6, FLTBOUNDS %pc = 0xFE9693BB /5: siginfo: SIGSEGV SEGV_MAPERR addr=0x970EA71C /5: Received signal #11, SIGSEGV [default] /5: siginfo: SIGSEGV SEGV_MAPERR addr=0x970EA71C
Here's the pstack of the left-behind core... core 'core' of 4764: /usr/local/sbin/named ----------------- lwp# 1 / thread# 1 -------------------- fefcce01 rtld_db_dlactivity (feffb168, 3, 1, fefce21e) + 1 fefce23c lm_move (feffb168, 20, 10, fefa0038, fefa0028, 20) + 28 fefc0ff2 relocate_lmc (feffb168, 20, fef30af0, fe820b60, 8047be8, 1) + 14a fefd2b94 dlmopen_core (feffb168, feffb168, 82ee600, 2, fef30af0, 0) + 1ec fefd2ddc dlmopen_intn (feffb168, 82ee600, 2, fef30af0, 0, 0) + e0 fefd302d dlmopen_check (feffb168, 82ee600, 2, fef30af0) + f1 fefd30ca dlopen (82ee600, 2, 8047cb8, fee50f1a) + 4a fee50f5d dlfcn_load (82ee590, feecd47c, 0, 0) + 51 fee51a8a DSO_load (0, feecd47c, 0, 0) + 92 fee575c9 ENGINE_load_pk11 (821c6ce) + 31 fee54a6c ENGINE_load_builtin_engines (8047df8, 82fce88, 8047d68, 821c6ce, 0, 27) + 18 feeb1402 OPENSSL_config (0, 27, 8047d68, 821c5d7) + 2a 0821c6ce dst__openssl_init (0, 0, 3fc, 820898c) + 11c 08208a62 dst_lib_init2 (82e5f48, 82fae88, 0, 1) + 1be 080b5f58 ns_server_create (82e5f48, 82e22c8, 8047de8, 8099b55) + 24c 08099b9e setup (8047e10, fefc06a4, fe9e6245, fe93ea92, 82688fa, 82d7b6c) + 3de 0809a094 main (1, 8047e3c, 8047e44, 8268940, 0, 0) + 1ce 08089383 _start (1, 8047ee8, 0, 8047efe, 8047f02, 8047f0d) + 83 ----------------- lwp# 2 / thread# 2 -------------------- fe9df559 __lwp_park (82f5ecc, 82f5e98) + 19 fe9d8b2d cond_wait_queue (82f5ecc, 82f5e98, 0, fe9d9056) + 60 fe9d90ce __cond_wait (82f5ecc, 82f5e98, fe78ff48, fe9d9113) + 86 fe9d9121 cond_wait (82f5ecc, 82f5e98, fe78ffc8, fe9d9154) + 24 fe9d9169 pthread_cond_wait (82f5ecc, 82f5e98, 0, fe9d7d0a) + 21 08252d2d dispatch (82f5e88, 200, 8, fea45840) + b2 08253235 run (82f5e88, fea40000, fe78ffe8, fe9df1fe) + 17 fe9df253 _thrp_setup (fe760240) + 9b fe9df500 _lwp_start (fe760240, 0, 0, 0, 0, 0) ----------------- lwp# 3 / thread# 3 -------------------- fe9df559 __lwp_park (82f5ecc, 82f5e98) + 19 fe9d8b2d cond_wait_queue (82f5ecc, 82f5e98, 0, fe9d9056) + 60 fe9d90ce __cond_wait (82f5ecc, 82f5e98, fe74ff48, fe9d9113) + 86 fe9d9121 cond_wait (82f5ecc, 82f5e98, fe74ffc8, fe9d9154) + 24 fe9d9169 pthread_cond_wait (82f5ecc, 82f5e98, 0, fe9d7d0a) + 21 08252d2d dispatch (82f5e88, 200, 8, fea45840) + b2 08253235 run (82f5e88, fea40000, fe74ffe8, fe9df1fe) + 17 fe9df253 _thrp_setup (fe760a40) + 9b fe9df500 _lwp_start (fe760a40, 0, 0, 0, 0, 0) ----------------- lwp# 4 / thread# 4 -------------------- fe9df559 __lwp_park (82f5ecc, 82f5e98) + 19 fe9d8b2d cond_wait_queue (82f5ecc, 82f5e98, 0, fe9d9056) + 60 fe9d90ce __cond_wait (82f5ecc, 82f5e98, fe72ff48, fe9d9113) + 86 fe9d9121 cond_wait (82f5ecc, 82f5e98, fe72ffc8, fe9d9154) + 24 fe9d9169 pthread_cond_wait (82f5ecc, 82f5e98, 0, fe9d7d0a) + 21 08252d2d dispatch (82f5e88, 200, 8, fea45840) + b2 08253235 run (82f5e88, fea40000, fe72ffe8, fe9df1fe) + 17 fe9df253 _thrp_setup (fe761240) + 9b fe9df500 _lwp_start (fe761240, 0, 0, 0, 0, 0) ----------------- lwp# 5 / thread# 5 -------------------- fe9df559 __lwp_park (82f5ecc, 82f5e98) + 19 fe9d8b2d cond_wait_queue (82f5ecc, 82f5e98, 0, fe9d9056) + 60 fe9d90ce __cond_wait (82f5ecc, 82f5e98, fe70ff48, fe9d9113) + 86 fe9d9121 cond_wait (82f5ecc, 82f5e98, 0, fe9d9154) + 24 fe9d9169 pthread_cond_wait (82f5ecc, 82f5e98, 0, fe9d7d0a) + 21 08252d2d dispatch (82f5e88, 200, 8, fea45840) + b2 08253235 run (82f5e88, fea40000, fe70ffe8, fe9df1fe) + 17 fe9df253 _thrp_setup (fe761a40) + 9b fe9df500 _lwp_start (fe761a40, 0, 0, 0, 0, 0) ----------------- lwp# 6 / thread# 6 -------------------- fe9df559 __lwp_park (82f6ec8, 82f6e98) + 19 fe9d8b2d cond_wait_queue (82f6ec8, 82f6e98, 0, fe9d9056) + 60 fe9d90ce __cond_wait (82f6ec8, 82f6e98, fe6eff78, fe9d9113) + 86 fe9d9121 cond_wait (82f6ec8, 82f6e98, 4f437b48, fe9d9154) + 24 fe9d9169 pthread_cond_wait (82f6ec8, 82f6e98, 0, fea48140) + 21 08255825 run (82f6e88, fea40000, fe6effe8, fe9df1fe) + f0 fe9df253 _thrp_setup (fe762240) + 9b fe9df500 _lwp_start (fe762240, 0, 0, 0, 0, 0) ----------------- lwp# 7 / thread# 7 -------------------- fe9e3db5 ioctl (82f8e88, fea40000, fe6cffe8, fe9df1fe) + 15 fe9df253 _thrp_setup (fe762a40) + 9b fe9df500 _lwp_start (fe762a40, 0, 0, 0, 0, 0)
here's the gdb backtrace Stack level 0, frame at 0x8047ab0: eip = 0xfefcce01 in rtld_db_dlactivity; saved eip 0xfefccf60 called by frame at 0x8047ad0 Arglist at 0x8047aa8, args: Locals at 0x8047aa8, Previous frame's sp is 0x8047ab0 Saved registers: eip at 0x8047aac (gdb) bt #0 0xfefcce01 in rtld_db_dlactivity () from /lib/ld.so.1 #1 0xfefccf60 in rd_event () from /lib/ld.so.1 #2 0xfefce23c in lm_move () from /lib/ld.so.1 #3 0xfefc0ff2 in relocate_lmc () from /lib/ld.so.1 #4 0xfefd2b94 in dlmopen_core () from /lib/ld.so.1 #5 0xfefd2ddc in dlmopen_intn () from /lib/ld.so.1 #6 0xfefd302d in dlmopen_check () from /lib/ld.so.1 #7 0xfefd30ca in dlopen () from /lib/ld.so.1 #8 0xfee50f5d in dlfcn_load () from /usr/lib/libcrypto.so.0.9.8 #9 0xfee51a8a in DSO_load () from /usr/lib/libcrypto.so.0.9.8 #10 0xfee575c9 in ENGINE_load_pk11 () from /usr/lib/libcrypto.so.0.9.8 #11 0xfee54a6c in ENGINE_load_builtin_engines () from /usr/lib/libcrypto.so.0.9.8 #12 0xfeeb1402 in OPENSSL_config () from /usr/lib/libcrypto.so.0.9.8 #13 0x0821c6ce in dst__openssl_init (engine=0x0) at openssl_link.c:188 #14 0x08208a62 in dst_lib_init2 (mctx=0x82e5f48, ectx=0x82fae88, engine=0x0, eflags=1) at dst_api.c:210 #15 0x080b5f58 in ns_server_create (mctx=0x82e5f48, serverp=0x82e22c8) at server.c:5408 #16 0x08099b9e in setup () at ./main.c:882 #17 0x0809a094 in main (argc=1, argv=0x8047e3c) at ./main.c:1058
Amitay, you handle much of DNS development in s4. Could you please have a look?
Hi Michael, What compiler are you using? What's the output of ldd /usr/local/samba/lib/bind9/dlz_bind9.so?
# gcc -v Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs Configured with: /home/jt/OI-151A-STABLE/151A-PRESTABLE1/newbuilds/sfw/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc --enable-shared Thread model: posix gcc version 3.4.3 (csl-sol210-3_4-20050802)
# ldd /usr/local/samba/lib/bind9/dlz_bind 9.so libpthread.so.1 => /lib/libpthread.so.1 libsamdb.so.0 => /usr/local/samba/lib/libsamdb.so.0 libsamba-hostconfig.so.0 => /usr/local/samba/lib/libsamba-hostconfig.so.0 libgensec.so.0 => /usr/local/samba/lib/libgensec.so.0 libldb.so.1 => /usr/local/samba/lib/private/libldb.so.1 libsamdb-common.so => /usr/local/samba/lib/private/libsamdb-common.so libauthkrb5.so => /usr/local/samba/lib/private/libauthkrb5.so libndr-samba.so => /usr/local/samba/lib/private/libndr-samba.so libsamba-util.so.0 => /usr/local/samba/lib/libsamba-util.so.0 libsamba-credentials.so.0 => /usr/local/samba/lib/libsamba-credentials.so.0 libndr-samba.so => /usr/local/samba/lib/private/libndr-samba.so libsamba-util.so.0 => /usr/local/samba/lib/libsamba-util.so.0 libsamba-credentials.so.0 => /usr/local/samba/lib/libsamba-credentia ls.so.0 libndr.so.0 => /usr/local/samba/lib/libndr.so.0 libtalloc.so.2 => /usr/local/samba/lib/private/libtalloc.so.2 libevents.so => /usr/local/samba/lib/private/libevents.so libpopt.so.0 => /usr/lib/libpopt.so.0 libgcc_s.so.1 => /usr/sfw/lib/libgcc_s.so.1 libkrb5-samba4.so.26 => /usr/local/samba/lib/private/libkrb5-samba4.so. 26 libcli-ldap-common.so => /usr/local/samba/lib/private/libcli-lda p-common.so libldbsamba.so => /usr/local/samba/lib/private/libldbsamba.so libcliauth.so => /usr/local/samba/lib/private/libcliauth.so liberrors.so => /usr/local/samba/lib/private/liberrors.so libsecurity.so => /usr/local/samba/lib/private/libsecurity.so libgssapi-samba4.so.2 => /usr/local/samba/lib/private/libgssapi- samba4.so.2 libsocket_wrapper.so => /usr/local/samba/lib/private/libsocket_wrapper. so libreplace.so => /usr/local/samba/lib/private/libreplace.so libuid_wrapper.so => /usr/local/samba/lib/private/libuid_wrapper.so libnss_wrapper.so => /usr/local/samba/lib/private/libnss_wrapper.so libserver-role.so => /usr/local/samba/lib/private/libserver-role.so librt.so.1 => /lib/librt.so.1 libnsl.so.1 => /lib/libnsl.so.1 libsocket.so.1 => /lib/libsocket.so.1 libcom_err-samba4.so.0 => /usr/local/samba/lib/private/libcom_err -samba4.so.0 libsamba-modules.so => /usr/local/samba/lib/private/libsamba-modules.s o libtevent-util.so.0 => /usr/local/samba/lib/libtevent-util.so.0 libtevent.so.0 => /usr/local/samba/lib/private/libtevent.so.0 libsamba-sockets.so => /usr/local/samba/lib/private/libsamba-sockets.s o libasn1util.so => /usr/local/samba/lib/private/libasn1util.so libtdb_compat.so => /usr/local/samba/lib/private/libtdb_compat.so libtdb.so.2 => /usr/local/samba/lib/private/libtdb.so.2 libccan.so.0 => /usr/local/samba/lib/private/libccan.so.0 libflag_mapping.so => /usr/local/samba/lib/private/libflag_mapping.so libndr-standard.so.0 => /usr/local/samba/lib/libndr-standard.so.0 libndr-krb5pac.so.0 => /usr/local/samba/lib/libndr-krb5pac.so.0 libndr-nbt.so.0 => /usr/local/samba/lib/libndr-nbt.so.0 libUTIL_TDB.so => /usr/local/samba/lib/private/libUTIL_TDB.so libtdb-wrap.so => /usr/local/samba/lib/private/libtdb-wrap.so libroken-samba4.so.19 => /usr/local/samba/lib/private/libroken-s amba4.so.19 libheimbase-samba4.so.1 => /usr/local/samba/lib/private/libheimbase-samba4.so.1 libasn1-samba4.so.8 => /usr/local/samba/lib/private/libasn1-samba4.so.8 libhx509-samba4.so.5 => /usr/local/samba/lib/private/libhx509-samba4.so.5 libhcrypto-samba4.so.5 => /usr/local/samba/lib/private/libhcrypto-samba4.so.5 libwind-samba4.so.0 => /usr/local/samba/lib/private/libwind-samba4.so.0 libintl.so.1 => /lib/libintl.so.1 libresolv.so.2 => /lib/libresolv.so.2 libz.so.1 => /lib/libz.so.1 libauth_sam_reply.so => /usr/local/samba/lib/private/libauth_sam_reply.so libgnutls.so.26 => /usr/lib/libgnutls.so.26 libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 libc.so.1 => /lib/libc.so.1 libmp.so.2 => /lib/libmp.so.2 libmd.so.1 => /lib/libmd.so.1 libtasn1.so.3 => /usr/lib/libtasn1.so.3 libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 libm.so.2 => /lib/libm.so.2
This issue is related to the clash between - kerberos installed on the system and used to build BIND - heimdal kerberos used to build samba and dlz_bind9 plugin uses samba libraries The potential fixes might be :- - Installing latest version of MIT kerberos on the system, or - Building BIND and SAMBA with same version of Heimdal kerberos I can get named to work by building BIND with MIT kerberos 1.9.3. Amitay.
Sounds good to me, thank you for your diligence, I will reopen if I have more issues.