Bug 812735 - [dc4c44d51e3eb4b53e78840bf223911e48ce62b5]: gluster cli crashed when volume heal command was given
[dc4c44d51e3eb4b53e78840bf223911e48ce62b5]: gluster cli crashed when volume h...
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: cli (Show other bugs)
mainline
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Raghavendra Bhat
:
: 809771 (view as bug list)
Depends On:
Blocks: 817967
  Show dependency treegraph
 
Reported: 2012-04-16 02:40 EDT by Raghavendra Bhat
Modified: 2015-12-01 11:45 EST (History)
3 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-24 13:24:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions: glusterfs-3.3.0qa40
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Raghavendra Bhat 2012-04-16 02:40:13 EDT
Description of problem:
gluster cli crashed when volume heal command is given (it does not crash everytime when heal command is given.).

This is the backtrace of the crash.

Core was generated by `gluster volume heal mirror'.
Program terminated with signal 11, Segmentation fault.
#0  pthread_spin_lock (lock=0xcafebad6) at ../nptl/sysdeps/x86_64/../i386/pthread_spin_lock.c:35
35	../nptl/sysdeps/x86_64/../i386/pthread_spin_lock.c: No such file or directory.
	in ../nptl/sysdeps/x86_64/../i386/pthread_spin_lock.c
(gdb) bt
#0  pthread_spin_lock (lock=0xcafebad6) at ../nptl/sysdeps/x86_64/../i386/pthread_spin_lock.c:35
#1  0x00007ff342bf2d31 in mem_put (ptr=0x1f4b530) at ../../../libglusterfs/src/mem-pool.c:530
#2  0x000000000040a614 in STACK_DESTROY (stack=0x1f21cdc) at ../../../libglusterfs/src/stack.h:188
#3  0x000000000040e830 in cli_cmd_volume_heal_cbk (state=0x7ffffe16f6e0, word=0x1f4c6b0, words=0x7ffffe16f8b0, wordcount=3)
    at ../../../cli/src/cli-cmd-volume.c:1681
#4  0x0000000000409d49 in cli_cmd_process (state=0x7ffffe16f6e0, argc=3, argv=0x7ffffe16f8b0) at ../../../cli/src/cli-cmd.c:150
#5  0x0000000000409793 in cli_batch (d=0x7ffffe16f6e0) at ../../../cli/src/input.c:44
#6  0x00007ff342555d8c in start_thread (arg=0x7ff340067700) at pthread_create.c:304
#7  0x00007ff341f1204d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8  0x0000000000000000 in ?? ()
(gdb) f 1
#1  0x00007ff342bf2d31 in mem_put (ptr=0x1f4b530) at ../../../libglusterfs/src/mem-pool.c:530
530	        LOCK (&pool->lock);
(gdb) p pool
$1 = (struct mem_pool *) 0xcafebabe
(gdb) up
#2  0x000000000040a614 in STACK_DESTROY (stack=0x1f21cdc) at ../../../libglusterfs/src/stack.h:188
188	                mem_put (local);
(gdb) l
183	                FRAME_DESTROY (stack->frames.next);
184	        }
185	        mem_put (stack);
186	
187	        if (local)
188	                mem_put (local);
189	}
190	
191	static inline void
192	STACK_RESET (call_stack_t *stack)
(gdb) up
#3  0x000000000040e830 in cli_cmd_volume_heal_cbk (state=0x7ffffe16f6e0, word=0x1f4c6b0, words=0x7ffffe16f8b0, wordcount=3)
    at ../../../cli/src/cli-cmd-volume.c:1681
1681	                STACK_DESTROY (frame->root);
(gdb) l
1676	
1677	        if (options)
1678	                dict_unref (options);
1679	
1680	        if (frame)
1681	                STACK_DESTROY (frame->root);
1682	
1683	        return ret;
1684	}
1685	
(gdb) 


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


How reproducible:

not always

Steps to Reproduce:
1. volume heal command
2.
3.
  
Actual results:

gluster volume heal command segfaulted gluster cli

Expected results:

gluster cli should not crash

Additional info:
Comment 1 Amar Tumballi 2012-04-17 06:34:26 EDT
*** Bug 809771 has been marked as a duplicate of this bug. ***
Comment 2 Anand Avati 2012-04-19 02:53:58 EDT
CHANGE: http://review.gluster.com/3167 (cli: do not put the frame->local to mempool since its a calloced structure) merged in master by Vijay Bellur (vijay@gluster.com)
Comment 3 Raghavendra Bhat 2012-05-09 05:29:49 EDT
Checked with glusterfs-3.3.0qa40 and the crash is not seen anymore since we are freeing the allocated frame->local structure instead of trying to add it to the mempool.

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