[asterisk-bugs] [Asterisk 0018731]: [path] func_env.c FILE estatement left file descriptors open
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Feb 2 14:06:34 CST 2011
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=18731
======================================================================
Reported By: marioabajo
Assigned To: tilghman
======================================================================
Project: Asterisk
Issue ID: 18731
Category: Functions/func_env
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Asterisk Version: SVN
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): 1.8
SVN Revision (number only!): 305740
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2011-02-02 07:02 CST
Last Modified: 2011-02-02 14:06 CST
======================================================================
Summary: [path] func_env.c FILE estatement left file
descriptors open
Description:
We are plenty of FILE sentences in the dialplan ( exten =>
_XXXXX,n,Set(TimeOutCFIN=${FILE(${PATH}${NRO_DEST:0:1}/${NRO_DEST}
/to_CFIN,0,${LongToCFIN})}) ) , so for every call we make some FILE
sentences are executed. In each FILE sentence the file is open and the
procedure is done correctly but the file descriptor is left open. After
some time working asterisk began saying:
[Feb 1 09:43:25] WARNING[11243] func_env.c: Cannot open file
'/opt/asterisk/config/4/48002/ruta' for reading: Too many open files
[Feb 1 09:43:25] WARNING[11243] app_dial.c: Dial requires an argument
(technology/number)
[Feb 1 09:43:34] WARNING[13987] asterisk.c: Accept returned -1: Too many
open files
[Feb 1 09:43:34] WARNING[13987] asterisk.c: Accept returned -1: Too many
open files
[Feb 1 09:43:34] WARNING[13987] asterisk.c: Accept returned -1: Too many
open files
and an 'ls -l /proc/13987/fd/ | wc -l' return's thousands of them.
We extend the "open files" limit (ulimit -n and setting maxfiles in
asterisk.conf) three times with ever increasing numbers but that only
increment the time between failures and the number of files in
/proc/.../fd/
Looking up the code of func_env.c we realize that some fclose were
missing.
This affects version 1.8.1, 1.8.2, and svn version 305740M
Thanks :-)
======================================================================
----------------------------------------------------------------------
(0131415) svnbot (reporter) - 2011-02-02 14:06
https://issues.asterisk.org/view.php?id=18731#c131415
----------------------------------------------------------------------
Repository: asterisk
Revision: 305845
_U trunk/
U trunk/funcs/func_env.c
------------------------------------------------------------------------
r305845 | tilghman | 2011-02-02 14:06:34 -0600 (Wed, 02 Feb 2011) | 12
lines
Merged revisions 305844 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r305844 | tilghman | 2011-02-02 14:05:43 -0600 (Wed, 02 Feb 2011) | 5
lines
Eliminate a file descriptor leak when using the FILE() dialplan
function.
(closes issue https://issues.asterisk.org/view.php?id=18731)
Reported by: marioabajo
........
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=305845
Issue History
Date Modified Username Field Change
======================================================================
2011-02-02 14:06 svnbot Checkin
2011-02-02 14:06 svnbot Note Added: 0131415
======================================================================
More information about the asterisk-bugs
mailing list