Summary: | ASTERISK-23990: [patch] app_voicemail crash when using IMAP greetings and forwarding messages | ||||
Reporter: | Ben Smithurst (bensmithurst) | Labels: | |||
Date Opened: | 2014-07-03 04:57:31 | Date Closed: | 2015-03-10 14:42:50 | ||
Priority: | Major | Regression? | |||
Status: | Closed/Complete | Components: | Applications/app_voicemail/IMAP | ||
Versions: | 11.8.1 | Frequency of Occurrence | Constant | ||
Related Issues: |
| ||||
Environment: | Attachments: | ( 0) app_voicemail_crash_fix.diff ( 1) bt.txt | |||
Description: | Asterisk currently crashes when trying to forward a message to another user - I think the combination of IMAP storage + IMAP greetings is the problem.
What seems to happen is that Asterisk changes to the Greetings folder in the *source* mailbox instead of the destination. It then doesn't change back, tries to retrieve message X (the one being forwarded) from Greetings, which doesn't exist, and libc-client calls abort(). The reason appears to be due to the per-thread 'interactive' vmstate storage, Asterisk seems to assume that the per-thread requests will always be for the same mailbox, but when forwarding, that's not true. So the fix is to check that the imapuser/mailbox/context (as appropriate) matches, when obtaining the interactive per-thread state. We can easily reproduce this problem, it appears to happen every time during our tests. | ||||
Comments: | By: Matt Jordan (mjordan) 2014-07-03 06:09:22.929-0500 It's hard to confirm whether or not a patch is correct without seeing evidence of the problem it fixes. Please attach a backtrace illustrating the crash so we can verify the patch. Thanks! By: Ben Smithurst (bensmithurst) 2014-07-03 06:33:33.722-0500 Backtrace attached. By: Matt Jordan (mjordan) 2014-07-10 16:33:41.708-0500 Thanks for the backtrace. If you'd like to post this up for code review for a more formal peer review, feel free to do so. Instructions for doing so are on the wiki here: https://wiki.asterisk.org/wiki/display/AST/Code+Review By: Matt Jordan (mjordan) 2015-03-10 13:12:59.944-0500 Note that the patch on ASTERISK-24786 has been merged to fix this issue. It takes a slightly different approach than the patch here. |