[
https://issues.apache.org/jira/browse/TS-4635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15364558#comment-15364558
]
ASF GitHub Bot commented on TS-4635:
------------------------------------
GitHub user jpeach opened a pull request:
https://github.com/apache/trafficserver/pull/788
TS-4635: Fix RefCountCacheSerializer file descriptor leaks.
Fix various file descriptor leaks on the RefCountCacheSerializer error
path. Move RefCountCacheSerializer to a separate header so that it only gets
included in the one place that needs it.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jpeach/trafficserver fix/4635
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/788.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #788
----
commit bf84d640e0fa5fb3720daade20e49109f6df4e80
Author: James Peach <[email protected]>
Date: 2016-07-06T16:01:32Z
TS-4635: Fix RefCountCacheSerializer file descriptor error path.
Simplify RefCountCacheSerializer::finalize_sync() and consistently
propagate the error to the caller as -errno so we can log any errors
in the caller. Retail the open file descriptor on error.
Close the open file descriptor and deliver the completion event in
the serializer destructor. This handles the error case.
commit 2c4b35287f070cb8c06cb470a0d6d0a0c5dd556c
Author: James Peach <[email protected]>
Date: 2016-07-06T16:20:35Z
TS-4635: Move RefCountCacheSerializer to a separate header.
----
> fix HostDB file descriptor handling
> -----------------------------------
>
> Key: TS-4635
> URL: https://issues.apache.org/jira/browse/TS-4635
> Project: Traffic Server
> Issue Type: Bug
> Components: HostDB
> Reporter: James Peach
> Assignee: James Peach
>
> Various file descriptor handling bugs syncing HostDB.
> 1. RefCountCacheSerializer::fd is initialized to 0 rather than -1
> 2. RefCountCacheSerializer::initialize_storage checks for fd <= 0 rather than
> -1
> 3. Any time the RefCountCacheSerializer is deleted it leaks the file
> descripto.
> 4. Leaks on error paths in RefCountCacheSerializer::finalize_sync()
> There is a fd leak somewhere:
> {noformat}
> [ET_NET 23444 nmadmin 32u REG 202,1 12 524318
> /n/trafficserver/var/host.db.syncing
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)