Summary: | ASTERISK-10683: pbx_builtin_setvar_helper crash | ||
Reporter: | 850t (850t) | Labels: | |
Date Opened: | 2007-11-05 00:16:07.000-0600 | Date Closed: | 2007-11-06 08:07:00.000-0600 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Addons/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) typescript | |
Description: | We have been experiencing a series of random crashes on our Asterisk 1.4.13. We setup an asterisk server and it works completely fine for a month. Then we move the server to a higher loaded location with higher usage, and queue, and voice recording, and more outgoing calls, then we experience random crash. Attached is the stack. | ||
Comments: | By: Tilghman Lesher (tilghman) 2007-11-05 06:17:29.000-0600 Please view the file doc/valgrind.txt and follow the instructions there. This is a memory corruption issue that cannot be reproduced, and we need something other than a stack backtrace in this situation. By: Digium Subversion (svnbot) 2007-11-05 16:07:02.000-0600 Repository: asterisk Revision: 88805 U branches/1.4/include/asterisk/pbx.h U branches/1.4/main/pbx.c ------------------------------------------------------------------------ r88805 | russell | 2007-11-05 16:07:00 -0600 (Mon, 05 Nov 2007) | 12 lines After seeing crashes related to channel variables, I went looking around at the ways that channel variables are handled. In general, they were not handled in a thread-safe way. The channel _must_ be locked when reading or writing from/to the channel variable list. What I have done to improve this situation is to make pbx_builtin_setvar_helper() and friends lock the channel when doing their thing. Asterisk API calls almost all lock the channel for you as necessary, but this family of functions did not. (closes issue ASTERISK-10477, reported by atis) (closes issue ASTERISK-10683, reported by 850t) ------------------------------------------------------------------------ By: Digium Subversion (svnbot) 2007-11-06 08:07:00.000-0600 Repository: asterisk Revision: 88934 _U trunk/ U trunk/channels/busy.h U trunk/channels/ringtone.h U trunk/include/asterisk/pbx.h U trunk/main/pbx.c ------------------------------------------------------------------------ r88934 | russell | 2007-11-06 08:06:59 -0600 (Tue, 06 Nov 2007) | 20 lines Merged revisions 88805 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r88805 | russell | 2007-11-05 16:07:54 -0600 (Mon, 05 Nov 2007) | 12 lines After seeing crashes related to channel variables, I went looking around at the ways that channel variables are handled. In general, they were not handled in a thread-safe way. The channel _must_ be locked when reading or writing from/to the channel variable list. What I have done to improve this situation is to make pbx_builtin_setvar_helper() and friends lock the channel when doing their thing. Asterisk API calls almost all lock the channel for you as necessary, but this family of functions did not. (closes issue ASTERISK-10477, reported by atis) (closes issue ASTERISK-10683, reported by 850t) ........ ------------------------------------------------------------------------ |