glusterfs
glusterfs copied to clipboard
MemoryLeak in Glusterfs
Description of problem:
MemoryLeak happens when executing command gluster volume status all detail.
The exact command to reproduce the issue:
- setup a 10-node testing network.
- remove some nodes in the network by command
gluster delete probe IP. - check gluster volume status by command
gluster volume status all detail.
The full output of the command that failed:
root@gluster1:~# gluster volume status all detail
Status of volume: grid-fuzz
------------------------------------------------------------------------------
Brick : Brick 192.168.4.251:/data/brick1
TCP Port : N/A
RDMA Port : N/A
Online : N
Pid : N/A
File System : xfs
Device : /dev/mapper/ubuntu--vg-sda5
Mount Options : rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota
Inode Size : 512
Disk Space Free : 392.2GB
Total Disk Space : 397.8GB
Inode Count : 208664576
Free Inodes : 208658696
------------------------------------------------------------------------------
Brick : Brick 192.168.4.253:/data/brick1
TCP Port : N/A
RDMA Port : N/A
Online : N
Pid : N/A
File System : xfs
Device : /dev/mapper/ubuntu--vg-sda5
Mount Options : rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota
Inode Size : 512
Disk Space Free : 391.8GB
Total Disk Space : 397.8GB
Inode Count : 208664576
Free Inodes : 208658801
=================================================================
==2756==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 72 byte(s) in 2 object(s) allocated from:
#0 0x7fc419596887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x7fc41926812a in __gf_malloc (/usr/local/lib/libglusterfs.so.0+0x11212a)
#2 0x7fc4192684d4 in gf_vasprintf (/usr/local/lib/libglusterfs.so.0+0x1124d4)
#3 0x7fc4192686fc in gf_asprintf (/usr/local/lib/libglusterfs.so.0+0x1126fc)
#4 0x7fc4191fa766 in gf_uint64_2human_readable (/usr/local/lib/libglusterfs.so.0+0xa4766)
#5 0x56022a5e189f in cli_get_detail_status (/usr/local/sbin/gluster+0x5d89f)
#6 0x56022a6220d2 in gf_cli_status_cbk (/usr/local/sbin/gluster+0x9e0d2)
#7 0x7fc41900ac01 in rpc_clnt_handle_reply (/usr/local/lib/libgfrpc.so.0+0x2fc01)
#8 0x7fc41900b584 in rpc_clnt_notify (/usr/local/lib/libgfrpc.so.0+0x30584)
#9 0x7fc419001f2d in rpc_transport_notify (/usr/local/lib/libgfrpc.so.0+0x26f2d)
#10 0x7fc4135cf07a in socket_event_poll_in_async (/usr/local/lib/glusterfs/12dev/rpc-transport/socket.so+0x2107a)
#11 0x7fc4135bbed4 in gf_async (/usr/local/lib/glusterfs/12dev/rpc-transport/socket.so+0xded4)
#12 0x7fc4135cf4cd in socket_event_poll_in (/usr/local/lib/glusterfs/12dev/rpc-transport/socket.so+0x214cd)
#13 0x7fc4135d18ee in socket_event_handler (/usr/local/lib/glusterfs/12dev/rpc-transport/socket.so+0x238ee)
#14 0x7fc419306661 in event_dispatch_epoll_handler (/usr/local/lib/libglusterfs.so.0+0x1b0661)
#15 0x7fc4193072d9 in event_dispatch_epoll_worker (/usr/local/lib/libglusterfs.so.0+0x1b12d9)
#16 0x7fc4185f1ac2 (/lib/x86_64-linux-gnu/libc.so.6+0x94ac2)
Direct leak of 72 byte(s) in 2 object(s) allocated from:
#0 0x7fc419596887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x7fc41926812a in __gf_malloc (/usr/local/lib/libglusterfs.so.0+0x11212a)
#2 0x7fc4192684d4 in gf_vasprintf (/usr/local/lib/libglusterfs.so.0+0x1124d4)
#3 0x7fc4192686fc in gf_asprintf (/usr/local/lib/libglusterfs.so.0+0x1126fc)
#4 0x7fc4191fa766 in gf_uint64_2human_readable (/usr/local/lib/libglusterfs.so.0+0xa4766)
#5 0x56022a5e17d7 in cli_get_detail_status (/usr/local/sbin/gluster+0x5d7d7)
#6 0x56022a6220d2 in gf_cli_status_cbk (/usr/local/sbin/gluster+0x9e0d2)
#7 0x7fc41900ac01 in rpc_clnt_handle_reply (/usr/local/lib/libgfrpc.so.0+0x2fc01)
#8 0x7fc41900b584 in rpc_clnt_notify (/usr/local/lib/libgfrpc.so.0+0x30584)
#9 0x7fc419001f2d in rpc_transport_notify (/usr/local/lib/libgfrpc.so.0+0x26f2d)
#10 0x7fc4135cf07a in socket_event_poll_in_async (/usr/local/lib/glusterfs/12dev/rpc-transport/socket.so+0x2107a)
#11 0x7fc4135bbed4 in gf_async (/usr/local/lib/glusterfs/12dev/rpc-transport/socket.so+0xded4)
#12 0x7fc4135cf4cd in socket_event_poll_in (/usr/local/lib/glusterfs/12dev/rpc-transport/socket.so+0x214cd)
#13 0x7fc4135d18ee in socket_event_handler (/usr/local/lib/glusterfs/12dev/rpc-transport/socket.so+0x238ee)
#14 0x7fc419306661 in event_dispatch_epoll_handler (/usr/local/lib/libglusterfs.so.0+0x1b0661)
#15 0x7fc4193072d9 in event_dispatch_epoll_worker (/usr/local/lib/libglusterfs.so.0+0x1b12d9)
#16 0x7fc4185f1ac2 (/lib/x86_64-linux-gnu/libc.so.6+0x94ac2)
SUMMARY: AddressSanitizer: 144 byte(s) leaked in 4 allocation(s).
Expected results: Volume detail info