Bug 1314622 - [RHEL-7] gluster-swift: During GETs, duplicate fd leaks for files that need Etag recomputed
[RHEL-7] gluster-swift: During GETs, duplicate fd leaks for files that need E...
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: gluster-swift (Show other bugs)
3.1
All All
high Severity high
: ---
: RHGS 3.1.3
Assigned To: Prashanth Pai
surabhi
: ZStream
Depends On:
Blocks: 1299184 1328443
  Show dependency treegraph
 
Reported: 2016-03-04 00:47 EST by Prashanth Pai
Modified: 2016-06-23 01:31 EDT (History)
5 users (show)

See Also:
Fixed In Version: swiftonfile-2.3.0-0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1328443 (view as bug list)
Environment:
Last Closed: 2016-06-23 01:31:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Prashanth Pai 2016-03-04 00:47:54 EST
Description of problem:

A fd was not bring closed after it was duplicated. This code path can
be easily hit when doing a GET on a file that needs Etag (md5sum) to
be recalculated.

# echo "aaaaaaaaaaa" > /mnt/gluster-object/test/c1/f6

# curl -i http://localhost:8080/v1/AUTH_test/c1/f6 -X GET

# strace -ff -p 10245 -e open,close,dup

    Process 10245 attached with 21 threads
    [pid 10245] open("/mnt/gluster-object/test/c1/f6", O_RDONLY|O_CLOEXEC) = 7
    [pid 10245] dup(7)                      = 14
    [pid 10245] close(7)                    = 0

# ls -l /proc/10245/fd | grep f6

    lr-x------. 1 root root 64 Mar  3 16:38 14 -> /mnt/gluster-object/test/c1/f6
Comment 1 Prashanth Pai 2016-03-04 00:50:58 EST
Upstream change on review: http://review.gluster.org/13593
Comment 4 Prashanth Pai 2016-03-10 04:11:45 EST
Upstream change merged: http://review.gluster.org/#/c/13593/
Comment 9 surabhi 2016-04-25 05:20:41 EDT
Followed following steps :

1. PUT an object with some data :
curl -i -d "swiftonfile" http://localhost:8080/v1/AUTH_test/c1/file1 -X PUT

2. curl -i http://localhost:8080/v1/AUTH_test/c1/file1 -X GET

3. Observe the process by attaching to strace:

Process 19074 attached with 21 threads
[pid 19074] open("/mnt/gluster-object/test/c1/file1", O_RDONLY|O_CLOEXEC) = 10
[pid 19074] close(10)                   = 0
[pid 19074] close(6)                    = 0


4. # echo "aaaaaaaaaaa" > /mnt/gluster-object/test/c1/file1

[pid 19074] open("/mnt/gluster-object/test/c1/file1", O_RDONLY|O_CLOEXEC) = 10
[pid 19074] dup(10)                     = 12
[pid 19074] close(12)                   = 0
[pid 19074] close(10)                   = 0

5. # curl -i http://localhost:8080/v1/AUTH_test/c1/file1 -X GET

Process 19074 attached with 21 threads
[pid 19074] open("/mnt/gluster-object/test/c1/file1", O_RDONLY|O_CLOEXEC) = 10
[pid 19074] close(10)                   = 0
[pid 19074] close(6)                    = 0
[pid 19074] open("/mnt/gluster-object/test/c1/file1", O_RDONLY|O_CLOEXEC) = 10
[pid 19074] dup(10)                     = 12
[pid 19074] close(12)                   = 0
[pid 19074] close(10)                   = 0
[pid 19074] close(6)                    = 0

ls -l /proc/19074/fd | grep file1

There is no fd leak observed on open , dup and also verified there is close on each open. Marking the BZ to verified.

Versions:
swiftonfile-2.3.0-2.el7rhgs.noarch
glusterfs-3.7.9-1.el7rhgs.x86_64
Comment 11 errata-xmlrpc 2016-06-23 01:31:38 EDT
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-2016:1289

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