Bug 1063215 - gluster cli crashed upon running 'heal info' command with the binaries compiled with -DDEBUG
Summary: gluster cli crashed upon running 'heal info' command with the binaries compil...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: replicate
Version: 2.1
Hardware: x86_64
OS: Unspecified
high
medium
Target Milestone: ---
: RHGS 3.1.0
Assignee: Pranith Kumar K
QA Contact: Shruti Sampat
URL:
Whiteboard:
Depends On:
Blocks: 1202842
TreeView+ depends on / blocked
 
Reported: 2014-02-10 09:56 UTC by M S Vishwanath Bhat
Modified: 2016-09-17 12:10 UTC (History)
10 users (show)

Fixed In Version: glusterfs-3.7.1-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-29 04:30:45 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1495 0 normal SHIPPED_LIVE Important: Red Hat Gluster Storage 3.1 update 2015-07-29 08:26:26 UTC

Description M S Vishwanath Bhat 2014-02-10 09:56:25 UTC
Description of problem:
When the gluster is compiled with -DDEBUG compiler flag, glusetr cli crashed upon running "gluster v heal <VOLNAME> info'

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

How reproducible:
Hit twice in as many tries

Steps to Reproduce:
1. Compile glusterfs with -DDEBUG and install
2. Run gluster v heal <VOLNAME> info'

Actual results:
[root@spitfire ]# gluster v heal master info
glfsheal: mem-pool.c:63: gf_mem_set_acct_info: Assertion `type <= xl->mem_acct.num_types' failed.


Expected results:
There should be no crash

Additional info:

The backtrace from the core

(gdb) bt
#0  0x0000003b3a0328e5 in raise () from /lib64/libc.so.6
#1  0x0000003b3a0340c5 in abort () from /lib64/libc.so.6
#2  0x0000003b3a02ba0e in __assert_fail_base () from /lib64/libc.so.6
#3  0x0000003b3a02bad0 in __assert_fail () from /lib64/libc.so.6
#4  0x00007fa0a7312bc4 in gf_mem_set_acct_info (xl=0x7fa0a759f540, alloc_ptr=0x7fff2916b820, size=55, type=40) at mem-pool.c:63
#5  0x00007fa0a7312f4e in __gf_calloc (nmemb=1, size=55, type=40) at mem-pool.c:117
#6  0x00007fa0a72e1716 in gf_strdup (src=0x7fff2916b9d0 "spitfire.blr.redhat.com-4362-2014/02/10-09:16:33:12387") at mem-pool.h:140
#7  0x00007fa0a72ea60b in generate_glusterfs_ctx_id () at common-utils.c:2413
#8  0x00007fa0a6c12017 in glusterfs_ctx_defaults_init (ctx=0xc1e010) at glfs.c:72
#9  0x00007fa0a6c1342e in glfs_new (volname=0x7fff2916d39c "master") at glfs.c:432
#10 0x000000000040367a in main (argc=2, argv=0x7fff2916cfe8) at glfs-heal.c:429
(gdb) fr 4
#4  0x00007fa0a7312bc4 in gf_mem_set_acct_info (xl=0x7fa0a759f540, alloc_ptr=0x7fff2916b820, size=55, type=40) at mem-pool.c:63
63              GF_ASSERT (type <= xl->mem_acct.num_types);



This is the supposed fix

[root@skywalker rhs-glusterfs]# git diff
diff --git a/api/src/glfs-mem-types.h b/api/src/glfs-mem-types.h
index c2da4a9..3301b3d 100644
--- a/api/src/glfs-mem-types.h
+++ b/api/src/glfs-mem-types.h
@@ -16,7 +16,7 @@
 #define GF_MEM_TYPE_START (gf_common_mt_end + 1)
 
 enum glfs_mem_types_ {
-        glfs_mt_glfs_t,
+        glfs_mt_glfs_t = GF_MEM_TYPE_START,
         glfs_mt_call_pool_t,
         glfs_mt_xlator_t,
        glfs_mt_glfs_fd_t,

Comment 7 Shruti Sampat 2015-06-15 11:24:32 UTC
Verified as fixed in glusterfs 3.7.1.

Built glusterfs with debug option and ran `gluster volume heal info' command. Command works as expected, crash not observed.

Comment 9 errata-xmlrpc 2015-07-29 04:30:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1495.html


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