[Bugs] [Bug 1233651] New: pthread cond and mutex variables of fs struct has to be destroyed conditionally.

bugzilla at redhat.com bugzilla at redhat.com
Fri Jun 19 11:15:00 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1233651

            Bug ID: 1233651
           Summary: pthread cond and mutex variables of fs struct has to
                    be destroyed conditionally.
           Product: GlusterFS
           Version: 3.7.1
         Component: libgfapi
          Keywords: Triaged
          Severity: medium
          Priority: medium
          Assignee: bugs at gluster.org
          Reporter: hchiramm at redhat.com
        QA Contact: sdharane at redhat.com
                CC: bugs at gluster.org, gluster-bugs at redhat.com,
                    ndevos at redhat.com, sdharane at redhat.com
        Depends On: 1208482



+++ This bug was initially created as a clone of Bug #1208482 +++

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.

--- Additional comment from Anand Avati on 2015-04-02 07:40:09 EDT ---

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 at gmail.com)

--- Additional comment from Anand Avati on 2015-04-06 08:41:30 EDT ---

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 at gmail.com)

--- Additional comment from Anand Avati on 2015-04-06 08:54:24 EDT ---

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 at gmail.com)

--- Additional comment from Anand Avati on 2015-04-06 12:46:28 EDT ---

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 at redhat.com)

--- Additional comment from Anand Avati on 2015-04-08 05:17:52 EDT ---

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 at gmail.com)

--- Additional comment from Anand Avati on 2015-04-08 09:47:10 EDT ---

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 at gmail.com)

--- Additional comment from Anand Avati on 2015-04-13 03:57:10 EDT ---

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 at gmail.com)

--- Additional comment from Anand Avati on 2015-05-19 03:40:19 EDT ---

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 at redhat.com)

--- Additional comment from Anand Avati on 2015-05-21 02:34:47 EDT ---

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 at redhat.com)

--- Additional comment from Anand Avati on 2015-05-28 06:53:55 EDT ---

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 at gmail.com)


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1208482
[Bug 1208482] pthread cond and mutex variables of fs struct has to be
destroyed conditionally.
-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list