[asterisk-bugs] [Asterisk 0014364]: NULL file descriptors causing GUI to eventually stop functioning

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Feb 3 14:41:06 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14364 
====================================================================== 
Reported By:                awk
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   14364
Category:                   Core/ManagerInterface
Reproducibility:            always
Severity:                   block
Priority:                   normal
Status:                     assigned
Target Version:             1.6.0.6
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.0 
SVN Revision (number only!): 171686 
Request Review:              
====================================================================== 
Date Submitted:             2009-01-29 09:17 CST
Last Modified:              2009-02-03 14:41 CST
====================================================================== 
Summary:                    NULL file descriptors causing GUI to eventually stop
functioning
Description: 
I'm having an issue where file descriptors for GUI manager sessions are
NULL, and after a period of time (24 hrs possibly), the GUI stops
functioning as it can no longer open config files (see below).

fd == -1 in astman_append, should not happen
fd == -1 in astman_append, should not happen
fd == -1 in astman_append, should not happen
  == HTTP Manager 'admin' timed out from 127.0.0.1
  == HTTP Manager 'admin' logged on from 127.0.0.1
  == Parsing '/etc/asterisk/http.conf':   == Not found (Too many open
files)
  == Parsing '/etc/asterisk/http.conf':   == Not found (Too many open
files)
  == Parsing '/etc/asterisk/http.conf':   == Not found (Too many open
files)

I'm not exactly sure what other info will be useful as Asterisk doesn't
crash or deadlock. I haven't checked yet to see if this happens in 1.6.1.
It doesn't appear to happen in my 1.4 install.

====================================================================== 

---------------------------------------------------------------------- 
 (0099363) putnopvut (administrator) - 2009-02-03 14:41
 http://bugs.digium.com/view.php?id=14364#c99363 
---------------------------------------------------------------------- 
First of all, a big thanks to awk for letting me make use of his setup to
see how this issue was occurring.

All right, so here's the deal, as far as I can tell. There is an originate
command that is issued. While the originate command is being executed, the
same manager session is used for handling more http requests. During that
time, the mansession object has its f and fd fields altered. The result of
this is a large fd leak.

One way to handle this is to keep the mansession locked for the entirety
of any manager action. This way, actions are guaranteed to execute in the
order we receive them, and we know that what was set at the beginning of
the action will still be set at the end. While this would have the benefit
of fixing this particular issue, I don't like the performance penalty that
would be incurred as a result.

I'll try to come up with something better. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-02-03 14:41 putnopvut      Note Added: 0099363                          
======================================================================




More information about the asterisk-bugs mailing list