Bug 1334314

Summary: changelog: changelog_rollover breaks when number of fds opened is more than 1024
Product: [Community] GlusterFS Reporter: Kotresh HR <khiremat>
Component: changelogAssignee: Kotresh HR <khiremat>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1341952 (view as bug list) Environment:
Last Closed: 2017-03-08 09:24:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1341952, 1342083    

Description Kotresh HR 2016-05-09 11:35:23 UTC
Description of problem:
Changelog_rollover breaks when number of fds opened is more than 1024

This is because, 'select' is being used to wait on fd. This is known limitation
with select. Hence replace select with poll or some other mechanism.


Version-Release number of selected component (if applicable):
mainline

How reproducible:
always

Steps to Reproduce:
1. Open >1024 files and then enable changelog


Actual results:
changelog_rollover fails

Expected results:
changelog rollover should not fail

Additional info:

Comment 1 Vijay Bellur 2016-05-09 11:41:37 UTC
REVIEW: http://review.gluster.org/14272 (features/changelog: Change barrier notification mechanism) posted (#1) for review on master by Kotresh HR (khiremat)

Comment 2 Vijay Bellur 2016-05-20 07:20:09 UTC
REVIEW: http://review.gluster.org/14272 (features/changelog: Change barrier notification mechanism) posted (#2) for review on master by Kotresh HR (khiremat)

Comment 3 Vijay Bellur 2016-05-31 19:00:02 UTC
COMMIT: http://review.gluster.org/14272 committed in master by Jeff Darcy (jdarcy) 
------
commit be00012e7be55d25870411f3e975db9a8e19c70a
Author: Kotresh HR <khiremat>
Date:   Mon May 9 16:54:00 2016 +0530

    features/changelog: Change barrier notification mechanism
    
    The barrier notification mechanism was fd based and 'select'
    was being used. 'select' breaks when number of fds opened
    by brick process exceeds 1024. To avoid this and also
    the maintainance of pipe between notify and 'changelog_rollover',
    the pipe has been replaced with pthread condition signal
    and timed wait mechanism.
    
    Change-Id: I530ea90d9a06953f8b23b4e12d122872ee1925de
    BUG: 1334314
    Signed-off-by: Kotresh HR <khiremat>
    Reviewed-on: http://review.gluster.org/14272
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Aravinda VK <avishwan>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Raghavendra Bhat <raghavendra>
    Reviewed-by: Jeff Darcy <jdarcy>

Comment 4 Kotresh HR 2017-03-08 09:24:20 UTC
v3.10.0 contains the fix.