[asterisk-bugs] [JIRA] (ASTERISK-24768) res_timing_pthread: file descriptor leak

Matt Jordan (JIRA) noreply at issues.asterisk.org
Sun Feb 8 21:25:34 CST 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-24768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=224812#comment-224812 ] 

Matt Jordan commented on ASTERISK-24768:
----------------------------------------

[~smurfix]: Thanks for attaching the patch.

Looking at it, we don't actually need to explicitly lock the {{pthread_timers}} container in that close function, as ao2_unlink will explicitly lock the container. It's probably okay to still lock the {{timing_thread}} - if nothing else, it won't be explicitly harmful, and unlinking the item from the container will race with the call to {{ao2_container_count}}.

As it is, I'd be happy to commit the patch with that small tweak.

> res_timing_pthread: file descriptor leak
> ----------------------------------------
>
>                 Key: ASTERISK-24768
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24768
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_timing_pthread
>    Affects Versions: 13.2.0
>         Environment: Current Debian (jessie/testing), i386, up-to-date
>            Reporter: Matthias Urlichs
>            Assignee: Matthias Urlichs
>         Attachments: timer.patch
>
>
> Pthread timers are never deallocated because their link into the pthread_timers chain is never undone.
> This causes a file descriptor leak (at least two per incoming call).
> The locking in this patch probably needs review; the ao2_unlink() call does not. :-P
> \[Edit:\] *Inline patch removed*



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list