[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:05:15 CST 2011


The following issue has been UPDATED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18731 
====================================================================== 
Reported By:                marioabajo
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18731
Category:                   Functions/func_env
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
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:              
====================================================================== 
Date Submitted:             2011-02-02 07:02 CST
Last Modified:              2011-02-02 14:05 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 :-)
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-02-02 14:05 tilghman       SVN Branch (only for SVN checkouts, not tarball
releases) trunk => 1.8       
2011-02-02 14:05 tilghman       Additional Information Updated                  
 
======================================================================




More information about the asterisk-bugs mailing list