Bug 1653250 - memory-leak in crypt xlator (glusterfs client)
Summary: memory-leak in crypt xlator (glusterfs client)
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: GlusterFS
Classification: Community
Component: encryption-xlator
Version: 4.1
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-26 11:27 UTC by evangelos
Modified: 2019-05-27 16:19 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-05-27 16:19:29 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description evangelos 2018-11-26 11:27:55 UTC
Description of problem:
memory-leak in crypt xlator (glusterfs client)

Version-Release number of selected component (if applicable):
3.4

How reproducible:
create/delete large amounts of files

Steps to Reproduce:
1.
2.
3.

Actual results:
I created ~70K files and memory (RSS) started up from 435208 to 1663336 then rm and leave only 10K in the dir but RSS remained.

Expected results:
RSS should decrease after file deletion.

Additional info:
From the client statedumps I see that inode cache is released 
[encryption/crypt.oam_enc-crypt - usage-type gf_crypt_mt_inode memusage]
size=9293896
num_allocs=11279
max_size=64594184
max_num_allocs=78391
total_allocs=78560

but local allocations seem still present...

after deletion:
[encryption/crypt.oam_enc-crypt - usage-type gf_crypt_mt_local memusage]
size=547946008
num_allocs=678151
max_size=547946008
max_num_allocs=678151
total_allocs=678151

As i have seen in crypt xlator GF_CALLOC allocates memory from gf_crypt_mt_local pool.
local = GF_CALLOC (sizeof (*local), 1, gf_crypt_mt_local);

but in FRAME_DESTROY only mem_put(local) is called thus gf_common_mt_mem_pool is released which results of errors like 0-mem-pool: mem-pool ptr is NULL from glusterfs client.

Comment 1 Amar Tumballi 2019-05-27 16:19:29 UTC
with latest glusterfs builds, crypt xlator is no more loaded in graph, and is present in codebase.


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