Bug 763411 (GLUSTER-1679) - gluster volume log locate/rotate segfault
Summary: gluster volume log locate/rotate segfault
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-1679
Product: GlusterFS
Classification: Community
Component: cli
Version: mainline
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Amar Tumballi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-23 06:15 UTC by Amar Tumballi
Modified: 2015-12-01 16:45 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:


Attachments (Terms of Use)

Description Vijay Bellur 2010-09-23 04:15:25 UTC
PATCH: http://patches.gluster.com/patch/4939 in master (gluster cli: handle case of no brick given in log locate/rotate)

Comment 1 Amar Tumballi 2010-09-23 06:15:04 UTC
Usage: volume log locate <VOLNAME> [BRICK]

Even though BRICK here is optional, if its not given, gluster command line segfaults.

root@supernova:~# gluster volume log locate test 
Segmentation fault (core dumped)
root@supernova:~# gluster volume log locate test test:/okpa 
log file location: /var/log/test
root@supernova:~# gluster volume log rotate test
Segmentation fault (core dumped)
root@supernova:~# gluster volume log rotate test test:/okpa 
log rotate successful


Crash Backtrace:

Core was generated by `gluster volume log locate test'.
Program terminated with signal 11, Segmentation fault.
#0  __strchr_sse2 () at ../sysdeps/x86_64/multiarch/../strchr.S:33
33	../sysdeps/x86_64/multiarch/../strchr.S: No such file or directory.
	in ../sysdeps/x86_64/multiarch/../strchr.S
(gdb) bt
#0  __strchr_sse2 () at ../sysdeps/x86_64/multiarch/../strchr.S:33
#1  0x0000000000412e3d in cli_cmd_log_locate_parse (words=0x7fffbdee7cb0, wordcount=4, 
    options=0x7f48e3745dd0) at ../../../cli/src/cli-cmd-parser.c:900
#2  0x000000000040a749 in cli_cmd_log_locate_cbk (state=0x7fffbdee7af0, word=0x9722a0, 
    words=0x7fffbdee7cb0, wordcount=4) at ../../../cli/src/cli-cmd-volume.c:738
#3  0x0000000000408264 in cli_cmd_process (state=0x7fffbdee7af0, argc=4, 
    argv=0x7fffbdee7cb0) at ../../../cli/src/cli-cmd.c:114
#4  0x0000000000407d97 in cli_batch (d=0x7fffbdee7af0) at ../../../cli/src/input.c:44
#5  0x00007f48e56869ca in start_thread (arg=<value optimized out>)
    at pthread_create.c:300
#6  0x00007f48e53e372d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()
(gdb) up
#1  0x0000000000412e3d in cli_cmd_log_locate_parse (words=0x7fffbdee7cb0, wordcount=4, 
    options=0x7f48e3745dd0) at ../../../cli/src/cli-cmd-parser.c:900
900	        delimiter = strchr (words[4], ':');
(gdb) p words
$1 = (const char **) 0x7fffbdee7cb0
(gdb) p words[4]
$2 = 0x0
(gdb) p words[3]
$3 = 0x7fffbdee994f "test"
(gdb) p words[2]
$4 = 0x7fffbdee9948 "locate"


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