Bug 763411 - (GLUSTER-1679) gluster volume log locate/rotate segfault
gluster volume log locate/rotate segfault
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: cli (Show other bugs)
mainline
All Linux
low Severity high
: ---
: ---
Assigned To: Amar Tumballi
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-23 02:15 EDT by Amar Tumballi
Modified: 2015-12-01 11:45 EST (History)
2 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Vijay Bellur 2010-09-23 00:15:25 EDT
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 02:15:04 EDT
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.