Bug 1208482 - pthread cond and mutex variables of fs struct has to be destroyed conditionally.
Summary: pthread cond and mutex variables of fs struct has to be destroyed conditionally.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: libgfapi
Version: mainline
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Humble Chirammal
QA Contact: Sudhir D
URL:
Whiteboard:
Depends On:
Blocks: 1233651
TreeView+ depends on / blocked
 
Reported: 2015-04-02 11:31 UTC by Humble Chirammal
Modified: 2016-06-16 12:47 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.8rc2
Clone Of:
: 1233651 (view as bug list)
Environment:
Last Closed: 2016-06-16 12:47:47 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Humble Chirammal 2015-04-02 11:31:44 UTC
Description of problem:

At present stage the initialization and destroy of conditional and mutex variables of fs struct happen in different scenarios and there is no uniformal
way of destroying these variables incase there is a failure when initializing the same. The fs mutex and conditional variables( cond and child_down_count)
are getting destroyed from glfs_free_from_ctx(). However this destroy is not done by a conditional check inside destroy function. This has to be corrected.

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

GlusterFS 3.6.2

How reproducible:

N/A

Steps to Reproduce:

N/A

Actual results:

The destroy of variables done in an unconditional way in glfs_fini().

Expected results:

It has to follow a single path to destroy in clean up function glfs_fini().

Additional info:

By introducing bit flags in glfs fs object we can make use of the same ( if there is a failure in initialization ) in glfs_fini() which is evolving as a one and only function to free fs and ctx resources. The init functions can set the flags according to the initialization flow of the mutex and conditional variables of struct fs members. Without this patch we are compelled to use the goto lables and other hacks in init functions to make sure
the resources are freed if there is an error path.

Comment 1 Anand Avati 2015-04-02 11:40:09 UTC
REVIEW: http://review.gluster.org/10120 (libgfapi: introduce bit flags for pthread mutex or cond variables) posted (#1) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 2 Anand Avati 2015-04-06 12:41:30 UTC
REVIEW: http://review.gluster.org/10120 (libgfapi: introduce bit flags for pthread mutex or cond variables) posted (#2) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 3 Anand Avati 2015-04-06 12:54:24 UTC
REVIEW: http://review.gluster.org/10120 (libgfapi: introduce bit flags for pthread mutex or cond variables) posted (#3) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 4 Anand Avati 2015-04-06 16:46:28 UTC
REVIEW: http://review.gluster.org/10120 (libgfapi: introduce bit flags for pthread mutex or cond variables) posted (#4) for review on master by Niels de Vos (ndevos)

Comment 5 Anand Avati 2015-04-08 09:17:52 UTC
REVIEW: http://review.gluster.org/10120 (libgfapi: introduce bit flags for pthread mutex and cond variables) posted (#5) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 6 Anand Avati 2015-04-08 13:47:10 UTC
REVIEW: http://review.gluster.org/10120 (libgfapi: introduce bit flags for pthread mutex and cond variables) posted (#6) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 7 Anand Avati 2015-04-13 07:57:10 UTC
REVIEW: http://review.gluster.org/10120 (libgfapi: introduce bit flags for pthread mutex and cond variables) posted (#7) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 8 Anand Avati 2015-05-19 07:40:19 UTC
REVIEW: http://review.gluster.org/10120 (libgfapi: introduce bit flags for pthread mutex and cond variables) posted (#8) for review on master by Poornima G (pgurusid)

Comment 9 Anand Avati 2015-05-21 06:34:47 UTC
REVIEW: http://review.gluster.org/10120 (libgfapi: introduce bit flags for pthread mutex and cond variables) posted (#9) for review on master by Poornima G (pgurusid)

Comment 10 Anand Avati 2015-05-28 10:53:55 UTC
REVIEW: http://review.gluster.org/10971 (libgfapi: introduce bit flags for pthread mutex and cond variables) posted (#1) for review on release-3.7 by Humble Devassy Chirammal (humble.devassy)

Comment 11 Nagaprasad Sathyanarayana 2015-10-25 15:08:34 UTC
Fix for this BZ is already present in a GlusterFS release. You can find clone of this BZ, fixed in a GlusterFS release and closed. Hence closing this mainline BZ as well.

Comment 12 Niels de Vos 2016-06-16 12:47:47 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-3.8.0, please open a new bug report.

glusterfs-3.8.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] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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