Bug 765463 - (GLUSTER-3731) Crash on exit after an error
Crash on exit after an error
Product: GlusterFS
Classification: Community
Component: cli (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Amar Tumballi
Depends On:
  Show dependency treegraph
Reported: 2011-10-17 20:49 EDT by Pete Zaitcev
Modified: 2013-12-18 19:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pete Zaitcev 2011-10-17 18:02:37 EDT
Comment 1 Pete Zaitcev 2011-10-17 20:49:34 EDT
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-24 22:22:53 EDT
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)
-        INIT_LIST_HEAD (&xl->volume_options);
         vol_opt = GF_CALLOC (1, sizeof (volume_opt_list_t),

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-16 21:11:00 EST
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@gluster.com)
Comment 4 Amar Tumballi 2011-11-17 02:54:17 EST
fixed in master

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