Bug 1614799 - Geo-rep: Few workers fails to start with out any failure
Summary: Geo-rep: Few workers fails to start with out any failure
Alias: None
Product: GlusterFS
Classification: Community
Component: geo-replication
Version: mainline
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Kotresh HR
QA Contact:
Depends On:
Blocks: 1623749 1630145
TreeView+ depends on / blocked
Reported: 2018-08-10 12:37 UTC by Kotresh HR
Modified: 2018-10-23 15:16 UTC (History)
1 user (show)

Fixed In Version: glusterfs-5.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1623749 1630145 (view as bug list)
Last Closed: 2018-10-23 15:16:52 UTC
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:

Attachments (Terms of Use)

Description Kotresh HR 2018-08-10 12:37:44 UTC
Description of problem:
Few workers fails to start with out any failure.

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

How reproducible:
Seen only while running upstream regression test case
prove -v tests/00-geo-rep/georep-basic-dr-rsync.t

Steps to Reproduce:
1. Get upstream gluster source code
2. source install gluster
3. prove -v tests/00-geo-rep/georep-basic-dr-rsync.t

Actual results:
one of the worker fails to start without any log

Expected results:
No worker should fail to start

Additional info:

Comment 1 Worker Ant 2018-08-10 12:41:14 UTC
REVIEW: https://review.gluster.org/20704 (geo-rep: Fix deadlock during worker start) posted (#1) for review on master by Kotresh HR

Comment 2 Worker Ant 2018-08-13 03:52:34 UTC
COMMIT: https://review.gluster.org/20704 committed in master by "Amar Tumballi" <amarts@redhat.com> with a commit message- geo-rep: Fix deadlock during worker start

Monitor process spawns monitor threads (one per brick).
Each monitor thread, forks worker and agent processes.
Each monitor thread, while intializing, updates the
monitor status file. It is synchronized using flock.
The race is that, some thread can fork worker while
other thread opened the status file resulting in
holding the reference of fd in worker process.

flock gets unlocked either by specifically unlocking it
or by closing all duplicate fds referring to the file.
The code was relying on fd close, hence a reference
in worker/agent process by fork could cause the deadlock.

1. flock is unlocked specifically.
2. Also made sure to update status file in approriate places so that
the reference is not leaked to worker/agent process.

With this fix, both the deadlock and possible fd
leaks is solved.

fixes: bz#1614799
Change-Id: I0d1ce93072dab07d0dbcc7e779287368cd9f093d
Signed-off-by: Kotresh HR <khiremat@redhat.com>

Comment 3 Shyamsundar 2018-10-23 15:16:52 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-5.0, please open a new bug report.

glusterfs-5.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://lists.gluster.org/pipermail/announce/2018-October/000115.html
[2] https://www.gluster.org/pipermail/gluster-users/

Note You need to log in before you can comment on or make changes to this bug.