[asterisk-bugs] [Asterisk 0014400]: [patch] ami fails on high load

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Feb 4 12:52:28 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14400 
====================================================================== 
Reported By:                fnordian
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   14400
Category:                   Core/ManagerInterface
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.1 
SVN Revision (number only!): 169213 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-02-04 06:53 CST
Last Modified:              2009-02-04 12:52 CST
====================================================================== 
Summary:                    [patch] ami fails on high load
Description: 
hi,
the asterisk manager interface stops working and closes the session on
high load (on the interface). i traced the issue down to a strange behavior
of fwrite: although ast_wait_for_output (poll) says write would be
possible, the fwrite just returns 0 and errno is set to ESPIPE. the
tcp-connection is still established on both sides. 

i was able to fix the issue by disabling output-buffering for the
file-handle using setvbuf, although i do not understand the issue
completly.

it would be great if someone could look into this.
====================================================================== 

---------------------------------------------------------------------- 
 (0099436) svnbot (reporter) - 2009-02-04 12:52
 http://bugs.digium.com/view.php?id=14400#c99436 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 173459

_U  branches/1.6.1/
U   branches/1.6.1/main/tcptls.c

------------------------------------------------------------------------
r173459 | tilghman | 2009-02-04 12:52:28 -0600 (Wed, 04 Feb 2009) | 16
lines

Merged revisions 173458 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r173458 | tilghman | 2009-02-04 12:48:06 -0600 (Wed, 04 Feb 2009) | 9
lines
  
  When using a socket as a FILE *, the stdio functions will sometimes try
to do
  an fseek() on the stream, which is an invalid operation for a socket. 
Turning
  off buffering explicitly lets the stdio functions know they cannot do
this,
  thus avoiding a potential error.
  (closes issue http://bugs.digium.com/view.php?id=14400)
   Reported by: fnordian
   Patches: 
         tcptls.patch uploaded by fnordian (license 110)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=173459 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-02-04 12:52 svnbot         Checkin                                      
2009-02-04 12:52 svnbot         Note Added: 0099436                          
======================================================================




More information about the asterisk-bugs mailing list