[Bugs] [Bug 1219026] glusterd crashes when brick option validation fails

bugzilla at redhat.com bugzilla at redhat.com
Sat May 9 21:28:02 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1219026



--- Comment #3 from Anand Avati <aavati at redhat.com> ---
COMMIT: http://review.gluster.org/10723 committed in release-3.7 by Niels de
Vos (ndevos at redhat.com) 
------
commit a3af10a801a40fe990ee5db63c6dd6cb97713e4c
Author: Jeff Darcy <jdarcy at redhat.com>
Date:   Tue Apr 28 04:40:00 2015 -0400

    core: use reference counting for mem_acct structures

    When freeing memory, our memory-accounting code expects to be able to
    dereference from the (previously) allocated block to its owning
    translator.  However, as we have already found once in option
    validation and twice in logging, that translator might itself have
    been freed and the dereference attempt causes on of our daemons to
    crash with SIGSEGV.  This patch attempts to fix that as follows:

     * We no longer embed a struct mem_acct directly in a struct xlator,
       but instead allocate it separately.

     * Allocated memory blocks now contain a pointer to the mem_acct
       instead of the xlator.

     * The mem_acct structure contains a reference count, manipulated in
       both the normal and translator allocate/free code using atomic
       increments and decrements.

     * Because it's now a separate structure, we can defer freeing the
       mem_acct until its reference count reaches zero (either way).

     * Some unit tests were disabled, because they embedded their own
       copies of the implementation for what they were supposedly testing.
       Life's too short to spend time fixing tests that seem designed to
       impede progress by requiring a certain implementation as well as
       behavior.

    Change-Id: Id929b11387927136f78626901729296b6c0d0fd7
    BUG: 1219026
    Signed-off-by: Jeff Darcy <jdarcy at redhat.com>
    Reviewed-on: http://review.gluster.org/10417
    Tested-by: Gluster Build System <jenkins at build.gluster.com>
    Reviewed-by: Krishnan Parthasarathi <kparthas at redhat.com>
    Reviewed-by: Niels de Vos <ndevos at redhat.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu at redhat.com>
    Reviewed-on: http://review.gluster.org/10723
    Tested-by: NetBSD Build System

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=D87w30wrrG&a=cc_unsubscribe


More information about the Bugs mailing list