[asterisk-bugs] [Asterisk 0013546]: Partial writes on Manager API

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Nov 4 10:08:00 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13546 
====================================================================== 
Reported By:                srt
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13546
Category:                   Core/ManagerInterface
Reproducibility:            random
Severity:                   minor
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           1.4.21.2 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-09-23 08:35 CDT
Last Modified:              2008-11-04 10:07 CST
====================================================================== 
Summary:                    Partial writes on Manager API
Description: 
Sometimes writing manager events with ast_carefulwrite in manager.c only
results in a partial write i.e. not all data is written to the socket.
There is no check for this and no code to send the missing data. As a
workaround increasing the writetimeout in manager.conf mitigates this
issue.
See
http://jira.reucon.org/browse/AJ-174?focusedCommentId=10522#action_10522
for details.
====================================================================== 

---------------------------------------------------------------------- 
 (0094542) davidw (reporter) - 2008-11-04 10:07
 http://bugs.digium.com/view.php?id=13546#c94542 
---------------------------------------------------------------------- 
I believe the real cause for this is that send_string fails to handle the
EAGAIN error from fflush.  The Linux man page seems to be incomplete. 
Given that glibc claims to be a POSIX superset, the opengroup.org copy of
the man page ought to be more correct (the difference between their pages
and the normal vendor pages is that they are careful to cover all the edge
cases).

We are just trying the effect of using setbuf, to force unbuffered output
(although handling fflush properly would reduce the number of system
calls).  I'll update when we've done.

http://opengroup.org/onlinepubs/007908775/xsh/fflush.html 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-11-04 10:07 davidw         Note Added: 0094542                          
======================================================================




More information about the asterisk-bugs mailing list