Bug 805814

Summary: named crashes when connection with LDAP server cannot be established.
Product: Red Hat Enterprise Linux 6 Reporter: Gowrishankar Rajaiyan <grajaiya>
Component: bind-dyndb-ldapAssignee: Adam Tkac <atkac>
Status: CLOSED CURRENTRELEASE QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: jgalipea, mkosek, ovasik, pspacek, rcritten
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-26 15:05:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
bt none

Description Gowrishankar Rajaiyan 2012-03-22 09:13:50 UTC
Description of problem:
This was detected while testing BZ 802375.

Version-Release number of selected component (if applicable):
ipa-server-2.2.0-5.el6.x86_64
bind-9.8.2-0.6.rc1.el6.x86_64
bind-dyndb-ldap-1.1.0-0.3.b1.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install ipa-server with --setup-dns
2. Set uri parameter in /etc/named.conf to nonsense (ex. ldap://127.0.0.1:111)
(Example situation: Admin made mistake in LDAP server URI or server network/LDAP server is not functional.)
3. run BIND (service named start)
4. try to stop BIND (service named stop)
  
Actual results:
named crash detected.

Expected results:
named should not crash.

Additional info:
Relevant named.conf:
dynamic-db "ipa" {
        library "ldap.so";
        arg "uri ldapi://127.0.0.1:111";
        arg "base cn=dns, dc=lab,dc=eng,dc=pnq,dc=redhat,dc=com";
        arg "fake_mname primenova.lab.eng.pnq.redhat.com.";
        arg "auth_method sasl";
        arg "sasl_mech GSSAPI";
        arg "sasl_user DNS/primenova.lab.eng.pnq.redhat.com";
        arg "zone_refresh 30";
};

/var/log/messages:
Mar 22 03:27:45 primenova named[17708]: LDAP error: Can't contact LDAP server
Mar 22 03:27:45 primenova named[17708]: bind to LDAP server failed: Can't contact LDAP server
Mar 22 03:27:46 primenova named[17708]: received control channel command 'stop'
Mar 22 03:27:46 primenova named[17708]: shutting down: flushing changes
Mar 22 03:27:46 primenova named[17708]: stopping command channel on 127.0.0.1#953
Mar 22 03:27:46 primenova named[17708]: stopping command channel on ::1#953
Mar 22 03:27:46 primenova named[17708]: ldap_helper.c:507: fatal error:
Mar 22 03:27:46 primenova named[17708]: RUNTIME_CHECK(result == 0 || result == (((1) << 16) + 24)) failed
Mar 22 03:27:46 primenova named[17708]: exiting (due to fatal error in library)
Mar 22 03:27:46 primenova abrt[17731]: /var/named/core.17708 fd(-1) is not a regular file with link count 1: Permission denied
Mar 22 03:27:47 primenova abrtd: Directory 'ccpp-2012-03-22-03:27:46-17708' creation detected
Mar 22 03:27:47 primenova abrt[17731]: Saved core dump of pid 17708 (/usr/sbin/named) to /var/spool/abrt/ccpp-2012-03-22-03:27:46-17708 (53456896 bytes)

Comment 1 Gowrishankar Rajaiyan 2012-03-22 09:19:47 UTC
Created attachment 571942 [details]
bt

Comment 5 Adam Tkac 2012-03-23 11:45:52 UTC
The patch has been just pushed to upstream:

http://git.fedorahosted.org/git/?p=bind-dyndb-ldap.git;a=commit;h=f35661ac8fd7fe3a778ad95fc5135bf332230453

Comment 8 Adam Tkac 2012-03-26 15:05:15 UTC
Fixed in bind-dyndb-ldap-1.1.0-0.5.b1.el6