Bug 1744874 - interrupts leak memory
Summary: interrupts leak memory
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: fuse
Version: 7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On: 1728047
Blocks: 1734423 1753571
TreeView+ depends on / blocked
 
Reported: 2019-08-23 04:59 UTC by Nithya Balachandran
Modified: 2019-09-19 10:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1728047
: 1753571 (view as bug list)
Environment:
Last Closed: 2019-08-27 14:14:12 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 23285 0 None Merged fuse: add missing GF_FREE to fuse_interrupt 2019-08-27 14:14:11 UTC

Description Nithya Balachandran 2019-08-23 04:59:48 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-08 22:11:10 UTC ---

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 09:10:00 UTC ---

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 16:46:43 UTC ---

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

--- Additional comment from Worker Ant on 2019-08-22 11:13:14 UTC ---

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

Comment 1 Worker Ant 2019-08-23 05:03:17 UTC
REVIEW: https://review.gluster.org/23285 (fuse: add missing GF_FREE to fuse_interrupt) posted (#2) for review on release-7 by N Balachandran

Comment 2 Worker Ant 2019-08-27 14:14:12 UTC
REVIEW: https://review.gluster.org/23285 (fuse: add missing GF_FREE to fuse_interrupt) merged (#3) on release-7 by N Balachandran


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