[Bugs] [Bug 1129939] NetBSD port

bugzilla at redhat.com bugzilla at redhat.com
Tue Dec 2 05:47:18 UTC 2014


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



--- Comment #198 from Anand Avati <aavati at redhat.com> ---
COMMIT: http://review.gluster.org/9212 committed in master by Kaushal M
(kaushal at redhat.com) 
------
commit f5ef4d808724afe4ddd477b0c0e8b3eb985319db
Author: Krishnan Parthasarathi <kparthas at redhat.com>
Date:   Fri Nov 28 17:24:13 2014 +0530

    glusterd: use synclock_t for synchronizing concurrent '\op_sm\' invocations

        In glusterd_op_sm(), we lock and unlock the gd_op_sm_lock mutex.
        Unfortunately, locking and unlocking can happen in different threads
        (task swap will occur in handler call with use of synctasks).

        This case is explictely covered by POSIX: the behavior is undefined.
       
http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_lock.html

        When unlocking from a thread that is not owner, Linux seems to be fine
        (though you never know with unspecified operation), while NetBSD
returns
        EPERM, causing a spurious error in tests/basic/pump.

        To fix this, we use synclock_t which was precisely meant for this.
        synclock is a pthread_mutex_t like synchronization object which uses
the
        synctask handle for owner and is immune to the task being run on
        multiple threads during its lifetime.

    Change-Id: Idca15190d42f32a843088cc8236138f676377586
    BUG: 1129939
    Signed-off-by: Krishnan Parthasarathi <kparthas at redhat.com>
    Reviewed-on: http://review.gluster.org/9212
    Reviewed-by: Kaushal M <kaushal at redhat.com>
    Tested-by: Kaushal M <kaushal at redhat.com>

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Bugs mailing list