Bug 1184366 - make sure pthread keys are used only once
Summary: make sure pthread keys are used only once
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Raghavendra Bhat
QA Contact:
URL:
Whiteboard:
Depends On: 1179183 1186619
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-21 08:38 UTC by Raghavendra Bhat
Modified: 2015-05-14 17:45 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.7.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-14 17:29:03 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Raghavendra Bhat 2015-01-21 08:38:19 UTC
Description of problem:

glusterfsd creates pthread keys for different purposes such as storing THIS, lkowner etc, while coming up. So does gfapi. But when gfapi is used within glusterfs itself (example snapshot daemon in user serviceable snapshots) the keys are created again, whenever a new gfapi instance is created. This might lead to the situation of process running out of pthread keys.

So, the pthread keys should be created only once.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Anand Avati 2015-01-21 08:40:25 UTC
REVIEW: http://review.gluster.org/9430 (libglusterfs: Avoid initializing per process globals more than once.) posted (#6) for review on master by Raghavendra Bhat (raghavendra)

Comment 2 Anand Avati 2015-01-21 08:40:34 UTC
REVIEW: http://review.gluster.org/9469 (uss: disable memory accounting for the snapshot daemon) posted (#1) for review on master by Raghavendra Bhat (raghavendra)

Comment 3 Anand Avati 2015-01-23 13:41:31 UTC
REVIEW: http://review.gluster.org/9430 (libglusterfs: Avoid initializing per process globals more than once.) posted (#7) for review on master by Raghavendra Bhat (raghavendra)

Comment 4 Anand Avati 2015-01-23 13:41:34 UTC
REVIEW: http://review.gluster.org/9469 (uss: disable memory accounting for the snapshot daemon) posted (#2) for review on master by Raghavendra Bhat (raghavendra)

Comment 5 Anand Avati 2015-01-28 07:02:34 UTC
REVIEW: http://review.gluster.org/9430 (libglusterfs: Avoid initializing per process globals more than once.) posted (#8) for review on master by Avra Sengupta (asengupt)

Comment 6 Anand Avati 2015-01-28 07:02:42 UTC
REVIEW: http://review.gluster.org/9469 (uss: disable memory accounting for the snapshot daemon) posted (#3) for review on master by Avra Sengupta (asengupt)

Comment 7 Anand Avati 2015-01-28 14:05:30 UTC
COMMIT: http://review.gluster.org/9469 committed in master by Vijay Bellur (vbellur) 
------
commit c8a6904396142b832ec31c37f43f44b139d24e1f
Author: Raghavendra Bhat <raghavendra>
Date:   Tue Jan 20 17:57:22 2015 +0530

    uss: disable memory accounting for the snapshot daemon
    
    * Bring in option to disable memory accounting for a glusterfs process
      This reverses the changes done by the commit
      7fba3a88f1ced610eca0c23516a1e720d75160cd.
    
    * Change the key from "memory-accounting" to "no-memory-accounting", as by
      default all the glusterfs process enable memory accounting now. So to
      disable memory accounting for some process, "no-mem-accounting" argument has
      to be passed.
    
    Change-Id: I39c7cefb0fe764ea3e48f4e73e1305b084c5f497
    BUG: 1184366
    Signed-off-by: Raghavendra Bhat <raghavendra>
    Reviewed-on: http://review.gluster.org/9469
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 8 Anand Avati 2015-01-28 14:06:24 UTC
COMMIT: http://review.gluster.org/9430 committed in master by Vijay Bellur (vbellur) 
------
commit 88136b53f59e3b81aacc28df18bda575da35b02d
Author: Vijay Bellur <vbellur>
Date:   Sun Jan 11 23:13:08 2015 +0530

    libglusterfs: Avoid initializing per process globals more than once.
    
    gfapi consumers can invoke glusters_globals_init() multiple times
    through glfs_new(). This will result in re-initialization of already
    inited variables and non deterministic behavior. To avoid this, a
    new function gf_globals_init_once() has been added. The invocation
    of this function is guarded through pthread_once(), thereby ensuring
    single initialization of per process globals.
    
    Change-Id: I0ecde02ee49e0c7379c2eb0f1c879d89774ec82f
    BUG: 1184366
    Signed-off-by: Vijay Bellur <vbellur>
    Signed-off-by: Raghavendra Bhat <raghavendra>
    Reviewed-on: http://review.gluster.org/9430
    Tested-by: Gluster Build System <jenkins.com>

Comment 9 Niels de Vos 2015-05-14 17:29:03 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 10 Niels de Vos 2015-05-14 17:35:49 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 11 Niels de Vos 2015-05-14 17:38:11 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 12 Niels de Vos 2015-05-14 17:45: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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[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.