Asterisk UDP ports not freed/ports leaking [ upstream patch available ]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Asterisk |
Fix Released
|
Undecided
|
Unassigned | ||
asterisk (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
root@bird:
Description: Ubuntu 10.04.3 LTS
Release: 10.04
root@bird:
asterisk:
Installed: 1:1.6.2.
Candidate: 1:1.6.2.
Version table:
*** 1:1.6.2.
500 https:/
100 /var/lib/
1:
500 https:/
root@bird:
Linux bird 2.6.32-21-server #32-Ubuntu SMP Fri Apr 16 09:17:34 UTC 2010 x86_64 GNU/Linux
root@bird:
Asterisk 1.6.2.5-0ubuntu1.4 built by buildd @ yellow on a x86_64 running Linux on 2011-07-12 21:40:24 UTC
root@bird:
334
root@bird:
312
root@bird:
Channel Location State Application(Data)
SIP/6039-00000128 (None) Up AppDial((Outgoing Line))
SIP/3422403720-
SIP/7006-00000126 (None) Up AppDial((Outgoing Line))
SIP/3422403720-
4 active channels
3 active calls
171 calls processed
root@bird:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 20
file size (blocks, -f) unlimited
pending signals (-i) 16382
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: asterisk 1:1.6.2.
ProcVersionSign
Uname: Linux 2.6.32-21-server x86_64
Architecture: amd64
Date: Tue Jul 26 13:41:47 2011
ExecutablePath: /usr/sbin/asterisk
InstallationMedia: Ubuntu-Server 10.04 LTS "Lucid Lynx" - Release amd64 (20100427)
ProcEnviron:
PATH=(custom, no user)
SHELL=/bin/sh
SourcePackage: asterisk
Changed in asterisk (Ubuntu): | |
status: | New → Confirmed |
description: | updated |
I believe this bug describes asterisk bug #17255 : /issues. asterisk. org/view. php?id= 17255
https:/
It would seem that after some SIP calls, udp sockets are not closed.
If left running too long, you may see the following in asterisk's log ( a few million times a minute ) :
[2011-08-09 09:20:02.775] ERROR[5081] res_timing_ timerfd. c: Read error: Bad file descriptor timerfd. c: Expected to acknowledge 1 ticks but got 0 instead timerfd. c: Read error: Bad file descriptor timerfd. c: Expected to acknowledge 1 ticks but got 0 instead timerfd. c: Read error: Bad file descriptor timerfd. c: Expected to acknowledge 1 ticks but got 0 instead timerfd. c: Read error: Bad file descriptor timerfd. c: Expected to acknowledge 1 ticks but got 0 instead timerfd. c: Read error: Bad file descriptor timerfd. c: Expected to acknowledge 1 ticks but got 0 instead
[2011-08-09 09:20:02.775] DEBUG[5081] res_timing_
[2011-08-09 09:20:02.775] ERROR[5081] res_timing_
[2011-08-09 09:20:02.775] DEBUG[5081] res_timing_
[2011-08-09 09:20:02.775] ERROR[5081] res_timing_
[2011-08-09 09:20:02.775] DEBUG[5081] res_timing_
[2011-08-09 09:20:02.775] ERROR[5081] res_timing_
[2011-08-09 09:20:02.775] DEBUG[5081] res_timing_
[2011-08-09 09:20:02.775] ERROR[5081] res_timing_
[2011-08-09 09:20:02.775] DEBUG[5081] res_timing_
The resource exhaustion eventually leads to Asterisk being unable to function as it will either run out of UDP sockets or return errors about open files.
root@ast- 1:/var/ log/asterisk# lsof | grep asterisk | grep UDP | wc
121 1089 11004
It has 121 sockets open, but only one call in progress.
Running asterisk : Connected to Asterisk 1.6.2.5-0ubuntu1.4 currently running on pri1 (pid = 5132)