[asterisk-bugs] [JIRA] (ASTERISK-25251) getifaddrs() blocks infinitely in PJSIP
Gergely Dömsödi (JIRA)
noreply at issues.asterisk.org
Mon Jul 20 01:19:33 CDT 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-25251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226947#comment-226947 ]
Gergely Dömsödi edited comment on ASTERISK-25251 at 7/20/15 1:19 AM:
---------------------------------------------------------------------
I think I managed to solve to problem, but I still can't really decide if it was an application or a kernel bug.
Since You wrote that Asterisk is still locking in a DNS query, I updated {{nsswitch.conf}} so for DNS queries, only {{files}} and {{dns}} were used, but no DNS servers were configured (I disabled {{myhostname}} and {{mymachines}}). The issue seemed to disappear, but there were still some locked threads appearing after some use, which were infinitely blocked in a {{recvmsg()}} called from a {{netlink_request()}} and eventually a {{getifaddrs()}}. When I realized this, I googled a bit for "infinite block getifaddrs()" and alike, and found some other bugreports involving multithreaded apps and {{getifaddrs()}}.
Next, I updated the kernel from 4.0.4 to 4.0.7, and the locking threads were gone, even if I enabled DNS queries again, asterisk is operating normally.
was (Author: doome):
I think I managed to solve to problem, but I still can't really decide if it was an application or a kernel bug.
Since You wrote that Asterisk is still locking in a DNS query, I updated {{nsswitch.conf}} so for DNS queries, only {{files}} and {{dns}} were used, but no DNS servers were configured (I disabled {{myhostname}} and {{mymachines}}). The issue seemed to disappear, but there were still some locked threads appearing after some use, which were infinitely blocked in a {{recvmsg()}} called from a {{netlink_request()}} and eventually a {{getifaddr()}}. When I realized this, I googled a bit for "infinite block getifaddr()" and alike, and found some other bugreports involving multithreaded apps and {{getifaddr()}}.
Next, I updated the kernel from 4.0.4 to 4.0.7, and the locking threads were gone, even if I enabled DNS queries again, asterisk is operating normally.
> getifaddrs() blocks infinitely in PJSIP
> ---------------------------------------
>
> Key: ASTERISK-25251
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-25251
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_pjsip
> Affects Versions: 13.1.1, 13.3.2, 13.4.0
> Environment: Fedora 22
> Reporter: Gergely Dömsödi
> Assignee: Rusty Newton
> Attachments: bt-nodns.txt, bt.txt, bt.txt, fd.txt, locks-nodns.txt, locks.txt, taskprocessors.txt, threads.txt
>
>
> Using PJSIP, after about 10-20 minutes of SIP traffic between two PJSIP peers, a deadlock occurs and Asterisk cannot serve SIP traffic anymore. Incoming INVITES can be seen with a tcpdump, but it is not even visible in pjsip log.
> The issue is reproducible with both the "vanilla" asterisk package in Fedora 22 (13.1.1), with the package currently in updates-testing (13.3.2), and a custom-built 13.4.0. Tried with PJSIP 2.3 from Fedora and a custom built 2.4, both were affected.
> When in the deadlock, PJSIP commands continue to work (pjsip show *), but asterisk cannot be stopped, core stop now just returns, but nothing happens. Only SIGKILL can pull out asterisk from this state.
> Attached outputs and backtraces are from the custom built 13.4.0, with PJSIP 2.4.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list