<div dir="ltr">I have a fix in the works for this (with more cleanups to locks xlator)<div><br></div><div style>Avati</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 13, 2013 at 2:14 AM, Raghavendra Bhat <span dir="ltr">&lt;<a href="mailto:rabhat@redhat.com" target="_blank">rabhat@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
There seems to be a bug in the ltable cleanup when disconnect is received in 3.5 and master. Its easy to reproduce. Just create a replicate volume. Start running dbench on the mount point, and do graph changes. The brick processes will crash while doing the ltable cleanup.<br>

<br>
Pranith and me looked at the code and found the below issues.<br>
<br>
static void<br>
ltable_delete_locks (struct _lock_table *ltable)<br>
{<br>
        struct _locker *locker = NULL;<br>
        struct _locker *tmp    = NULL;<br>
<br>
        list_for_each_entry_safe (locker, tmp, &amp;ltable-&gt;inodelk_lockers, lockers) {<br>
            if (locker-&gt;fd)<br>
                        pl_del_locker (ltable, locker-&gt;volume, &amp;locker-&gt;loc,<br>
                                       locker-&gt;fd, &amp;locker-&gt;owner,<br>
                                       GF_FOP_INODELK);<br>
                GF_FREE (locker-&gt;volume);<br>
                GF_FREE (locker);<br>
        }<br>
<br>
        list_for_each_entry_safe (locker, tmp, &amp;ltable-&gt;entrylk_lockers, lockers) {<br>
                if (locker-&gt;fd)<br>
                        pl_del_locker (ltable, locker-&gt;volume, &amp;locker-&gt;loc,<br>
                                       locker-&gt;fd, &amp;locker-&gt;owner,<br>
                                       GF_FOP_ENTRYLK);<br>
                GF_FREE (locker-&gt;volume);<br>
                GF_FREE (locker);<br>
        }<br>
        GF_FREE (ltable);<br>
}<br>
<br>
In above function, the list of indelks and entrylks is traversed and pl_del_locker is called for each lock with fd. But in pl_del_locker, we are collecting all the locks with same volume and owner sent as arguments and deleting them at once (that too without unlocking them). But for locks without fd, we are directly freeing up the objects without deleting them from the list (and without holding the ltable lock).<br>

<br>
This is the bug logged for the issue.<br>
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=1042764" target="_blank">https://bugzilla.redhat.com/<u></u>show_bug.cgi?id=1042764</a><br>
<br>
Regards,<br>
Raghavendra Bhat<br>
<br>
______________________________<u></u>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@nongnu.org" target="_blank">Gluster-devel@nongnu.org</a><br>
<a href="https://lists.nongnu.org/mailman/listinfo/gluster-devel" target="_blank">https://lists.nongnu.org/<u></u>mailman/listinfo/gluster-devel</a><br>
</blockquote></div><br></div>