[asterisk-bugs] [JIRA] (ASTERISK-27299) Asterisk Hangs with Bad file descriptor on read()

Sean Bright (JIRA) noreply at issues.asterisk.org
Thu Dec 7 08:42:08 CST 2017


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

Sean Bright commented on ASTERISK-27299:
----------------------------------------

[~aaron], the rationale for the change was detailed in the review that you linked. The change from {{sizeof(char)}} to {{sizeof(uint64_t)}} was made due to requirements of [the {{eventfd}} API|http://man7.org/linux/man-pages/man2/eventfd.2.html].

File descriptors do not magically lose their {{O_NONBLOCK}} flag, so if that is actually what is happening here, there is code elsewhere in Asterisk that is erroneously doing it. The correct solution is to find out when, where, and why that is happening and fix it, not to roll back in a hack.

If putting that code block back in your code fixes the issue, that's great, but I don't think we should be doing that for all users.

Have you actually confirmed that the FD is losing the {{O_NONBLOCK}} flag or are you just assuming?

> Asterisk Hangs with Bad file descriptor on read()
> -------------------------------------------------
>
>                 Key: ASTERISK-27299
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27299
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Bridges/bridge_native_rtp
>    Affects Versions: 13.17.1
>         Environment: Ubuntu 16.04 with asterisk 13.17.1 
>            Reporter: Abhay Gupta
>            Assignee: Unassigned
>         Attachments: 11.log, 12.log, 3858.threads.log, latestGDB, output2.txt, sip-3-0002949d.log, taskprocessSterl.txt
>
>
> Asterisk stops responding and only have errors of alertpipe 
> {noformat}
> Sep 26 15:36:05] WARNING[3133] bridge_channel.c: Weird.  No frame from bridge for Local/agentmanual at asterisk-00013cae;1 to process?
> [Sep 26 15:36:05] WARNING[3133] alertpipe.c: read() failed: Bad file descriptor
> [Sep 26 15:36:05] WARNING[3133] bridge_channel.c: Weird.  No frame from bridge for Local/agentmanual at asterisk-00013cae;1 to process?
> [Sep 26 15:36:05] WARNING[3133] alertpipe.c: read() failed: Bad file descriptor
> [Sep 26 15:36:05] WARNING[3133] bridge_channel.c: Weird.  No frame from bridge for Local/agentmanual at asterisk-00013cae;1 to process?
> [Sep 26 15:36:05] WARNING[3133] alertpipe.c: read() failed: Bad file descriptor
> [Sep 26 15:36:05] WARNING[3133] bridge_channel.c: Weird.  No frame from bridge for Local/agentmanual at asterisk-00013cae;1 to process?
> {noformat}



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



More information about the asterisk-bugs mailing list