Bug 767496 - assertion failure when using persistent search
Summary: assertion failure when using persistent search
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: bind-dyndb-ldap
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Adam Tkac
QA Contact: Namita Soman
URL: https://fedorahosted.org/bind-dyndb-l...
Whiteboard:
Depends On:
Blocks: 733711 767486 827414
TreeView+ depends on / blocked
 
Reported: 2011-12-14 08:28 UTC by Adam Tkac
Modified: 2015-05-20 15:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When persistent search was in use, the plugin sometimes terminated unexpectedly due to an assertion failure when the "rndc reload" command was issued and the LDAP server was not reachable. With this update, the code has been improved so that connection failures and reconnects are now handled more robustly. As a result, the plugin no longer crashes in the scenario described.
Clone Of:
Environment:
Last Closed: 2013-02-21 08:57:39 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0359 normal SHIPPED_LIVE bind-dyndb-ldap bug fix and enhancement update 2013-02-20 20:53:11 UTC

Description Adam Tkac 2011-12-14 08:28:06 UTC
Description of problem:
When using persistent search feature, the plugin can abort due to assertion failure.

Version-Release number of selected component (if applicable):
the latest upstream revision of psearch patches (will be part of RHEL 6.3)

Steps to Reproduce:
1. check https://fedorahosted.org/bind-dyndb-ldap/ticket/38
  
Actual results:
The named process ends with

ldap_helper.c:484: REQUIRE(pthread_kill(ldap_inst->watcher, 15) == 0)
exiting (due to assertion failure)
Aborted

Expected results:
successful reload

Comment 2 Jenny Severance 2011-12-14 13:29:23 UTC
Can you please add steps to reproduce this issue? Thanks

Comment 3 Adam Tkac 2011-12-14 14:03:10 UTC
(In reply to comment #2)
> Can you please add steps to reproduce this issue? Thanks

Of course. Details are written in upstream ticket:

1) IPA started
2) /etc/named.conf:

Add/modify those parameters in named.conf:

dynamic-db "ipa" {
        ...
        arg "uri ldap://127.0.0.1";
        arg "psearch yes";
        ...
};

3) service named stop
4) iptables-save > /tmp/iptables.backup; iptables -I INPUT -p tcp --dport 389 -j REJECT; iptables -I INPUT -p tcp --dport 636 -j REJECT
5) service named start
6) rndc reload

And now named crashes.

Comment 4 Jenny Severance 2011-12-14 14:45:16 UTC
Thanks Adam!

Comment 7 Petr Spacek 2012-03-23 14:57:39 UTC
Persistent search feature postponed to 6.4, as discussed with Dmitri Pal and Jenny Galipeau.

Comment 8 Adam Tkac 2012-04-23 08:46:32 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When persistent search was in use, the plugin sometimes terminated unexpectedly due to an assertion failure when the "rndc reload" command was issued and the LDAP server was not reachable. With this update, the code has been improved so that connection failures and reconnects are now handled more robustly. As a result, the plugin no longer crashes in the scenario described.

Comment 12 Namita Soman 2012-12-18 04:48:48 UTC
Verified using: 

Test output:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: 767496 assertion failure when using persistent search
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: File '/etc/named.conf' should contain 'psearch yes'
version: 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6
CPUs found: 2
worker threads: 2
number of zones: 22
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
named (pid  23140) is running...
:: [   PASS   ] :: get named status
:: [   PASS   ] :: make a copy of named.conf
Stopping named: .[  OK  ]
:: [   PASS   ] :: stop named
:: [   PASS   ] :: save iptables
:: [   PASS   ] :: add rule for port 389
:: [   PASS   ] :: add rule for port 636
Starting named: [  OK  ]
:: [   PASS   ] :: start named
:: [   PASS   ] :: set up rndc.conf
:: [   PASS   ] :: add rndc key to named.conf
:: [22:12:33] ::  end1 - 63
:: [22:12:34] ::  end - 62
:: [22:12:34] ::  start - 54
:: [22:12:34] ::  Executing: sed "54,62 s/^#//g" /etc/named.conf
:: [   PASS   ] :: updated named.conf with rndc key
Stopping named: .[  OK  ]
Starting named: [  OK  ]
:: [   PASS   ] :: restart named
WARNING: key file (/etc/rndc.key) exists, but using default configuration file (/etc/rndc.conf)
server reload successful
:: [   PASS   ] ::  rndc reload was successful
Stopping named: .[  OK  ]
Starting named: [  OK  ]
:: [   PASS   ] :: restart named
WARNING: key file (/etc/rndc.key) exists, but using default configuration file (/etc/rndc.conf)
server reload successful
:: [   PASS   ] ::  rndc reload was successful
Stopping named: .[  OK  ]
:: [   PASS   ] :: stop named
:: [   PASS   ] :: restore iptables
:: [   PASS   ] :: Running 'cp -f /root/named.conf /etc/'
:: [   PASS   ] :: Running 'chgrp named /etc/named.conf'
Stopping named: [  OK  ]
Starting named: [  OK  ]
:: [   PASS   ] :: Running 'service named restart'

Comment 14 errata-xmlrpc 2013-02-21 08:57:39 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.

http://rhn.redhat.com/errata/RHBA-2013-0359.html


Note You need to log in before you can comment on or make changes to this bug.