[Bugs] [Bug 1302201] Scrubber crash (list corruption)
bugzilla at redhat.com
bugzilla at redhat.com
Thu Jan 28 13:22:33 UTC 2016
https://bugzilla.redhat.com/show_bug.cgi?id=1302201
--- Comment #3 from Vijay Bellur <vbellur at redhat.com> ---
COMMIT: http://review.gluster.org/13302 committed in master by Venky Shankar
(vshankar at redhat.com)
------
commit 786a8b395b09126a1151865c57ec2753a26facbb
Author: Venky Shankar <vshankar at redhat.com>
Date: Wed Jan 27 17:04:18 2016 +0530
features / bitrot: Prevent spurious pthread_cond_wait() wakeup
pthread_cond_wait() is prone to spurious wakeups and it's utmost
necessarry to check a boolean predicate for thread continuation.
See man(3) pthread_cond_wait() for details.
The following is done in bitrot scrubber:
if (list_empty (&fsscrub->scrublist))
pthread_cond_wait (&fsscrub->cond, &fsscrub->mutex);
followed by:
list_first_entry (&fsscrub->scrublist, ...)
A spurious wakeup from pthread_cond_wait() with the absence of
list_empty() check causes list_first_entry() to return garbage.
Change-Id: I08786b9686b5503fcad6127e4c2a2cfac4bb7849
BUG: 1302201
Signed-off-by: Venky Shankar <vshankar at redhat.com>
Reviewed-on: http://review.gluster.org/13302
Reviewed-by: Pranith Kumar Karampuri <pkarampu at redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu at redhat.com>
Smoke: Gluster Build System <jenkins at build.gluster.com>
CentOS-regression: Gluster Build System <jenkins at build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the Docs Contact for the bug.
More information about the Bugs
mailing list