Bug 764377 (GLUSTER-2645)

Summary: volume top write-perf results in memory corruption
Product: [Community] GlusterFS Reporter: M S Vishwanath Bhat <vbhat>
Component: unclassifiedAssignee: shishir gowda <sgowda>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: mainlineCC: gluster-bugs, mzywusko, nsathyan
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
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: --- Target Upstream Version:

Description M S Vishwanath Bhat 2011-04-01 08:22:07 UTC
I ran volume top write-perf bs 1024 count 100 and it resulted in memory corruption core dumped. I got the following output

[root@FC-2 vishwa]# gluster volume top hosdu write-perf bs 1024 count 100
gluster: mem-pool.c:270: __gf_free: Assertion `0' failed.
Aborted (core dumped)

Comment 1 Vijay Bellur 2011-04-01 10:08:36 UTC
PATCH: http://patches.gluster.com/patch/6685 in master (Replace strdup call to gf_strdup as GF_FREE is being called)

Comment 2 M S Vishwanath Bhat 2011-04-08 14:52:37 UTC
Now volume top write-perf is not resulting in memory corruption. Also passing block 0 and count 0 doesn't result in 'nan' being listed.

root@tortuga:/disk1# gluster volume top hosdu write-perf bs 0 count 100
block size should be an integer greater than zero
Usage: volume top <VOLNAME> {[open|read|write|opendir|readdir] |[read-perf|write-perf bs <size> count <count>]}  [brick <brick>] [list-cnt <count>]

root@tortuga:/disk1# gluster volume top hosdu write-perf bs 1024 count 0
count should be an integer greater zero
Usage: volume top <VOLNAME> {[open|read|write|opendir|readdir] |[read-perf|write-perf bs <size> count <count>]}  [brick <brick>] [list-cnt <count>]

Working as expected.