Bug 765463 (GLUSTER-3731) - Crash on exit after an error
Summary: Crash on exit after an error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-3731
Product: GlusterFS
Classification: Community
Component: cli
Version: pre-release
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Amar Tumballi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-18 00:49 UTC by Pete Zaitcev
Modified: 2013-12-19 00:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Pete Zaitcev 2011-10-17 22:02:37 UTC
http://review.gluster.com/606

Comment 1 Pete Zaitcev 2011-10-18 00:49:34 UTC
On a Fedora system, if glusterfs-fuse is not installed [sic]:

glusterfs -f /var/lib/hekafs/symvol.vol /mnt/symvol

[101580.407507] glusterfs[2532]: segfault at 0 ip 00007f8597c9ebc1 sp 00007fff7de34b40 error 4 in libglusterfs.so.0.0.0[7f8597c83000+5e000]

Core was generated by `glusterfs -f /var/lib/hekafs/symvol.vol /mnt/symvol'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f8597c9ebc1 in xlator_destroy (xl=0x1e130b0) at xlator.c:1793
1793            list_for_each_entry_safe (vol_opt, tmp, &xl->volume_options, list) {
Missing separate debuginfos, use: debuginfo-install glusterfs-3.2.4-1.fc17.x86_64
(gdb) where
#0  0x00007f8597c9ebc1 in xlator_destroy (xl=0x1e130b0) at xlator.c:1793
#1  0x0000000000404bf7 in create_fuse_mount ()
#2  0x0000000000403878 in main ()

Comment 2 Amar Tumballi 2011-10-25 02:22:53 UTC
Hi Pete,

I could see that to fix the issue, below patch is enough. Let me know what you think.

amar@supernova:~/work/glusterfs$ git diff
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 0d8c258..92d78da 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -190,9 +190,10 @@ xlator_dynload (xlator_t *xl)
         void              *handle = NULL;
         volume_opt_list_t *vol_opt = NULL;
 
-
         GF_VALIDATE_OR_GOTO ("xlator", xl, out);
 
+        INIT_LIST_HEAD (&xl->volume_options);
+
         ret = gf_asprintf (&name, "%s/%s.so", XLATORDIR, xl->type);
         if (-1 == ret) {
                 gf_log ("xlator", GF_LOG_ERROR, "asprintf failed");
@@ -256,8 +257,6 @@ xlator_dynload (xlator_t *xl)
                         dlerror());
         }
 
-        INIT_LIST_HEAD (&xl->volume_options);
-
         vol_opt = GF_CALLOC (1, sizeof (volume_opt_list_t),
                          gf_common_mt_volume_opt_list_t);
 
amar@supernova:~/work/glusterfs$

I will be marking your patch as -1, let me know if I should submit it, or you can submit this too.

Comment 3 Anand Avati 2011-11-17 02:11:00 UTC
CHANGE: http://review.gluster.com/606 (was happening when any of the dlopen() fails for xlator loading, and) merged in master by Vijay Bellur (vijay)

Comment 4 Amar Tumballi 2011-11-17 07:54:17 UTC
fixed in master


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