[Freeipa-devel] [PATCH 0257] Fix race condition during zone loading

Tomas Hozza thozza at redhat.com
Wed May 28 11:26:00 UTC 2014


On 05/27/2014 03:59 PM, Petr Spacek wrote:
> On 27.5.2014 15:54, Petr Spacek wrote:
>> Fix race condition during zone loading.
>>
>> DNS zone has to be added to DNS view before dns_zone_load() is called.
>> It is necessary to prevent dns_zone_load() from racing with
>> dns_zone_setview().
>>
>> This race condition sometimes prevents zone from being signed.
>> Now the unsigned zone is visible until signing process is complete. This
>> mimics BIND behavior for in-line signed zones.
>>
>> https://fedorahosted.org/bind-dyndb-ldap/ticket/56
> 
> And here is the patch...
> 

Hi.

When I use bind-dyndb-ldap plugin with this patch, named
does not start due to:

rbt.c:1379: REQUIRE(name->buffer != ((void *)0)) failed, back trace

(gdb) bt
#0  0x00007f3963924c39 in raise () from /lib64/libc.so.6
#1  0x00007f3963926348 in abort () from /lib64/libc.so.6
#2  0x00007f3966979aee in assertion_failed ()
#3  0x00007f3964b6917a in isc_assertion_failed () from /lib64/libisc.so.95
#4  0x00007f39661ca9da in dns_rbt_fullnamefromnode () from
/lib64/libdns.so.100
#5  0x00007f396011824b in rbt_iter_getnodename (iter=<optimized out>,
nodename=nodename at entry=0x7f39625f8bf0) at rbt_helper.c:46
#6  0x00007f396011839b in rbt_iter_next
(iterp=iterp at entry=0x7f39625f8b90,
nodename=nodename at entry=0x7f39625f8bf0) at rbt_helper.c:144
#7  0x00007f3960112d32 in activate_zones
(task=task at entry=0x7f39668f5790, inst=0x7f39668e4160) at ldap_helper.c:1164
#8  0x00007f396011a20d in barrier_decrement (task=0x7f39668f5790,
event=0x7f396005b010) at syncrepl.c:138
#9  0x00007f3964b8b836 in run () from /lib64/libisc.so.95
#10 0x00007f396473ff33 in start_thread () from /lib64/libpthread.so.0
#11 0x00007f39639e3ded in clone () from /lib64/libc.so.6


It looks like you should use INIT_BUFFERED_NAME(name); used in the
original code instead of dns_name_init(&name, NULL). The macro
initializes the buffer in "name", which is missing in the new code.


Regards,

Tomas




More information about the Freeipa-devel mailing list