[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
Mon Dec 14 01:53:02 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-14 01:53 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 _...
====================================================================== 

---------------------------------------------------------------------- 
 (0115182) destiny6628 (reporter) - 2009-12-14 01:53
 https://issues.asterisk.org/view.php?id=16081#c115182 
---------------------------------------------------------------------- 
Hi i have been also facing this bug for a quite long time now and this
normally comes after some period of time when traffic (no. of channels) on
the asterisk starts crossing beyond 85 etc.

I have been running server with asterisk version of 1.4.27 and error which
keeps flowing on asterisk mentioned below 

 -- Got SIP response 503 "Service Unavailable" back from 174.46.235.190
[Dec 13 06:05:42] NOTICE[2407]: utils.c:938 __ast_carefulwrite: Timed out
trying to write at line 545 of astman_append in file manager.c
    -- Got SIP response 500 "Service Unavailable" back from 174.46.235.190
[Dec 13 06:05:42] NOTICE[2407]: utils.c:938 __ast_carefulwrite: Timed out
trying to write at line 545 of astman_append in file manager.c [Dec 13
06:05:42] NOTICE[2407]: utils.c:938 __ast_carefulwrite: Timed out trying to
write at line 545 of astman_append in file manager.c [Dec 13 06:05:42]
NOTICE[2407]: utils.c:938 __ast_carefulwrite: Timed out trying to write at
line 545 of astman_append in file manager.c
    -- AMD: ANSWERING MACHINE: silenceDuration:2500 initialSilence:2500
    -- Executing [8380 at default:2] AGI("SIP/kurtn-099eaab0",
"VD_amd|192.168.1.236|192.168.1.235") in new stack [Dec 13 06:05:42]
NOTICE[2407]: utils.c:938 __ast_carefulwrite: Timed out trying to write at
line 545 of astman_append in file manager.c [Dec 13 06:05:43] NOTICE[2407]:
utils.c:938 __ast_carefulwrite: Timed out trying to write at line 545 of
astman_append in file manager.c [Dec 13 06:05:43] NOTICE[2407]: utils.c:938
__ast_carefulwrite: Timed out trying to write at line 545 of astman_append
in file manager.c [Dec 13 06:05:43] NOTICE[2407]: utils.c:938
__ast_carefulwrite: Timed out trying to write at line 545 of astman_append
in file manager.c [Dec 13 06:05:43] NOTICE[2407]: utils.c:938
__ast_carefulwrite: Timed out trying to write at line 545 of astman_append
in file manager.c [Dec 13 06:05:43] NOTICE[2407]: utils.c:938
__ast_carefulwrite: Timed out trying to write at line 545 of astman_append
in file manager.c
    -- Launched AGI Script /var/lib/asterisk/agi-bin/VD_amd
    -- Executing [8380 at default:1] AMD("SIP/kurtn-0980b378", "") in new
stack
    -- AMD: SIP/kurtn-0980b378 7223125012 (null) (Fmt: 256)
    -- AMD: initialSilence [2500] greeting [2500] afterGreetingSilence
[800] totalAnalysisTime [5000] minimumWordLength [100] betweenWordsSilence
[50] maximumNumberOfWords [3] silenceThreshold [256]
    -- AMD: Changed state to STATE_IN_SILENCE
    -- Executing [8380 at default:1] AMD("SIP/kurtn-097a6e68", "") in new
stack
    -- AMD: SIP/kurtn-097a6e68 7223125012 (null) (Fmt: 256)
    -- Executing [8380 at default:1] AMD("SIP/kurtn-09840de0", "") in new
stack
    -- AMD: initialSilence [2500] greeting [2500] afterGreetingSilence
[800] totalAnalysisTime [5000] minimumWordLength [100] betweenWordsSilence
[50] maximumNumberOfWords [3] silenceThreshold [256]
    -- AMD: SIP/kurtn-09840de0 7223125012 (null) (Fmt: 256)
    -- AMD: initialSilence [2500] greeting [2500] afterGreetingSilence
[800] totalAnalysisTime [5000] minimumWordLength [100] betweenWordsSilence
[50] maximumNumberOfWords [3] silenceThreshold [256]
    -- AMD: Changed state to STATE_IN_SILENCE
  == Spawn extension (default, 8380, 2) exited non-zero on
'SIP/kurtn-099eaab0'
    -- Executing [h at default:1] DeadAGI("SIP/kurtn-099eaab0",
"hangup|192.168.1.236|192.168.1.235|16||n") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/hangup
    -- AGI Script hangup completed, returning 0
    -- Executing [h at default:2] DeadAGI("SIP/kurtn-099eaab0",
"agi://192.168.1.235:2222/AGI?Hangup") in new stack
    -- AGI Script agi://192.168.1.235:2222/AGI?Hangup completed, returning
0
    -- AMD: Changed state to STATE_IN_SILENCE localhost*CLI> exit



Any suggestions/help would be highly appreciated. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-12-14 01:53 destiny6628    Note Added: 0115182                          
======================================================================




More information about the asterisk-bugs mailing list