[Bugs] [Bug 1217386] Crash in dht_getxattr_cbk
bugzilla at redhat.com
bugzilla at redhat.com
Fri May 1 14:48:28 UTC 2015
https://bugzilla.redhat.com/show_bug.cgi?id=1217386
--- Comment #2 from Anand Avati <aavati at redhat.com> ---
COMMIT: http://review.gluster.org/10467 committed in release-3.7 by Vijay
Bellur (vbellur at redhat.com)
------
commit 85a0fb6d304babb9d7f35e26a45677d8210da8eb
Author: Susant Palai <spalai at redhat.com>
Date: Sun Apr 26 23:49:56 2015 +0530
dht: tackle thread race in dht_getxattr_cbk
problem:
1. When two threads execute in parallel in dht_getxattr_cbk
it may so happen that, both may find local->xattr to be NULL. As
a result dht_aggregate_xattr may not get executed.
2. In dht_getxattr_cbk,
thread1 thread2
T1 this_call_cnt = 2 -1
T2 this_call_cnt = 1 - 1
T3 fills local_xattr
T4 DHT_STACK_UNWIND -> local_wipe
T5 tries to dereference local
which is already freed,
leading to crash.
Solution:
for problem1: Execute critical section inside frame lock
to resolve race.
for problem2: Calculate this_call_count just before out section.
BUG: 1217386
Change-Id: I14fdb0cb1825896721670d71f48c93053448be7b
Signed-off-by: Susant Palai <spalai at redhat.com>
Reviewed-on: http://review.gluster.org/10389
Reviewed-by: Anuradha Talur <atalur at redhat.com>
Reviewed-by: N Balachandran <nbalacha at redhat.com>
Reviewed-by: Kotresh HR <khiremat at redhat.com>
Reviewed-by: Shyamsundar Ranganathan <srangana at redhat.com>
Signed-off-by: Susant Palai <spalai at redhat.com>
Reviewed-on: http://review.gluster.org/10467
Tested-by: Gluster Build System <jenkins at build.gluster.com>
--
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=vmsNAGsO38&a=cc_unsubscribe
More information about the Bugs
mailing list