Bug 1734423 - interrupts leak memory
Summary: interrupts leak memory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: fuse
Version: rhgs-3.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: RHGS 3.5.0
Assignee: Csaba Henk
QA Contact: Nag Pavan Chilakam
URL:
Whiteboard:
Depends On: 1728047 1744874 1753571
Blocks: 1696809
TreeView+ depends on / blocked
 
Reported: 2019-07-30 14:00 UTC by Csaba Henk
Modified: 2019-10-30 12:23 UTC (History)
8 users (show)

Fixed In Version: glusterfs-6.0-11
Doc Type: Bug Fix
Doc Text:
Previously, dynamically allocated memory was not freed correctly, which led to an increase in memory consumption and out-of-memory management on gluster clients. Memory is now freed correctly so that memory overruns do not occur.
Clone Of: 1728047
Environment:
Last Closed: 2019-10-30 12:22:40 UTC
Embargoed:
csaba: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2019:3249 0 None None None 2019-10-30 12:23:03 UTC

Description Csaba Henk 2019-07-30 14:00:51 UTC
+++ This bug was initially created as a clone of Bug #1728047 +++

Description of problem:

When the glusterfs fuse client gets an INTERRUPT message (ie. a process gets SIGINT while in a syscall to the filesystem), not all data allocated by the handler code is freed.

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

>= 6.0

The issue appears with the introduction of the interrupt handling framework.

How reproducible:

Always

Steps to Reproduce:
1. Compile the test helper of the tests/features/interrupt.t test, open_and_sleep.c:

  $ gcc -o open_and_sleep tests/features/open_and_sleep.c

2. Mount a glusterfs volume 
3. Run the command used in tests/features/interrupt.t in a loop against some file in the mount:

   $ while :; do ./open_and_sleep <SOME-FILE> | { sleep 0.1; xargs -n1 kill -INT; }
3. Take statedumps at regular intervals and check gf_fuse_mt_iov_base memusage:

   # grep -A5 gf_fuse_mt_iov_base <STATEDUMP>

Actual results:

Values of size and num_alloc fields monotonously grow with time across statedumps.

Expected results:

Values of size and num_alloc fields stay low across statedumps.

--- Additional comment from Csaba Henk on 2019-07-09 00:11:10 CEST ---

Command in reproduction step 3. is incomplete. It should be:

  $ while :; do ./open_and_sleep <SOME-FILE> | { sleep 0.1; xargs -n1 kill -INT; }; done

Improved version which also displays a counter:

  $ i=1; while :; do echo -en "\r$i  "; ./open_and_sleep <SOME-FILE> | { sleep 0.1; xargs -n1 kill -INT; }; i=$(($i+1)); done

--- Additional comment from Worker Ant on 2019-07-09 11:10:00 CEST ---

REVIEW: https://review.gluster.org/23016 (fuse: add missing GF_FREE to fuse_interrupt) posted (#1) for review on master by Csaba Henk

--- Additional comment from Worker Ant on 2019-07-25 18:46:43 CEST ---

REVIEW: https://review.gluster.org/23016 (fuse: add missing GF_FREE to fuse_interrupt) merged (#4) on master by Amar Tumballi

Comment 7 Prashant Dhange 2019-08-29 04:00:50 UTC
*** Bug 1737674 has been marked as a duplicate of this bug. ***

Comment 14 errata-xmlrpc 2019-10-30 12:22:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:3249


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