Summary:ASTERISK-09523: Asterisk [IMAP] crashes if a vm message is left, then vm is checked but phone hung up before pswd entered
Reporter:xmarksthespot (xmarksthespot)Labels:
Date Opened:2007-05-25 14:37:50Date Closed:2007-06-06 15:14:27
Versions:Frequency of
Environment:Attachments:( 0) 20070605__bug9810.diff.txt
( 1) bt.txt
( 2) bteth.txt
( 3) bt_full.txt
( 4) bt_full-take2.txt
( 5) bt-take2.txt
( 6) output.txt
( 7) thread_apply_all_bt.txt
( 8) thread_apply_all_bt-take2.txt
( 9) vmauthenticateverbosedebug.txt
(10) vmauthenticateverbosedebug-cleanedstartup.txt
(11) xmts-sip.conf
(12) xmts-voicemail.conf
Description:On Asterisk 1.4.4 with IMAP storage enabled, asterisk can be crashed by following these steps.

1. Leave a message on a voicemail.
2. Dial to obtain voicemailmail for this voicemail.
3. Hangup before password is entered.

These steps crashed asterisk 100% of the time. I'll run any test you wish to help define the problem.

As it stands, in the files you have here, what happens is that:

1. I am at extension 2400 and I call 2500.
2. 2500 is busy, it goes to voicemail.
3. I leave a message on voicemail then hangup.
4. From the same extension, 2400, I then dial 7777 which gives me access to voicemailmain for 2500.
5. When Asterisk asks for a password, instead of entering a password, I hang up, and asterisk crashes.

vm_authenticate does not produce the "Unable to read password" it usually does, which is odd.


I submit here all the required files for crash analysis, the names are self explanatory I believe.

I'm sorry for submitting all these bugs as of late but I sort of took it on myself to fix whatever I can about IMAP storage and report everything I can't fix so that it could work as of next release, maybe?

I dream of a world with IMAP storage everywhere for everything.
Comments:By: Mark Michelson (mmichelson) 2007-06-01 16:49:07

I have attempted to reproduce this but have not been able to as of yet. First, I recommend updating to the latest SVN revision.

If you are still having the issue after updating, then please upload your voicemail.conf, extensions.conf, and sip.conf files so I can try to duplicate your configuration. Maybe then I will be able to reproduce the crash.

By: Edwin horton (edhorton) 2007-06-02 10:50:01

I tried the lastest revision, and now Asterisk crashes whenever I even try to leave a voicemail with IMAP enabled.  I am using Dovecot 1.0 with master users enabled.  Asterisk seems to log in correctly to the mail server with the master user password and select the correct location for the user.
Before, Asterisk crashed, but not until I had finished the recording.  BT is attached.

By: xmarksthespot (xmarksthespot) 2007-06-04 10:55:31

I am updating to latest SVN (branch). I'll try and report back. I'm getting lots of screwy behavior for the time being I don't know why.

I forgot to mention that my config is all realtime! sip and voicemail are both realtime through unixodbc! The .conf files are just the samples.

By: xmarksthespot (xmarksthespot) 2007-06-04 11:06:59

Just made it happen on SVN!

Can I send you my files privately? I'd rather my extensions.conf be on the 'net, is this possible? I'll attach the sip.conf and voicemail.conf if you want them but they're close to empty.

Do you need new backtraces and everything, cause I can do them if you wish.

By: xmarksthespot (xmarksthespot) 2007-06-04 11:28:06

I added both my files sip.conf and voicemail.conf files, I'll clean up my extensions.conf and I'll send it soon, unless I can send it privately or something.

At any rate the command to access the voicemail in extensions.conf used is Voicemailmain('${CALLERID(num)}'@MyContext)

By: Mark Michelson (mmichelson) 2007-06-04 11:50:00

I didn't know prior that you were using real-time, so that may be the culprit. I'm going to try to set up real-time on my box and see if I can reproduce with that. If I can't, then I'll try running using your configs. I may not need extensions.conf, but if I do, I'll let you know.

To edhorton: are you by any chance running trunk? Or are you also running 1.4 code?

By: xmarksthespot (xmarksthespot) 2007-06-04 13:14:29

Many thanks for your help Mr. Putnopvut.

I'm really sorry for not mentioning the realtime thing earlier.

If you need more backtraces, etc. please let me know.

By: xmarksthespot (xmarksthespot) 2007-06-04 14:00:12

Trying to get ahold of you on IRC but it might just be quicker if I disable my realtime and test that way!

By: xmarksthespot (xmarksthespot) 2007-06-04 15:22:11

Here goes, I reuploaded the bt, bt full and thread apply all bt for you, same revision as you.

They're named bt-take2.txt, bt full-take2.txt, thread apply all bt-take2.txt. Which is which I believe is self-explanatory.

By: Mark Michelson (mmichelson) 2007-06-05 15:23:31

edhorton: I just reproduced your crash with the same backtrace. I'm looking into it as well as the original crash reported here.

By: Tilghman Lesher (tilghman) 2007-06-05 17:02:50

Just a passing thought, but does this patch fix the problem?

By: xmarksthespot (xmarksthespot) 2007-06-05 18:10:25

Corydon76: I'll give your patch a whirl as soon as possible, which is tomorrow morning. (I left work already)

By: xmarksthespot (xmarksthespot) 2007-06-06 10:38:21

Corydon76! That seems to have done it! No longer crashes! Unbelievable! Thank you many times over! Never thought we'd see the end of this one!

By: Mark Michelson (mmichelson) 2007-06-06 15:08:23

To edhorton: I don't know if you're still following this issue or not, but I fixed your crash you reported in this bug for trunk in SVN revision 67784.

To xmarksthespot and Corydon76: I made the change to the patch we discussed on IRC after finally being able to reproduce the crash. I placed the check for the existence of the pointer outside the for loop. I'll be closing this issue now.

By: Mark Michelson (mmichelson) 2007-06-06 15:12:14

This issue was fixed in 1.4 in revision 67804 and was fixed in trunk in revision 67808.

Thanks to xmarksthespot for reporting the bug and thanks to Corydon76 for the patch.

This issue is now closed.