Bug 1211913 - nfs : racy condition in export/netgroup feature
Summary: nfs : racy condition in export/netgroup feature
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: nfs
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jiffin
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1212182
TreeView+ depends on / blocked
 
Reported: 2015-04-15 08:40 UTC by Jiffin
Modified: 2016-06-16 12:51 UTC (History)
3 users (show)

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


Attachments (Terms of Use)
core file (13.42 MB, application/x-bzip)
2015-04-15 08:40 UTC, Jiffin
no flags Details

Description Jiffin 2015-04-15 08:40:49 UTC
Created attachment 1014624 [details]
core file

Description of problem:

For export/netgroup feature we will run a thread in background which will fetch/refresh contents of export/netgroup file. This thread is not cleaned up properly

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

How reproducible:
rarely


Actual results:
coredump is generated.

Expected results:
Should reach such race conditions

Additional info:

Comment 1 Anand Avati 2015-04-15 08:43:56 UTC
REVIEW: http://review.gluster.org/10250 (nfs : fix for coredump caused by export/netgroup feature in th regression failure) posted (#1) for review on master by jiffin tony Thottan (jthottan)

Comment 2 Anand Avati 2015-04-15 08:45:34 UTC
REVIEW: http://review.gluster.org/10250 (nfs : fix for coredump caused by export/netgroup feature in the regression failure) posted (#2) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 3 Anand Avati 2015-04-20 17:54:06 UTC
REVIEW: http://review.gluster.org/10250 (nfs : fix for coredump caused by export/netgroup feature in the regression failure) posted (#3) for review on master by Vijay Bellur (vbellur)

Comment 4 Niels de Vos 2015-04-20 19:05:27 UTC
From my understanding and talking to Jiffin, the refresh-thread is active while the nfs-server is exiting. This causes a (partial) cleanup of some of the structures, which are later on accessed again, resulting in the segfault.

I see two options to fix this permanently, but need to look into the details to judge what fix is most reasonable:

1. replace the dict_t structures by rcu-lists
2. lock the structures while the refresh thread is running and stop the thread 
   (+wait) on shutting down the nfs-server

Comment 5 Anand Avati 2015-05-05 06:09:40 UTC
REVIEW: http://review.gluster.org/10250 (nfs : fix for coredump caused by export/netgroup feature in the regression failure) posted (#4) for review on master by jiffin tony Thottan (jthottan)

Comment 6 Anand Avati 2015-05-05 06:10:32 UTC
REVIEW: http://review.gluster.org/10250 (nfs : fix for coredump caused by export/netgroup feature in the regression) posted (#5) for review on master by jiffin tony Thottan (jthottan)

Comment 7 Anand Avati 2015-05-05 10:40:58 UTC
REVIEW: http://review.gluster.org/10250 (nfs : fix for coredump caused by export/netgroup feature in the regression) posted (#6) for review on master by Vijay Bellur (vbellur)

Comment 8 Nagaprasad Sathyanarayana 2015-10-25 14:53:58 UTC
Fix for this bug is already made in a GlusterFS release. The cloned BZ has details of the fix and the release. Hence closing this mainline BZ.

Comment 9 Nagaprasad Sathyanarayana 2015-10-25 15:13:36 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 10 Niels de Vos 2016-06-16 12:51:10 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.