Hi, I’ve build samba 4.11.4 from source on a Ubuntu 18.04.3 and I’m using it as a domain controller. There are 3 domain controllers build the same way and all there are getting this error. The replication between them is ok and the ldap services are working ok. At every a couple of minutes I’m getting the following error. What could be the cause and how can I fix it ? After the error I've written more detailed information about samba installation and configuration. Thank you ! 2020-01-14T17:20:13+02:00 dc04 samba[10286]: [2020/01/14 17:20:13.304916, 0] ../../source4/lib/cmdline/popt_common.c:74(popt_s4_talloc_log_fn) 2020-01-14T17:20:13+02:00 dc04 samba[10286]: Bad talloc magic value - unknown value 2020-01-14T17:20:13+02:00 dc04 samba[10286]: [2020/01/14 17:20:13.305299, 0] ../../lib/util/fault.c:132(smb_panic_default) 2020-01-14T17:20:13+02:00 dc04 samba[10286]: smb_panic_default: PANIC (pid 10286): Bad talloc magic value - unknown value 2020-01-14T17:20:13+02:00 dc04 samba[10286]: [2020/01/14 17:20:13.307672, 0] ../../lib/util/fault.c:265(log_stack_trace) 2020-01-14T17:20:13+02:00 dc04 samba[10286]: BACKTRACE: 64 stack frames: 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #0 /usr/local/samba/lib/libsamba-util.so.0(log_stack_trace+0x2e) [0x7fcd8f072bad] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #1 /usr/local/samba/lib/libsamba-util.so.0(+0x20933) [0x7fcd8f072933] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #2 /usr/local/samba/lib/libsamba-util.so.0(log_stack_trace+0) [0x7fcd8f072b7f] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #3 /usr/local/samba/lib/private/libtalloc.so.2(+0x29ef) [0x7fcd8fd8b9ef] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #4 /usr/local/samba/lib/private/libtalloc.so.2(+0x2a15) [0x7fcd8fd8ba15] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #5 /usr/local/samba/lib/private/libtalloc.so.2(+0x2a93) [0x7fcd8fd8ba93] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #6 /usr/local/samba/lib/private/libtalloc.so.2(+0x475f) [0x7fcd8fd8d75f] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #7 /usr/local/samba/lib/private/libtalloc.so.2(talloc_check_name+0x33) [0x7fcd8fd8d7f9] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #8 /usr/local/samba/lib/ldb/partition.so(+0x52d3) [0x7fcd740442d3] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #9 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #10 /usr/local/samba/lib/ldb/show_deleted.so(+0x1312) [0x7fcd71740312] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #11 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #12 /usr/local/samba/lib/ldb/extended_dn_out.so(+0x3dec) [0x7fcd770efdec] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #13 /usr/local/samba/lib/ldb/extended_dn_out.so(+0x3e2c) [0x7fcd770efe2c] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #14 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #15 /usr/local/samba/lib/ldb/operational.so(+0x6b52) [0x7fcd7465fb52] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #16 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #17 /usr/local/samba/lib/ldb/encrypted_secrets.so(+0x3e30) [0x7fcd774fce30] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #18 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #19 /usr/local/samba/lib/ldb/rdn_name.so(+0x2ab1) [0x7fcd735c9ab1] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #20 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #21 /usr/local/samba/lib/ldb/aclread.so(+0x3ae6) [0x7fcd7873dae6] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #22 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #23 /usr/local/samba/lib/ldb/acl.so(+0x8875) [0x7fcd78948875] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #24 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #25 /usr/local/samba/lib/ldb/descriptor.so(+0x47a2) [0x7fcd77d1e7a2] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #26 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #27 /usr/local/samba/lib/ldb/extended_dn_in.so(+0x2e17) [0x7fcd772f5e17] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #28 /usr/local/samba/lib/ldb/extended_dn_in.so(+0x33d6) [0x7fcd772f63d6] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #29 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #30 /usr/local/samba/lib/ldb/asq.so(+0x1a6f) [0x7fcd78333a6f] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #31 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #32 /usr/local/samba/lib/ldb/server_sort.so(+0x19eb) [0x7fcd719439eb] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #33 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #34 /usr/local/samba/lib/ldb/anr.so(+0x1ae2) [0x7fcd78537ae2] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #35 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #36 /usr/local/samba/lib/ldb/ranged_results.so(+0x1a88) [0x7fcd737cda88] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #37 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #38 /usr/local/samba/lib/ldb/vlv.so(+0x2db5) [0x7fcd7031adb5] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #39 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #40 /usr/local/samba/lib/ldb/paged_results.so(+0x295c) [0x7fcd7445695c] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #41 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #42 /usr/local/samba/lib/ldb/dirsync.so(+0x4f59) [0x7fcd77b15f59] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #43 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #44 /usr/local/samba/lib/ldb/lazy_commit.so(+0xd43) [0x7fcd766d1d43] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #45 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #46 /usr/local/samba/lib/ldb/dsdb_notification.so(+0x1521) [0x7fcd77701521] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #47 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #48 /usr/local/samba/lib/ldb/rootdse.so(+0x6c39) [0x7fcd72f8dc39] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #49 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #50 /usr/local/samba/lib/ldb/resolve_oids.so(+0x1ffc) [0x7fcd7319cffc] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #51 /usr/local/samba/lib/private/libldb.so.2(ldb_next_request+0x14f) [0x7fcd8fb58c09] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #52 /usr/local/samba/lib/private/libldb.so.2(+0xb643) [0x7fcd8fb55643] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #53 /usr/local/samba/lib/private/libldb.so.2(ldb_request+0x161) [0x7fcd8fb557ba] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #54 /usr/local/samba/lib/ldb/asq.so(+0x1995) [0x7fcd78333995] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #55 /usr/local/samba/lib/ldb/asq.so(+0x13a4) [0x7fcd783333a4] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #56 /usr/local/samba/lib/private/libldb.so.2(ldb_module_done+0x1fc) [0x7fcd8fb5a101] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #57 /usr/local/samba/lib/private/libldb.so.2(+0xb343) [0x7fcd8fb55343] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #58 /usr/local/samba/lib/private/libldb.so.2(ldb_module_done+0x1fc) [0x7fcd8fb5a101] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #59 /usr/local/samba/lib/ldb/extended_dn_in.so(+0x1a3a) [0x7fcd772f4a3a] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #60 /usr/local/samba/lib/private/libldb.so.2(ldb_module_done+0x1fc) [0x7fcd8fb5a101] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #61 /usr/local/samba/lib/ldb/acl.so(+0x82cb) [0x7fcd789482cb] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #62 /usr/local/samba/lib/private/libldb.so.2(ldb_module_done+0x1fc) [0x7fcd8fb5a101] 2020-01-14T17:20:13+02:00 dc04 samba[10286]: #63 /usr/local/samba/lib/ldb/aclread.so(+0x3481) [0x7fcd7873d481] 2020-01-14T17:20:13+02:00 dc04 samba[23314]: [2020/01/14 17:20:13.580079, 0] ../../source4/smbd/process_prefork.c:519(prefork_child_pipe_handler) 2020-01-14T17:20:13+02:00 dc04 samba[23314]: prefork_child_pipe_handler: Parent 23314, Child 10286 terminated with signal 6 2020-01-14T17:20:13+02:00 dc04 samba[23314]: [2020/01/14 17:20:13.580406, 0] ../../source4/smbd/process_prefork.c:443(prefork_restart) 2020-01-14T17:20:13+02:00 dc04 samba[23314]: prefork_restart: Restarting [ldap] pre-fork worker in (120) seconds Samba was built from git only with “./configure --with-sendfile-support” option. Initially I was using bind9 for DNS but moved to internal samba DNS because I though it was an error generated by bind9 but the errors kept showing. root@dc04:~# cat /usr/local/samba/etc/smb.conf # Global parameters [global] bind interfaces only = Yes interfaces = lo ens19 netbios name = DC04 realm = XXXX-XXX.LOCAL server role = active directory domain controller server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbindd, ntp_signd, kcc, dns workgroup = XXXX-XXX idmap_ldb:use rfc2307 = yes ldap server require strong auth = no dns forwarder = 10.253.50.5 [sysvol] path = /usr/local/samba/var/locks/sysvol read only = No [netlogon] path = /usr/local/samba/var/locks/sysvol/xxxx-xxx.local/scripts read only = No root@dc04:~# root@dc04:~# cat /tmp/samba-debug-info.txt Collected config --- 2020-01-14-17:19 ----------- Hostname: dc04 DNS Domain: xxxx-xxx.local FQDN: dc04.xxxx-xxx.local ipaddress: 188.173.1.79 10.253.50.50 ----------- Kerberos SRV _kerberos._tcp.xxxx-xxx.local record verified ok, sample output: Server: 10.253.50.50 Address: 10.253.50.50#53 _kerberos._tcp.xxxx-xxx.local service = 0 100 88 dc04.xxxx-xxx.local. _kerberos._tcp.xxxx-xxx.local service = 0 100 88 dc03.xxxx-xxx.local. _kerberos._tcp.xxxx-xxx.local service = 0 100 88 dc05.xxxx-xxx.local. Samba is running as an AD DC ----------- Checking file: /etc/os-release NAME="Ubuntu" VERSION="18.04.3 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.3 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic ----------- This computer is running Ubuntu 18.04.3 LTS x86_64 ----------- running command : ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo 2: ens18: mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether ba:f3:97:bb:b9:8a brd ff:ff:ff:ff:ff:ff inet xxx.xxx.xxx.xxx/25 brd 188.173.1.127 scope global ens18 3: ens19: mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether ae:54:fe:ed:c9:07 brd ff:ff:ff:ff:ff:ff inet 10.253.50.50/25 brd 10.253.50.127 scope global ens19 ----------- Checking file: /etc/hosts 127.0.0.1 localhost 10.253.50.50 dc04.xxxx-xxx.local dc04 # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ----------- Checking file: /etc/resolv.conf nameserver 10.253.50.50 search xxxx-xxx.local ----------- Checking file: /etc/krb5.conf [libdefaults] dns_lookup_realm = false dns_lookup_kdc = true default_realm = xxxx-xxx.LOCAL ----------- Checking file: /etc/nsswitch.conf # /etc/nsswitch.conf # # Example configuration of GNU Name Service Switch functionality. # If you have the `glibc-doc-reference' and `info' packages installed, try: # `info libc "Name Service Switch"' for information about this file. passwd: compat systemd group: compat systemd shadow: compat gshadow: files hosts: files dns networks: files protocols: db files services: db files ethers: db files rpc: db files netgroup: nis ----------- Checking file: /usr/local/samba/etc/smb.conf # Global parameters [global] bind interfaces only = Yes interfaces = lo ens19 netbios name = DC04 realm = xxxx-xxx.LOCAL server role = active directory domain controller server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbindd, ntp_signd, kcc, dns workgroup = xxxx-xxx idmap_ldb:use rfc2307 = yes ldap server require strong auth = no dns forwarder = 10.253.50.5 [sysvol] path = /usr/local/samba/var/locks/sysvol read only = No [netlogon] path = /usr/local/samba/var/locks/sysvol/xxxx-xxx.local/scripts read only = No ----------- Detected bind DLZ enabled.. Checking file: /etc/bind/named.conf // This is the primary configuration file for the BIND DNS server named. // // Please read /usr/share/doc/bind9/README.Debian.gz for information on the // structure of BIND configuration files in Debian, *BEFORE* you customize // this configuration file. // // If you are just adding zones, please do that in /etc/bind/named.conf.local include "/etc/bind/named.conf.options"; include "/etc/bind/named.conf.local"; include "/etc/bind/named.conf.default-zones"; include "/usr/local/samba/bind-dns/named.conf"; ----------- Checking file: /etc/bind/named.conf.options options { directory "/var/cache/bind"; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { none; }; listen-on port 53 { 127.0.0.1; any; }; tkey-gssapi-keytab "/usr/local/samba/private/dns.keytab"; minimal-responses yes; allow-recursion { any; }; allow-query { any; }; dnssec-enable yes; dnssec-validation yes; forward only; forwarders { 10.253.50.5; }; }; ----------- Checking file: /etc/bind/named.conf.local // // Do any local configuration here // // Consider adding the 1918 zones here, if they are not used in your // organization //include "/etc/bind/zones.rfc1918"; ----------- Checking file: /etc/bind/named.conf.default-zones // prime the server with knowledge of the root servers zone "." { type hint; file "/etc/bind/db.root"; }; // be authoritative for the localhost forward and reverse zones, and for // broadcast zones as per RFC 1912 zone "localhost" { type master; file "/etc/bind/db.local"; }; zone "127.in-addr.arpa" { type master; file "/etc/bind/db.127"; }; zone "0.in-addr.arpa" { type master; file "/etc/bind/db.0"; }; zone "255.in-addr.arpa" { type master; file "/etc/bind/db.255"; }; ----------- Samba DNS zone list: 2 zone(s) found pszZoneName : xxxx-xxx.local Flags : DNS_RPC_ZONE_DSINTEGRATED DNS_RPC_ZONE_UPDATE_SECURE ZoneType : DNS_ZONE_TYPE_PRIMARY Version : 50 dwDpFlags : DNS_DP_AUTOCREATED DNS_DP_DOMAIN_DEFAULT DNS_DP_ENLISTED pszDpFqdn : DomainDnsZones.xxxx-xxx.local pszZoneName : _msdcs.xxxx-xxx.local Flags : DNS_RPC_ZONE_DSINTEGRATED DNS_RPC_ZONE_UPDATE_SECURE ZoneType : DNS_ZONE_TYPE_PRIMARY Version : 50 dwDpFlags : DNS_DP_AUTOCREATED DNS_DP_FOREST_DEFAULT DNS_DP_ENLISTED pszDpFqdn : ForestDnsZones.xxxx-xxx.local Samba DNS zone list Automated check : zone : xxxx-xxx.local ok, no Bind flat-files found ----------- zone : _msdcs.xxxx-xxx.local ok, no Bind flat-files found ----------- Installed packages: ii acl 2.2.52-3build1 amd64 Access control list utilities ii attr 1:2.4.47-2build1 amd64 Utilities for manipulating filesystem extended attributes ii bind9 1:9.11.3+dfsg-1ubuntu1.11 amd64 Internet Domain Name Server ii bind9-host 1:9.11.3+dfsg-1ubuntu1.11 amd64 DNS lookup utility (deprecated) ii bind9utils 1:9.11.3+dfsg-1ubuntu1.11 amd64 Utilities for BIND ii krb5-config 2.6 all Configuration files for Kerberos Version 5 ii krb5-locales 1.16-2ubuntu0.1 all internationalization support for MIT Kerberos ii krb5-user 1.16-2ubuntu0.1 amd64 basic programs to authenticate using MIT Kerberos ii libacl1:amd64 2.2.52-3build1 amd64 Access control list shared library ii libacl1-dev 2.2.52-3build1 amd64 Access control list static libraries and headers ii libattr1:amd64 1:2.4.47-2build1 amd64 Extended attribute shared library ii libattr1-dev:amd64 1:2.4.47-2build1 amd64 Extended attribute static libraries and headers ii libbind9-160:amd64 1:9.11.3+dfsg-1ubuntu1.11 amd64 BIND9 Shared Library used by BIND ii libgssapi-krb5-2:amd64 1.16-2ubuntu0.1 amd64 MIT Kerberos runtime libraries - krb5 GSS-API Mechanism ii libkrb5-26-heimdal:amd64 7.5.0+dfsg-1 amd64 Heimdal Kerberos - libraries ii libkrb5-3:amd64 1.16-2ubuntu0.1 amd64 MIT Kerberos runtime libraries ii libkrb5support0:amd64 1.16-2ubuntu0.1 amd64 MIT Kerberos runtime libraries - Support library ii python3-attr 17.4.0-2 all Attributes without boilerplate (Python 3) -----------