Bug 996324 - possible fdleak on unlink
possible fdleak on unlink
Status: CLOSED DUPLICATE of bug 991622
Product: GlusterFS
Classification: Community
Component: core (Show other bugs)
3.4.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Amar Tumballi
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-12 20:30 EDT by Lukas Bezdicka
Modified: 2015-12-01 11:45 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-09 04:08:40 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 Lukas Bezdicka 2013-08-12 20:30:31 EDT
Description of problem:
Possible fdleak on client which ends up with server having tons of deleted fds open

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

How reproducible:
can reproduce only on production :(

Steps to Reproduce:
1.
Actual program was doing:

20529 02:01:07 close(6)                 = 0
20529 02:01:07 close(10)                = 0
20529 02:01:07 close(9)                 = 0
20529 02:01:07 open("/zverinec/3T/Kackac/Kackac/Kackac/mac.csv.ids", O_RDONLY) = 5
20529 02:01:07 close(5)                 = 0
20529 02:01:07 unlink("/zverinec/3T/Kackac/Kackac/Kackac/mac.csv.ids") = 0
20529 02:01:07 open("/zverinec/3T/Kackac/Kackac/Kackac/kac.csv.ids", O_RDONLY) = 5
20529 02:01:07 close(5)                 = 0
20529 02:01:07 unlink("/zverinec/3T/Kackac/Kackac/Kackac/kac.csv.ids") = 0
20529 02:01:07 open("/zverinec/3T/Kackac/Kackac/Kackac/kac.csv", O_RDONLY) = 5
20529 02:01:07 open("/zverinec/3T/Kackac/Kackac/Kackac/kac.csv.unique", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 6
20529 02:01:07 close(6)                 = 0
20529 02:01:07 close(5)                 = 0
20529 02:01:07 close(9)                 = 0
20529 02:01:07 close(6)                 = 0

2.
Debug log from gluster:

[2013-08-13 00:01:07.587908] D [afr-common.c:1117:afr_lookup_build_response_params] 0-Kackac-replicate-1: Building lookup response from 0
[2013-08-13 00:01:07.588305] D [afr-transaction.c:1094:afr_post_nonblocking_inodelk_cbk] 0-Kackac-replicate-0: Non blocking inodelks done. Proceeding to FOP
[2013-08-13 00:01:07.588332] D [afr-transaction.c:1094:afr_post_nonblocking_inodelk_cbk] 0-Kackac-replicate-0: Non blocking inodelks done. Proceeding to FOP
[2013-08-13 00:01:07.589550] D [afr-lk-common.c:447:transaction_lk_op] 0-Kackac-replicate-0: lk op is for a transaction
[2013-08-13 00:01:07.589615] D [afr-lk-common.c:447:transaction_lk_op] 0-Kackac-replicate-0: lk op is for a transaction
[2013-08-13 00:01:07.591956] D [afr-common.c:131:afr_lookup_xattr_req_prepare] 0-Kackac-replicate-0: /3T/Kackac/Kackac/Kackac/kac.csv.ids: failed to get the gfid from dict
[2013-08-13 00:01:07.592524] D [afr-transaction.c:1094:afr_post_nonblocking_inodelk_cbk] 0-Kackac-replicate-0: Non blocking inodelks done. Proceeding to FOP
[2013-08-13 00:01:07.593284] D [afr-lk-common.c:447:transaction_lk_op] 0-Kackac-replicate-0: lk op is for a transaction
[2013-08-13 00:01:07.595203] D [afr-self-heal-common.c:138:afr_sh_print_pending_matrix] 0-Kackac-replicate-0: pending_matrix: [ 0 0 ]
[2013-08-13 00:01:07.595227] D [afr-self-heal-common.c:138:afr_sh_print_pending_matrix] 0-Kackac-replicate-0: pending_matrix: [ 0 0 ]
[2013-08-13 00:01:07.595240] D [afr-self-heal-common.c:887:afr_mark_sources] 0-Kackac-replicate-0: Number of sources: 0
[2013-08-13 00:01:07.595251] D [afr-self-heal-data.c:825:afr_lookup_select_read_child_by_txn_type] 0-Kackac-replicate-0: returning read_child: 1
[2013-08-13 00:01:07.595264] D [afr-common.c:1380:afr_lookup_select_read_child] 0-Kackac-replicate-0: Source selected as 1 for /3T/Kackac/Kackac/Kackac/kac.csv.ids
[2013-08-13 00:01:07.595279] D [afr-common.c:1117:afr_lookup_build_response_params] 0-Kackac-replicate-0: Building lookup response from 1
[2013-08-13 00:01:07.595662] D [afr-transaction.c:1094:afr_post_nonblocking_inodelk_cbk] 0-Kackac-replicate-0: Non blocking inodelks done. Proceeding to FOP
[2013-08-13 00:01:07.597914] D [afr-lk-common.c:447:transaction_lk_op] 0-Kackac-replicate-0: lk op is for a transaction
[2013-08-13 00:01:07.598040] D [afr-transaction.c:1144:afr_post_nonblocking_entrylk_cbk] 0-Kackac-replicate-1: Non blocking entrylks done. Proceeding to FOP
[2013-08-13 00:01:07.598993] D [afr-transaction.c:1094:afr_post_nonblocking_inodelk_cbk] 0-Kackac-replicate-0: Non blocking inodelks done. Proceeding to FOP
[2013-08-13 00:01:07.599614] D [afr-lk-common.c:447:transaction_lk_op] 0-Kackac-replicate-0: lk op is for a transaction
[2013-08-13 00:01:07.600482] D [afr-lk-common.c:447:transaction_lk_op] 0-Kackac-replicate-1: lk op is for a transaction
[2013-08-13 00:01:07.600601] D [afr-transaction.c:1094:afr_post_nonblocking_inodelk_cbk] 0-Kackac-replicate-0: Non blocking inodelks done. Proceeding to FOP
[2013-08-13 00:01:07.601265] D [afr-lk-common.c:447:transaction_lk_op] 0-Kackac-replicate-0: lk op is for a transaction
[2013-08-13 00:01:07.602095] D [afr-transaction.c:1094:afr_post_nonblocking_inodelk_cbk] 0-Kackac-replicate-0: Non blocking inodelks done. Proceeding to FOP
[2013-08-13 00:01:07.604166] D [afr-lk-common.c:447:transaction_lk_op] 0-Kackac-replicate-0: lk op is for a transaction
[2013-08-13 00:01:07.605464] D [afr-transaction.c:1094:afr_post_nonblocking_inodelk_cbk] 0-Kackac-replicate-0: Non blocking inodelks done. Proceeding to FOP
[2013-08-13 00:01:07.606096] D [afr-lk-common.c:447:transaction_lk_op] 0-Kackac-replicate-0: lk op is for a transaction
[2013-08-13 00:01:07.609570] D [afr-transaction.c:1094:afr_post_nonblocking_inodelk_cbk] 0-Kackac-replicate-0: Non blocking inodelks done. Proceeding to FOP


3.
Leaked fd on server:
glusterfs 11317    root *076r      REG                9,0    348910   52430957 /male/bestie/3T/Kackac/Kackac/Kackac/kac.csv.ids (deleted)

Actual results:
leaking fds

Expected results:
no leaking fds
Comment 1 Lukas Bezdicka 2013-09-09 04:08:40 EDT
This bug is duplicate of 991622 but I strongly suggest backporting fix to 3.4.*

*** This bug has been marked as a duplicate of bug 991622 ***

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