[Home]

Summary:ASTERISK-06953: Endless loop message bug
Reporter:tanischen (tanischen)Labels:
Date Opened:2006-05-11 04:16:35Date Closed:2006-05-18 09:40:54
Priority:BlockerRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk_message.txt
( 1) gdb_dump.txt
Description:Hail,
(sorry for the poor English)
I found the endless loop bug in app_voicemail.The folowing is the steps:

1.Dial 123 into voicemail
2.Press 1 to listen a message leaved by other sip user.
3.Then press 3 into advopts func.
4.Then press 2 into callback func.
5.wait about up 6~10 times for the notice voice repeat.
6.Hangup the call.
Then asterisk got into endless loop ,and keep repeating the following message:

May 11 16:30:50 WARNING[10207]: file.c:584 ast_readaudio_callback: Failed to write frame
   -- Playing 'vm-num-i-have' (language 'en')
   -- Confirm CID number '741' is number to use for callback

Soon,the endless loop messge fill up asterisk log file.

****** ADDITIONAL INFORMATION ******

My environment:
OS:Scientific linux 4.2
Pentium4 PC
1G RAM
80G HDD
SJPHONE(Other sip client as well)
gsm codec
Comments:By: Serge Vecher (serge-v) 2006-05-11 08:50:51

Ok, does that mean that Asterisk deadlocks? Please see the deadlock section here http://www.voip-info.org/tiki-index.php?page=Asterisk%20debugging and come back here with a backtrace of non-optimized Asterisk build when the problem occurs.

By: tanischen (tanischen) 2006-05-11 21:48:19

Hail,
Thanks for the reply.I follow the deadlock debug step and upload the log files,include asterisk log message and gdb message.

In asterisk message file,please find this:
May 12 10:06:08 DEBUG[7535] chan_sip.c: **** Received BYE (8) - Command in SIP BYE

After I hangup the call,asterisk keep showing then the following messages,and never stop:
===
May 12 10:06:08 DEBUG[7612] channel.c: Set channel SIP/405-7738 to write format gsm
May 12 10:06:08 WARNING[7612] file.c: Failed to write frame
May 12 10:06:08 DEBUG[7612] channel.c: Scheduling timer at 0 sample intervals
May 12 10:06:08 VERBOSE[7612] logger.c:     -- Playing 'vm-num-i-have' (language 'en')
May 12 10:06:08 DEBUG[7612] sched.c: ast_sched_wait()
May 12 10:06:08 DEBUG[7612] channel.c: Scheduling timer at 0 sample intervals
===

Though I already uncommented the debug thread:
==
DEBUG_THREADS = -DDUMP_SCHEDULER -DDEBUG_SCHEDULER -DDEBUG_THREADS -DDO_CRASH -DDETECT_DEADLOCKS
==
But when deadlock occurs,asterisk just keeping show the above message with no thread debug dump.

The following is my SIP client deploy:
405 - SJPHONE,I use this phone to guide the bug stepts.
741 - SIP PHONE,I use this phone to leave the test voice message with SIP client 405.

P.S
I would upload the whole message if I can,But the log file is up to 23MB.

By: BJ Weschke (bweschke) 2006-05-12 03:37:30

This sounds more like racestate from rogue code in app_voicemail than it does deadlock. I'll try to lab it up and produce a patch a little later on today.

By: Joshua C. Colp (jcolp) 2006-05-17 12:28:17

I tried to lab this up today... but was unable to, I did exactly as you said - can you give me any other hints to reproduce this?

By: tanischen (tanischen) 2006-05-17 21:41:36

Hail joshnet,
Thanks for the reply.

Just follow the steps:

1.Dial 123 into voicemail
2.Press 1 to listen a message leaved by other sip user.
3.Then press 3 into extra functions.
4.Then press 2 into callback func.

Then make sure you have get into the follow flow on the CLI:

   [1]-- Confirm CID number '408' is number to use for callback
   [2]-- Playing 'vm-num-i-have' (language 'en')
   [3]-- Playing 'digits/4' (language 'en')
   [4]-- Playing 'digits/0' (language 'en')
   [5]-- Playing 'digits/8' (language 'en')
   [6]-- Playing 'vm-tocallnum' (language 'en')
   [7]-- Playing 'vm-calldiffnum' (language 'en')
   [8]-- Playing 'vm-star-cancel' (language 'en')

Then just wait till these steps be repeated six times completely,it means that step 1 to step 8 must be repeated six times or more.

[1->8,1->8,1->8,1->8,1->8,1->8,keeping listen the system message till six times or more.]

Then just hang up the call,the following message should be repeated forever on CLI:
==
May 18 10:18:30 WARNING[14825]: file.c:584 ast_readaudio_callback: Failed to write frame
   -- Playing 'vm-num-i-have' (language 'en')
   -- Confirm CID number '408' is number to use for callback
==



By: Joshua C. Colp (jcolp) 2006-05-18 09:40:53

Fixed in both 1.2 and trunk, thanks!