[asterisk-bugs] [Asterisk 0016081]: utils.c:938 ast_carefulwrite: Timed out trying to write causes corruption to astdb

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Nov 5 17:28:18 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16081 
====================================================================== 
Reported By:                aragon
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16081
Category:                   Resources/res_agi
Reproducibility:            have not tried
Severity:                   major
Priority:                   normal
Status:                     acknowledged
Target Version:             1.4.28
Asterisk Version:           SVN 
JIRA:                       SWP-286 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-10-15 10:02 CDT
Last Modified:              2009-11-05 17:28 CST
====================================================================== 
Summary:                    utils.c:938 ast_carefulwrite: Timed out trying to
write causes corruption to astdb
Description: 
Agent addmember to local extensions causes the agent to be logged as
non-existent channels when ast_carefulwrite times out during login.

[Oct 15 10:40:07] NOTICE[29962]: utils.c:938 ast_carefulwrite: Timed out
trying to write
[Oct 15 10:40:07] NOTICE[29962]: utils.c:938 ast_carefulwrite: Timed out
trying to write

Here  is an example of the corruption where the same local extension is
logged twice.  The "outgoing" agent cannot logoff unless I manually remove
from astdb.  The local agent can logoff but since the outgoing cannot calls
entering queue fail to reach agents and the local channel cannot log back
in.

Local/3345 at queuefifteen-outgoing/n (dynamic) (Invalid) has taken no calls
yet
      Local/3345 at queuefifteen-agent/n (dynamic) (Not in use) has taken 2
calls (last was                                                            
    1915 secs ago)

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0014843 1 in 3 incoming zap PRI calls do no hea...
====================================================================== 

---------------------------------------------------------------------- 
 (0113247) russell (administrator) - 2009-11-05 17:28
 https://issues.asterisk.org/view.php?id=16081#c113247 
---------------------------------------------------------------------- 
You noted that the message appears to be related to AGI.  That is certainly
plausible, since that is one of the few places where ast_carefulwrite() is
used.  However, to be sure, carefulwrite_location.rev1.diff is a patch that
will update the message to tell us what write specifically is resulting in
this message.

I do not see any usage of this function that is directly related to the
astdb, so to me it looks like this message and the queue problem are likely
not related.

Another thing you can experiment with is increasing the write timeout in
res_agi, as demonstrated in agi_writetimeout.rev1.diff.  However, any delay
while write is blocking is going to have the side effect that you observed
where no audio is being processed.  This could be caused by high load on
the system, or a problem in the AGI application itself. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-11-05 17:28 russell        Note Added: 0113247                          
======================================================================




More information about the asterisk-bugs mailing list