Univention Bugzilla – Bug 11295
core File unter /var/cache/bind
Last modified: 2012-12-12 21:07:46 CET
Sobald ein "/etc/init.d/univention-bind (re)start" ausgeführt wird, liegt unter /var/cache/bind ein core-File vom Bind-Prozess. Der Dienst scheint dadurch nicht beeinträchtigt zu sein.
Beim Löschen einer Reverse-Zone wird auch ein core-file unter /var/cache/bind erzeugt. Dieses Verhalten wurde bei einem Kunden festgestellt und von mir reproduziert. Ticket Nr.: 2008071710000155
auch berichtet an Ticket#: 2009091410000404
*** Bug 18964 has been marked as a duplicate of this bug. ***
Das Problem liegt im directory listener. Es tritt auf wenn der univention-bind-proxy synchronisiert wird. e.g. univention-directory-listener-ctrl resync bind Es ist insoweit problematisch, als das zonen für die es einen Falschen eintrag gibt nicht mehr synchronisiert werden. Das löschen von /var/cache/bind/* und der neustart beheben das problem, bis zur nächsten DNS Aktualisierung.
Das Problem bleibt in UCS 3 MS 2 bestehen. Die Effekte lassen sich mit folgendem befehl beheben: rndc -p 953 retransfer <zone>
UCS 3.1 will be the next release.
Created attachment 4638 [details] gdb backtrace root@10:~/src# ucr search dns/backend dns/backend: ldap root@10:~/src# /etc/init.d/bind9 start Starting bind9 daemon:. done. root@10:~/src# ls -l /var/cache/bind/corels: Zugriff auf /var/cache/bind/core nicht möglich: Datei oder Verzeichnis nicht gefunden root@10:~/src# /etc/init.d/bind9 stop Stopping bind9 daemon: . done. root@10:~/src# ls -l /var/cache/bind/core -rw------- 1 bind bind 31641600 31. Aug 12:36 /var/cache/bind/core
gdb ./bin/named/.libs/named (gdb) set args -p 7777 -u bind -f (gdb) run ^C (gdb) signal SIGTERM Continuing with signal SIGTERM. [Thread 0xb75d8b70 (LWP 10229) exited] [Thread 0xb6dd7b70 (LWP 10230) exited] *** glibc detected *** /root/bind9-9.8.0.P4/bin/named/.libs/named: munmap_chunk(): invalid pointer: 0xb75dd170 *** ... (gdb) up 6 #6 0x080bfc4a in ldapdb_getconn (data=0x0) at ldapdb.c:137 137 free(conndata->index); (gdb) print conndata $1 = (struct ldapdb_entry *) 0x80f68d8 (gdb) print *conndata $2 = {index = 0xb75dd170, size = 14, data = 0x80f76a0, next = 0x0} bin/named/ldapdb.c:529 data->hostport = isc_mem_strdup(ns_g_mctx, argv[0] + strlen("ldap://")); bin/named/ldapdb.c:188 conndata->index = data->hostport; bin/named/ldapdb.c:133 free(threaddata->index); --- bin/named/ldapdb.c.orig 2012-09-04 16:06:53.508436187 +0200 +++ bin/named/ldapdb.c 2012-09-04 16:06:45.260486007 +0200 @@ -133,7 +133,7 @@ ldapdb_getconn(struct ldapdb_data *data) free(threaddata->index); while (threaddata->data != NULL) { conndata = threaddata->data; - free(conndata->index); + isc_mem_free(ns_g_mctx, conndata->index); if (conndata->data != NULL) ldap_unbind_ext((LDAP *)conndata->data, NULL, NULL); //ldap_unbind((LDAP *)conndata->data); @@ -179,7 +179,7 @@ ldapdb_getconn(struct ldapdb_data *data) conndata = malloc(sizeof(*conndata)); if (conndata == NULL) return (NULL); - conndata->index = data->hostport; + conndata->index = isc_mem_strdup(ns_g_mctx, data->hostport); conndata->size = strlen(data->hostport); conndata->data = NULL; ldapdb_insert((struct ldapdb_entry **)&threaddata->data,
(In reply to comment #8) ... > - free(conndata->index); > + isc_mem_free(ns_g_mctx, conndata->index); ... > - conndata->index = data->hostport; > + conndata->index = isc_mem_strdup(ns_g_mctx, data->hostport); ... <http://bind9-ldap.bayour.com/> 2011-09-22 Fix for multithreaded ('Double Free') environments. Thanx for Yoann Courbet for reporting this bug to me and showing me where a patch for it could be found. <https://github.com/FransUrbo/bind9-ldap/blob/master/ldapdb.c#L195>
Patch aus http://www.pynix.org/webcvs/index.cgi/AppKit/common/net/bind/patches/003-fix-sdb-ldap-double-free.patch?revision=1.1&view=markup&pathrev=ak37 wurde übernommen. Damit konnte der Absturz nicht mehr reproduziert werden.
OK: ChangeLog OK: svn10954 ist identisch mit dem Upstream-Commit <https://github.com/FransUrbo/bind9-ldap/commit/1182567281f34a60f4c390d5c7f9c1042019e02a> OK: /etc/init.d/bind9 restart OK: bind9_1:9.8.0.P4-1.97.201207021548
UCS 3.1-0 has been released: http://forum.univention.de/viewtopic.php?f=54&t=2125 If this error occurs again, please use "Clone This Bug".