Bug 812735 - [dc4c44d51e3eb4b53e78840bf223911e48ce62b5]: gluster cli crashed when volume heal command was given
Summary: [dc4c44d51e3eb4b53e78840bf223911e48ce62b5]: gluster cli crashed when volume h...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: cli
Version: mainline
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Raghavendra Bhat
QA Contact:
URL:
Whiteboard:
: 809771 (view as bug list)
Depends On:
Blocks: 817967
TreeView+ depends on / blocked
 
Reported: 2012-04-16 06:40 UTC by Raghavendra Bhat
Modified: 2015-12-01 16:45 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 17:24:11 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions: glusterfs-3.3.0qa40
Embargoed:


Attachments (Terms of Use)

Description Raghavendra Bhat 2012-04-16 06:40:13 UTC
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 10:34:26 UTC
*** Bug 809771 has been marked as a duplicate of this bug. ***

Comment 2 Anand Avati 2012-04-19 06:53:58 UTC
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)

Comment 3 Raghavendra Bhat 2012-05-09 09:29:49 UTC
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.