Memory leak in free_state
by Pradeep Thomas
Hello,
In the latest version of Ganesha (5.5.3), it looks like free_state operation in FSALs don't actually free the memory. With a simple "open; read; close" loop, I see high memory usage with VFS. Shouldn't vfs_free_state free the state pointer Or is it supposed to be free'd later?
Something like this works. But not sure if that is the right thing to do. The same problem is there in all FSALs.
void vfs_free_state(struct fsal_export *exp_hdl, struct state_t *state)
{
struct vfs_state_fd *state_fd = container_of(state, struct vfs_state_fd,
state);
struct vfs_fd *my_fd = &state_fd->vfs_fd;
destroy_fsal_fd(&my_fd->fsal_fd);
gsh_free(state_fd);
}
$ ps -C ganesha.nfsd -o etime,rsz
ELAPSED RSZ
07:11 455348
$ ps -C ganesha.nfsd -o etime,rsz
ELAPSED RSZ
09:19 549524
..
$ ps -C ganesha.nfsd -o etime,rsz
ELAPSED RSZ
32:26 1381800
1 year, 1 month
[M] Change in ...nfs-ganesha[next]: NFSv4+ Server to have limit for Open files per client
by Rojin George (GerritHub)
Rojin George has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1171967?usp=email )
Change subject: NFSv4+ Server to have limit for Open files per client
......................................................................
NFSv4+ Server to have limit for Open files per client
This CR adds in the maximum number of files that could be opened
by a client. One misbehaving client could potentially open multiple
files and exhaust the open FD limit allowed by ganesha's cgroup.
Beyond this limit, client gets denied if it tries to open
too many files.
Change-Id: Idc58a676c1c937312e1dc20bf0581ff6408e6133
Signed-off-by: Rojin George <itsmerojin(a)gmail.com>
---
M src/SAL/nfs4_clientid.c
M src/SAL/nfs4_state.c
M src/config_samples/config.txt
M src/doc/man/ganesha-core-config.rst
M src/include/gsh_config.h
M src/include/sal_data.h
M src/support/nfs_read_conf.c
7 files changed, 43 insertions(+), 8 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/67/1171967/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1171967?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: Idc58a676c1c937312e1dc20bf0581ff6408e6133
Gerrit-Change-Number: 1171967
Gerrit-PatchSet: 1
Gerrit-Owner: Rojin George <itsmerojin(a)gmail.com>
Gerrit-MessageType: newchange
1 year, 1 month
Announce Push of V5.7
by Frank Filz
Branch next
Tag:V5.7
Merge Highlights
* Size inactive DRCs to avoid high memory usage
* ACL: In nfsv4, avoid converting mask into fsal_acl entry
* FSAL: Fix some issues with resolving POSIX filesystems
* CEPH: Fix up cmount_path
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
Contents:
3113f9705 Frank S. Filz V5.7
a336cc41e Xueqian Hu Size inactive DRCs to avoid high memory usage
8443106ce Arnab Tah ACL: In nfsv4, avoid converting mask into fsal_acl entry
1769249fb Martin Schwenke FSAL: Fix some issues with resolving POSIX
filesystems
c817b26e8 Frank S. Filz CEPH: Fix up cmount_path
1 year, 1 month