[asterisk-bugs] [JIRA] (ASTERISK-30198) Error `Too many open files` occurs after about ~8000 calls when using mixmonitor

Peter Fern (JIRA) noreply at issues.asterisk.org
Mon Nov 21 21:54:51 CST 2022


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

Peter Fern commented on ASTERISK-30198:
---------------------------------------

I've added an alternative fix for review based on the recommendations on the original patch. I've checked all the `ast_stream_and_wait` call sites and it looks to me like this change should be safe as none of them appear to call `ast_closestream` without a guard against the stream existing (pretty much everywhere uses `ast_stopstream`, when they actually close the stream at all, which is safe).

Our testing here shows that this resolves the case reported in the original issue, and should resolve any other cases where `ast_stream_and_wait` might be called on a channel that's in a state where the stream cannot complete.

> Error `Too many open files` occurs after about ~8000 calls when using mixmonitor
> --------------------------------------------------------------------------------
>
>                 Key: ASTERISK-30198
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-30198
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_mixmonitor
>    Affects Versions: 19.5.0
>         Environment: Linux debian-buster 4.19.0-21-amd64
>            Reporter: Julien Alie
>            Assignee: Julien Alie
>
> Crash occurs because file descriptors are not freed until all resources are exhausted.  
> This issue happens when mixmonitor is configured to play `beep` on stop (flag P).  When call is hungup before manually stopping mixmonitor, it attempts to play `beep.slin` but will fail and file descriptor for beep will never be released.  
> Current workaround to avoid the issue is to disable the beep on stop (remove flag "P")



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



More information about the asterisk-bugs mailing list