Summary: | ASTERISK-11921: [patch] safe_asterisk can be started multiple times. | ||
Reporter: | Frank Waller (explidous) | Labels: | |
Date Opened: | 2008-04-25 15:34:30 | Date Closed: | 2008-05-05 14:46:18 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20080428__bug12525.diff.txt | |
Description: | Due to an error in a custom init script it was possible to run safe_asterisk twice. This causes interesting issues especially on a highly loaded asterisk server. Mainly every few seconds a remote unix connection would show up and immediately disconnect in the Asterisk CLI. Now I realize that this was a problem in our init script and it has since been fixed, but it illustrates an issue with safe_asterisk. It should check to see if there is another instance of itself running, and if so exit like all good daemons. ****** STEPS TO REPRODUCE ****** Easiest way is to start safe_asterisk twice in an init script. | ||
Comments: | By: Tilghman Lesher (tilghman) 2008-04-28 17:27:08 Does this patch address your concerns? By: Michiel van Baak (mvanbaak) 2008-05-04 16:44:15 works for me, thank you. By: Digium Subversion (svnbot) 2008-05-04 22:16:57 Repository: asterisk Revision: 115285 U branches/1.4/contrib/init.d/rc.debian.asterisk U branches/1.4/contrib/init.d/rc.gentoo.asterisk U branches/1.4/contrib/init.d/rc.mandrake.asterisk U branches/1.4/contrib/init.d/rc.redhat.asterisk U branches/1.4/contrib/init.d/rc.slackware.asterisk U branches/1.4/contrib/init.d/rc.suse.asterisk U branches/1.4/contrib/scripts/safe_asterisk ------------------------------------------------------------------------ r115285 | tilghman | 2008-05-04 22:16:54 -0500 (Sun, 04 May 2008) | 7 lines When starting Asterisk, bug out if Asterisk is already running. (closes issue ASTERISK-11921) Reported by: explidous Patches: 20080428__bug12525.diff.txt uploaded by Corydon76 (license 14) Tested by: mvanbaak ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=115285 By: Digium Subversion (svnbot) 2008-05-04 22:19:59 Repository: asterisk Revision: 115286 _U trunk/ U trunk/contrib/init.d/rc.debian.asterisk U trunk/contrib/init.d/rc.gentoo.asterisk U trunk/contrib/init.d/rc.mandrake.asterisk U trunk/contrib/init.d/rc.redhat.asterisk U trunk/contrib/init.d/rc.slackware.asterisk U trunk/contrib/init.d/rc.suse.asterisk U trunk/contrib/scripts/safe_asterisk ------------------------------------------------------------------------ r115286 | tilghman | 2008-05-04 22:19:59 -0500 (Sun, 04 May 2008) | 15 lines Merged revisions 115285 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r115285 | tilghman | 2008-05-04 22:22:25 -0500 (Sun, 04 May 2008) | 7 lines When starting Asterisk, bug out if Asterisk is already running. (closes issue ASTERISK-11921) Reported by: explidous Patches: 20080428__bug12525.diff.txt uploaded by Corydon76 (license 14) Tested by: mvanbaak ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=115286 By: Digium Subversion (svnbot) 2008-05-04 22:20:51 Repository: asterisk Revision: 115287 _U branches/1.6.0/ U branches/1.6.0/contrib/init.d/rc.debian.asterisk U branches/1.6.0/contrib/init.d/rc.gentoo.asterisk U branches/1.6.0/contrib/init.d/rc.mandrake.asterisk U branches/1.6.0/contrib/init.d/rc.redhat.asterisk U branches/1.6.0/contrib/init.d/rc.slackware.asterisk U branches/1.6.0/contrib/init.d/rc.suse.asterisk U branches/1.6.0/contrib/scripts/safe_asterisk ------------------------------------------------------------------------ r115287 | tilghman | 2008-05-04 22:20:51 -0500 (Sun, 04 May 2008) | 23 lines Merged revisions 115286 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r115286 | tilghman | 2008-05-04 22:25:35 -0500 (Sun, 04 May 2008) | 15 lines Merged revisions 115285 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r115285 | tilghman | 2008-05-04 22:22:25 -0500 (Sun, 04 May 2008) | 7 lines When starting Asterisk, bug out if Asterisk is already running. (closes issue ASTERISK-11921) Reported by: explidous Patches: 20080428__bug12525.diff.txt uploaded by Corydon76 (license 14) Tested by: mvanbaak ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=115287 By: Digium Subversion (svnbot) 2008-05-05 14:46:17 Repository: asterisk Revision: 115307 _U team/seanbright/resolve-shadow-warnings/ U team/seanbright/resolve-shadow-warnings/CHANGES U team/seanbright/resolve-shadow-warnings/UPGRADE.txt U team/seanbright/resolve-shadow-warnings/acinclude.m4 U team/seanbright/resolve-shadow-warnings/apps/app_chanspy.c U team/seanbright/resolve-shadow-warnings/apps/app_queue.c U team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c U team/seanbright/resolve-shadow-warnings/configure U team/seanbright/resolve-shadow-warnings/contrib/init.d/rc.debian.asterisk U team/seanbright/resolve-shadow-warnings/contrib/init.d/rc.gentoo.asterisk U team/seanbright/resolve-shadow-warnings/contrib/init.d/rc.mandrake.asterisk U team/seanbright/resolve-shadow-warnings/contrib/init.d/rc.redhat.asterisk U team/seanbright/resolve-shadow-warnings/contrib/init.d/rc.slackware.asterisk U team/seanbright/resolve-shadow-warnings/contrib/init.d/rc.suse.asterisk U team/seanbright/resolve-shadow-warnings/contrib/scripts/safe_asterisk U team/seanbright/resolve-shadow-warnings/include/asterisk/_private.h U team/seanbright/resolve-shadow-warnings/include/asterisk/compiler.h A team/seanbright/resolve-shadow-warnings/include/asterisk/taskprocessor.h U team/seanbright/resolve-shadow-warnings/main/Makefile U team/seanbright/resolve-shadow-warnings/main/asterisk.c U team/seanbright/resolve-shadow-warnings/main/manager.c U team/seanbright/resolve-shadow-warnings/main/pbx.c A team/seanbright/resolve-shadow-warnings/main/taskprocessor.c ------------------------------------------------------------------------ r115307 | seanbright | 2008-05-05 14:46:14 -0500 (Mon, 05 May 2008) | 120 lines Merged revisions 115258,115268,115270,115272,115274,115277,115280,115283,115286,115288,115290,115301 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r115258 | bbryant | 2008-05-02 16:26:00 -0400 (Fri, 02 May 2008) | 9 lines Blocked revisions 115257 via svnmerge ........ r115257 | bbryant | 2008-05-02 15:25:42 -0500 (Fri, 02 May 2008) | 2 lines Add new "pri show version" command to show the libpri version for support reasons. ........ ................ r115268 | dhubbard | 2008-05-02 23:40:32 -0400 (Fri, 02 May 2008) | 11 lines A taskprocessor is an object that has a name, a task queue, and an event processing thread. Modules reference a taskprocessor, push tasks into the taskprocessor as needed, and unreference the taskprocessor when the taskprocessor is no longer needed. A task wraps a callback function pointer and a data pointer and is managed internal to the taskprocessor subsystem. The callback function is responsible for releasing task data. Taskprocessor API * ast_taskprocessor_get(..) - returns a reference to a taskprocessor * ast_taskprocessor_unreference(..) - releases reference to a taskprocessor * ast_taskprocessor_push(..) - push a task into a taskprocessor queue Check doxygen for more details ................ r115270 | dhubbard | 2008-05-02 23:57:42 -0400 (Fri, 02 May 2008) | 1 line app_queue uses a taskprocessor for device state changes ................ r115272 | dhubbard | 2008-05-03 00:12:54 -0400 (Sat, 03 May 2008) | 1 line pbx uses a taskprocessor for device state changes ................ r115274 | dhubbard | 2008-05-03 00:23:18 -0400 (Sat, 03 May 2008) | 1 line app_voicemail uses a taskprocessor for mwi notification subscriptions ................ r115277 | file | 2008-05-03 21:45:21 -0400 (Sat, 03 May 2008) | 10 lines Merged revisions 115276 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r115276 | file | 2008-05-03 22:43:26 -0300 (Sat, 03 May 2008) | 2 lines Treat warnings as errors when checking if a GCC attribute exists. We have to do this as GCC will just ignore the attribute and pop up a warning, it won't actually fail to compile. ........ ................ r115280 | file | 2008-05-03 21:52:00 -0400 (Sat, 03 May 2008) | 10 lines Merged revisions 115279 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r115279 | file | 2008-05-03 22:50:59 -0300 (Sat, 03 May 2008) | 2 lines For my next trick I will make these work with what our autoconf header file gives us. ........ ................ r115283 | file | 2008-05-03 22:11:01 -0400 (Sat, 03 May 2008) | 10 lines Merged revisions 115282 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r115282 | file | 2008-05-03 23:09:44 -0300 (Sat, 03 May 2008) | 2 lines Expand the test function for GCC attributes so that more complex attributes are properly recognized. ........ ................ r115286 | tilghman | 2008-05-04 23:25:35 -0400 (Sun, 04 May 2008) | 15 lines Merged revisions 115285 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r115285 | tilghman | 2008-05-04 22:22:25 -0500 (Sun, 04 May 2008) | 7 lines When starting Asterisk, bug out if Asterisk is already running. (closes issue ASTERISK-11921) Reported by: explidous Patches: 20080428__bug12525.diff.txt uploaded by Corydon76 (license 14) Tested by: mvanbaak ........ ................ r115288 | kpfleming | 2008-05-05 06:55:09 -0400 (Mon, 05 May 2008) | 2 lines clarify wording ................ r115290 | file | 2008-05-05 09:52:44 -0400 (Mon, 05 May 2008) | 6 lines Document the 'B' option of app_chanspy. (closes issue ASTERISK-11970) Reported by: IgorG Patches: app_chanspy_B_option.diff uploaded by IgorG (license 20) ................ r115301 | tilghman | 2008-05-05 15:33:14 -0400 (Mon, 05 May 2008) | 3 lines Optionally display the value of several variables within the Status command. (Closes issue AST-34) ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=115307 |