summaryrefslogtreecommitdiffstats
path: root/tests/performance/open-behind.t
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2015-04-26 23:49:56 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2015-04-29 07:02:00 -0700
commit6bde16f7dc4a43d85e488f25ad679abfd24e72d1 (patch)
tree269659fd8c93ec5dabe91fb51b9808342b775700 /tests/performance/open-behind.t
parentb3a966c241b5d5b8117f06a4c744c18b6a59bb18 (diff)
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. Change-Id: I9827ac8fafebb0c733a4e4f3c710b752f1cd45fa BUG: 1215592 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/10389 Reviewed-by: Anuradha Talur <atalur@redhat.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Tested-by: NetBSD Build System Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'tests/performance/open-behind.t')
0 files changed, 0 insertions, 0 deletions