[Home]

Summary:ASTERISK-11138: IMAP support causes Asterisk to hang once in a while
Reporter:Yehavi Bourvine (yehavi)Labels:
Date Opened:2008-01-02 06:35:52.000-0600Date Closed:2008-01-07 17:55:19.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When IMAP support is turned on Asterisk gets jung once in a while. It responds to console commands, but it stops reading from the SIP port (UDP/5060) thus effectlvely stops serving users.

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

At the times I could catch it in this situation there was always at least one call directed to voicemail (no answer or busy).

Generating a crash dump in this situation shows that some thread is hung in the imap client utility reading from the remote.

A simple bypass was to edit imap2006k/c-client/tcp_unix.c and modify the default value of read timeout ttmo_read from zero to 60 seconds. I have no idea what are the consequences of this...
Comments:By: Mark Michelson (mmichelson) 2008-01-02 10:29:42.000-0600

It's interesting that you have filed this bug, because I was having an IRC discussion about an issue like this with someone and we thought that changing the TCP timeouts for the c-client could be a suitable fix for the problem. This bug report further validates that assumption.

From reading the c-client documentation, it apparently gets its default timeout values from the system timeouts. The timeouts can be modified through some API calls, so I will look at integrating these into Asterisk.

By: Digium Subversion (svnbot) 2008-01-07 15:00:26.000-0600

Repository: asterisk
Revision: 96934

U   trunk/apps/app_voicemail.c
U   trunk/doc/tex/imapstorage.tex

------------------------------------------------------------------------
r96934 | mmichelson | 2008-01-07 15:00:23 -0600 (Mon, 07 Jan 2008) | 7 lines

Adding user-configurable TCP timeout settings to IMAP voicemail. This could
go a long way towards preventing unexplainable hangs experienced by people. In the
case of MWI hangs, this also will mean that the SIP port isn't blocked anymore.

(closes issue ASTERISK-11138, reported by yehavi)


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=96934

By: Digium Subversion (svnbot) 2008-01-07 17:55:19.000-0600

Repository: asterisk
Revision: 97010

_U  team/file/netsock2/
U   team/file/netsock2/Makefile
U   team/file/netsock2/UPGRADE.txt
U   team/file/netsock2/apps/app_voicemail.c
A   team/file/netsock2/build_tools/make_version_c
D   team/file/netsock2/build_tools/make_version_h
U   team/file/netsock2/build_tools/prep_tarball
U   team/file/netsock2/channels/chan_sip.c
U   team/file/netsock2/channels/console_gui.c
U   team/file/netsock2/configs/extensions.conf.sample
U   team/file/netsock2/configs/http.conf.sample
U   team/file/netsock2/doc/tex/imapstorage.tex
A   team/file/netsock2/formats/format_sln16.c
U   team/file/netsock2/funcs/func_version.c
_U  team/file/netsock2/include/asterisk/
_U  team/file/netsock2/main/
U   team/file/netsock2/main/Makefile
U   team/file/netsock2/main/asterisk.c
U   team/file/netsock2/main/config.c
U   team/file/netsock2/main/http.c
U   team/file/netsock2/main/loader.c
U   team/file/netsock2/main/manager.c
U   team/file/netsock2/main/pbx.c
U   team/file/netsock2/res/res_agi.c
U   team/file/netsock2/res/res_smdi.c
U   team/file/netsock2/res/snmp/agent.c

------------------------------------------------------------------------
r97010 | file | 2008-01-07 17:55:17 -0600 (Mon, 07 Jan 2008) | 159 lines

Merged revisions 96715-96717,96743,96776,96836,96858,96862,96885-96888,96933-96936,96987-96988 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r96715 | russell | 2008-01-05 17:35:54 -0400 (Sat, 05 Jan 2008) | 3 lines

Add a note about changing modules.conf since another console channel driver is
now present that can not be used at the same time as chan_alsa or chan_oss.

................
r96716 | russell | 2008-01-05 18:04:08 -0400 (Sat, 05 Jan 2008) | 3 lines

Print out the name of a function being registered in color, just like the name
of applications when they get registered.

................
r96717 | russell | 2008-01-05 18:09:06 -0400 (Sat, 05 Jan 2008) | 15 lines

Now that the version.h file was getting properly regenerated every time the svn
revision changed, every module that used the version was getting rebuilt after
every svn update.  This severly annoyed me pretty quickly, so I have improved
the situation.

Now, instead of generating version.h, main/version.c is generated.  version.c
includes the version information, as well as a couple of API calls for modules
to retrieve the version.  So now, only version.c will get rebuilt, and the main
asterisk binary relinked, which is must faster than rebuilding http.c, manager.c,
asterisk.c, relinking the asterisk binary, chan_sip.c, func_version.c, res_agi ...

The only minor change in behavior here is that the version information reported by
chan_sip, for example, is the version of the Asterisk core, and not necessarily the
Asterisk version that the chan_sip module came from.

................
r96743 | russell | 2008-01-05 19:05:35 -0400 (Sat, 05 Jan 2008) | 4 lines

Convert this file over the new method of getting the Asterisk version.
(I don't have this building on this machine, so caio1982 on IRC is going to
test it for me.  :) )

................
r96776 | rizzo | 2008-01-07 07:22:01 -0400 (Mon, 07 Jan 2008) | 4 lines

resolve a load-time problem avoiding a call to console_do_answer.
On passing, fix dialling from the keypad.


................
r96836 | rizzo | 2008-01-07 11:06:54 -0400 (Mon, 07 Jan 2008) | 4 lines

update comments to reflect reality (or at least planned behaviour).
minor code cleanups


................
r96858 | file | 2008-01-07 11:52:55 -0400 (Mon, 07 Jan 2008) | 6 lines

Move ModuleLoad and ModuleCheck manager commands from loader.c to manager.c. Previously they would get registered twice because of the way manager.c operates.
(closes issue ASTERISK-11170)
Reported by: caio1982
Patches:
     manager_module_commands1.diff uploaded by caio1982 (license 22)

................
r96862 | kpfleming | 2008-01-07 12:17:31 -0400 (Mon, 07 Jan 2008) | 2 lines

add a file-format driver for 16KHz signed linear... which may or may not work

................
r96885 | russell | 2008-01-07 12:42:42 -0400 (Mon, 07 Jan 2008) | 11 lines

Merged revisions 96884 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r96884 | russell | 2008-01-07 10:39:23 -0600 (Mon, 07 Jan 2008) | 3 lines

Don't crash if something happens when setting up an SMDI interface and it gets
destroyed before the SMDI port handling thread gets created.

........

................
r96886 | russell | 2008-01-07 12:59:04 -0400 (Mon, 07 Jan 2008) | 2 lines

Build the HTML version of the doc files for tarballs, as well

................
r96887 | russell | 2008-01-07 13:09:23 -0400 (Mon, 07 Jan 2008) | 3 lines

If the HTML documentation exists, install it in the static-http/docs directory
so that it can be viewed through the Asterisk http server if it is turned on.

................
r96888 | russell | 2008-01-07 13:15:11 -0400 (Mon, 07 Jan 2008) | 2 lines

Add a note about viewing the default set of documentation using the built-in http server

................
r96933 | russell | 2008-01-07 16:48:23 -0400 (Mon, 07 Jan 2008) | 18 lines

Merged revisions 96932 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r96932 | russell | 2008-01-07 14:47:52 -0600 (Mon, 07 Jan 2008) | 10 lines

Merged revisions 96931 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r96931 | russell | 2008-01-07 14:46:22 -0600 (Mon, 07 Jan 2008) | 2 lines

Change misery.digium.com to pbx.digium.com

........

................

................
r96934 | mmichelson | 2008-01-07 17:04:09 -0400 (Mon, 07 Jan 2008) | 7 lines

Adding user-configurable TCP timeout settings to IMAP voicemail. This could
go a long way towards preventing unexplainable hangs experienced by people. In the
case of MWI hangs, this also will mean that the SIP port isn't blocked anymore.

(closes issue ASTERISK-11138, reported by yehavi)


................
r96935 | mmichelson | 2008-01-07 17:10:59 -0400 (Mon, 07 Jan 2008) | 4 lines

Document some weird casting magic that's necessary to interface
with the c-client


................
r96936 | qwell | 2008-01-07 17:12:33 -0400 (Mon, 07 Jan 2008) | 4 lines

Display a message if no config mappings are found with "core show config mappings".

Closes issue ASTERISK-11175, patch by kshumard.

................
r96987 | mmichelson | 2008-01-07 18:31:03 -0400 (Mon, 07 Jan 2008) | 3 lines

Explicitly make literal constants long where they are expected to be.


................
r96988 | rizzo | 2008-01-07 19:03:11 -0400 (Mon, 07 Jan 2008) | 5 lines

add support for cropping the keypad image while displaying it.
This way it can contain additional elements (e.g. fonts, buttons,
widgets) without having to use a zillion files to store them.


................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=97010