<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
revised patch (v2) attached:<br>
changed log level<br>
fixed order of statements in freeing host list<br>
<br>
<div class="moz-cite-prefix">On 06/10/2016 05:56 PM, Ludwig Krispenz
wrote:<br>
</div>
<blockquote cite="mid:575AE325.6030605@redhat.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<br>
<div class="moz-cite-prefix">On 06/10/2016 05:41 PM, thierry
bordaz wrote:<br>
</div>
<blockquote cite="mid:575ADFA8.5010306@redhat.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<br>
<br>
<div class="moz-cite-prefix">On 06/10/2016 05:23 PM, Ludwig
Krispenz wrote:<br>
</div>
<blockquote cite="mid:575ADB5A.6060900@redhat.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<br>
<div class="moz-cite-prefix">On 06/10/2016 04:44 PM, thierry
bordaz wrote:<br>
</div>
<blockquote cite="mid:575AD239.2080101@redhat.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hi Ludwig,<br>
<br>
I agree with you there is no path to add a host with an
empty hostname.<br>
You fix looks valid but I would prefer a log in FATAL rather
in PLUGIN.<br>
</blockquote>
yes, of course that was my intention, copy paste :-)<br>
<blockquote cite="mid:575AD239.2080101@redhat.com" type="cite">
<br>
Also I wonder if a reason of empty hostname could be a
slapi_ch_free on it but with the host remaining in the list.<br>
Looking at <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="https://git.fedorahosted.org/cgit/freeipa.git/tree/daemons/ipa-slapi-plugins/topology/topology_cfg.c#n852">https://git.fedorahosted.org/cgit/freeipa.git/tree/daemons/ipa-slapi-plugins/topology/topology_cfg.c#n852</a>,<br>
I wonder if the two lines 852 and 853 could lead to this
situation.<br>
</blockquote>
but this frees the complete replica structure tconf and in the
caller tconf is set to null, so should never be used again.<br>
</blockquote>
<br>
Yes you are right, it can not conduct to empty hostname into
tconf.<br>
However I think it can leak because host will be set to 0 at the
end of the first iteration. <br>
</blockquote>
yes, line 852 and 853 should be switched<br>
<blockquote cite="mid:575ADFA8.5010306@redhat.com" type="cite"> <br>
An other possibility is that in <br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://git.fedorahosted.org/cgit/freeipa.git/tree/daemons/ipa-slapi-plugins/topology/topology_util.c#n1449">https://git.fedorahosted.org/cgit/freeipa.git/tree/daemons/ipa-slapi-plugins/topology/topology_util.c#n1449</a><code><span
class="hl kwd"><br>
ipa_topo_util_init_hosts, 'cn' has an empty value. newhost
is not null but empty, so we may create an empty hostname.<br>
</span><span class="hl opt"></span></code><br>
<blockquote cite="mid:575ADB5A.6060900@redhat.com" type="cite">
<blockquote cite="mid:575AD239.2080101@redhat.com" type="cite">
<br>
thanks<br>
thierry<br>
<br>
<br>
<div class="moz-cite-prefix">On 06/10/2016 12:36 PM, Ludwig
Krispenz wrote:<br>
</div>
<blockquote cite="mid:575A9819.3030803@redhat.com"
type="cite">Hi, <br>
the attached patch will prevent the crash reported in
ticket #5928. <br>
<br>
So far I do not understand how this situation can occur,
there is no reproducer yet. I do not really like this fix
as it hides a probable corrupted data structure and would
prefer to find the root cause. <br>
<br>
But please review it, so we can commit it if there is no
progress on the root cause. <br>
<br>
Ludwig <br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Red Hat GmbH, <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.de.redhat.com/">http://www.de.redhat.com/</a>, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Michael Cunningham, Michael O'Neill, Eric Shander</pre>
</blockquote>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Red Hat GmbH, <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.de.redhat.com/">http://www.de.redhat.com/</a>, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Michael Cunningham, Michael O'Neill, Eric Shander</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Red Hat GmbH, <a class="moz-txt-link-freetext" href="http://www.de.redhat.com/">http://www.de.redhat.com/</a>, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Michael Cunningham, Michael O'Neill, Eric Shander</pre>
</body>
</html>