Bug 1142152

Summary: bind hangs after reload/GSSAPI Error: The referenced context has expired (Success)
Product: Red Hat Enterprise Linux 6 Reporter: Arpit Tolani <atolani>
Component: bindAssignee: Tomáš Hozza <thozza>
Status: CLOSED ERRATA QA Contact: Tereza Cerna <tcerna>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.6CC: dpal, emajorsi, psklenar, pspacek, qe-baseos-daemons, tcerna, thozza
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: bind-9.8.2-0.32.rc1.el6 Doc Type: Bug Fix
Doc Text:
BIND incorrectly handled errors returned by dynamic databases (from dyndbAPI). Consequently, BIND could enter a deadlock situation on shutdown under certain circumstances. The dyndb API has been fixed not to cause a deadlock during BIND shutdown after the dynamic database returns an error, and BIND now shuts down normally in the described situation.
Story Points: ---
Clone Of: 1142150 Environment:
Last Closed: 2015-07-22 05:50:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1142150, 1142176    
Bug Blocks: 1153398, 1159820    
Attachments:
Description Flags
SRPM with bind-dyndb-ldap plugin for testing of this bug none

Description Arpit Tolani 2014-09-16 09:12:48 UTC
+++ This bug was initially created as a clone of Bug #1142150 +++

Description of problem:
bind hangs after reload/GSSAPI Error: The referenced context has expired (Success)

 After a while (about once in a week) the bind daemon is in the state hang/zombie. The bind daemon seems to be present and accept requests from the clients, but is not answering any dns requests. Only killing the process with kill -9 can stop the daemon. After starting bind again, it works fine, until the problem occurs again.

Version-Release number of selected component (if applicable):
bind-9.9.4-14.el7.x86_64

How reproducible:
Everytime Logrotates runs. 

Steps to Reproduce:
1. Configure IPA server with DNS
2. Wait till logrotate starts rotating. 

Additional info:
It is related to https://fedorahosted.org/bind-dyndb-ldap/ticket/131

Comment 1 Tomáš Hozza 2014-09-16 09:51:30 UTC
It is too late for 6.6. Moving to 6.7.

Comment 2 Petr Spacek 2014-09-16 17:29:37 UTC
There is nothing private in this bug. Publicizing.

Comment 3 Tomáš Hozza 2014-09-17 18:31:57 UTC
patch added to Bug #1142150

reproducer added in Bug #1142150 comment #7

Comment 5 Tomáš Hozza 2014-12-09 08:35:52 UTC
Created attachment 966145 [details]
SRPM with bind-dyndb-ldap plugin for testing of this bug

Comment 6 Tomáš Hozza 2014-12-09 09:35:01 UTC
Steps to reproduce for QA:

1. install bind
2. build the attachment 966145 [details] for your architecture
3. install the bind-dyndb-ldap package built from attachment 966145 [details]
4. Add the following section to /etc/named.conf:

dynamic-db "my_db_name" {
	library "ldap.so";
	arg "uri ldap://ldap.example.com";
	arg "base cn=dns, dc=example, dc=com";
	arg "auth_method none";
};

5. export KRB5_KTNAME=/etc/named.keytab
6. run 'named -u named -fg' as root
7. named will start
8. run 'rndc reload' from another console and watch the error on output:

[root@localhost ~]# rndc reload
rndc: 'reload' failed: out of memory

9. press CTRL+C in the terminal you've started named or run 'rndc halt'


Actual result in 9.:
Named will freeze and the only way to stop it is to kill -9 it.

Expected result in 9. (and with attached patch):
Named will exit just normally.

Comment 9 Tereza Cerna 2015-03-04 10:36:08 UTC
==================================
Verified in version:
    bind-9.8.2-0.36.rc1.el6.x86_64
PASSED
==================================

=== 1. console ===
# named -u named -fg
...
04-Mar-2015 11:25:15.231 running

=== 2. console ===
# rndc reload
server reload successful
# rndc halt
#

=== 1. console ===
04-Mar-2015 11:27:05.015 exiting
# echo $?
0

Named exited normally.

======================================
Reproduced in version:
    bind-9.8.2-0.30.rc1.el6_6.1.x86_64
FAIL
======================================

=== 1. console ===
# named -u named -fg
...
04-Mar-2015 11:14:31.432 running

=== 2. console ===
# rndc reload
rndc: 'reload' failed: out of memory
# rndc halt
#

=== 1. console ===

Named freezed.

Comment 11 errata-xmlrpc 2015-07-22 05:50:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1250.html