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

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Dec 22 09:47:59 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:             Potential Blocker
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-12-22 09:47 CST
====================================================================== 
Summary:                    [patch] 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...
related to          0015609 [patch] WARNING[23025]: channel.c:952 _...
====================================================================== 

---------------------------------------------------------------------- 
 (0115644) aragon (reporter) - 2009-12-22 09:47
 https://issues.asterisk.org/view.php?id=16081#c115644 
---------------------------------------------------------------------- 
CURRENT SUMMARY:
I have tried disabling cdr altogether and this has no effect on the 
NOTICE[22022]: utils.c:938 __ast_carefulwrite: Timed out trying to write at
line 152 of agi_debug_cli in file res_agi.c
The caller hears no audio from the IVR until the NOTICES are finished.

I still see this on every call I make to IVR on this system. The mysql
table is optimized and the CPU load is normal. The NOTICE appears before
any background prompt is played back and before any hangup, timeout, or
digit is pressed. But exactly after agi/ivr.php script is launched and only
if background exists in context.

I'm uploading a full agi debug with logger.conf debug to console enabled

I previously posted threadapplyallbtduring.txt when the condition occurred
and one of the agi scripts returned a result success and then a bunch of
out of bound and memory corruption errors and then a write to logger.c
which I assume is what triggered the notices to be written.  A subsequent
valgrind capture printed some references to cdr_addon_mysql.so.  Since the
ivr.php script posts some data to mysql cdr it may be reasonable to assume
that the memory corruption is in cdr_addon_mysql.so 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-12-22 09:47 aragon         Note Added: 0115644                          
======================================================================




More information about the asterisk-bugs mailing list