Olivier
2017-Jun-12 08:36 UTC
[asterisk-users] CentOS7: How to debug SEGV when asterisk starts with autoload=yes ?
Hello, I was tasked to install Asterisk 13.16.0. from source on a CentOS7 platform. For that purpose, I used an unmaintened script of mine, written 10 monthes ago, and I was surprised to get segmentation violations whenever I ran "asterisk -cvvvvvvv -U asterisk". Usually, my /etc/asterisk/modules.conf file includes "autoload=yes" setting. Basically, I see two alternative methods: 1. leave "autoload=yes and remove modules one by one in modules.conf. When segmentation violations stops, then focus on latest disabled module. 2.set "autoload=no and add modules one by one in modules.conf. When segmentation violations starts, then focus on latest enabled module. I've not decided yet which method I should use but I must add here that I'm very suprised to observe things like bellow: *CLI> module show Module Description Use Count Status Support Level res_pjsip.so Basic SIP resource 0 Not Running core 1 modules loaded *CLI> module unload res_pjsip.so Unable to unload resource res_pjsip.so Command 'module unload res_pjsip.so' failed. *CLI> module load reload show unload *CLI> module show Module Description Use Count Status Support Level res_pjsip.so Basic SIP resource 0 Not Running core 1 modules loaded *CLI> module unload res_pjsip.so Unable to unload resource res_pjsip.so Command 'module unload res_pjsip.so ' failed. *CLI> module reload res_pjsip.so The module 'res_pjsip.so' was not properly initialized. Before reloading the module, you must run "module load res_pjsip.so" and fix whatever is preventing the module from being initialized. *CLI> module load res_pjsip.so Unable to load module res_pjsip.so Command 'module load res_pjsip.so' failed. *CLI> module show Module Description Use Count Status Support Level res_pjsip.so Basic SIP resource 0 Not Running core 1 modules loaded Form full file: ... 2017-06-12 10:15:05] WARNING[1649] loader.c: Unload failed, 'res_pjsip.so' is not loaded. My questions are: 1. When autoload=yes, if module foo.so depens on bar.so, does loading of foo.so also loads bar.so ? 2. How shall I understand the above load/unload/reload sequence ? 3. I'm inclined to load modules one by one and set autoload=no, but I would like to be 100% sure to avoid runtime errors due to missing module/config file/dependency/whatever. What would you suggest ? Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170612/d83b515a/attachment.html>
Tzafrir Cohen
2017-Jun-12 13:29 UTC
[asterisk-users] CentOS7: How to debug SEGV when asterisk starts with autoload=yes ?
On Mon, Jun 12, 2017 at 10:36:21AM +0200, Olivier wrote:> Hello, > > I was tasked to install Asterisk 13.16.0. from source on a CentOS7 platform. > > For that purpose, I used an unmaintened script of mine, written 10 monthes > ago, and I was surprised to get segmentation violations whenever I ran > "asterisk -cvvvvvvv -U asterisk". > > Usually, my /etc/asterisk/modules.conf file includes "autoload=yes" setting. > > Basically, I see two alternative methods: > > 1. leave "autoload=yes and remove modules one by one in modules.conf. > When segmentation violations stops, then focus on latest disabled module.Never a good idea. Disable half for starters. Then disable/enable half of the remaining, etc.> > 2.set "autoload=no and add modules one by one in modules.conf. > When segmentation violations starts, then focus on latest enabled module.3. strace -eopen asterisk -U asterisk -c IIRC the message that Asterisk prints for loading a module is only printed after the module is loaded, and hence you need strace. -- Tzafrir Cohen +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com
Olivier
2017-Jun-12 20:54 UTC
[asterisk-users] CentOS7: How to debug SEGV when asterisk starts with autoload=yes ?
Hi, I think I was (once more) tricked by SELinux's enforce mode. Changing it to permissive improved things. Anyway, as I would like to learn more about strace, SELinux and Asterisk module loading, I'll leave this thread "open" and append my findings, in couple of days, when I'll be back from a business trip. 2017-06-12 15:29 GMT+02:00 Tzafrir Cohen <tzafrir.cohen at xorcom.com>:> On Mon, Jun 12, 2017 at 10:36:21AM +0200, Olivier wrote: > > Hello, > > > > I was tasked to install Asterisk 13.16.0. from source on a CentOS7 > platform. > > > > For that purpose, I used an unmaintened script of mine, written 10 > monthes > > ago, and I was surprised to get segmentation violations whenever I ran > > "asterisk -cvvvvvvv -U asterisk". > > > > Usually, my /etc/asterisk/modules.conf file includes "autoload=yes" > setting. > > > > Basically, I see two alternative methods: > > > > 1. leave "autoload=yes and remove modules one by one in modules.conf. > > When segmentation violations stops, then focus on latest disabled module. > > Never a good idea. Disable half for starters. Then disable/enable half > of the remaining, etc. > > > > > 2.set "autoload=no and add modules one by one in modules.conf. > > When segmentation violations starts, then focus on latest enabled module. > > 3. strace -eopen asterisk -U asterisk -c > > IIRC the message that Asterisk prints for loading a module is only > printed after the module is loaded, and hence you need strace. > > -- > Tzafrir Cohen > +972-50-7952406 mailto:tzafrir.cohen at xorcom.com > http://www.xorcom.com > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: https://community.asterisk. > org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170612/56408cdc/attachment.html>
Apparently Analagous Threads
- some domains resolving issues
- asterisk 13.16 / pjsip / t.38: res_pjsip_t38.c:207 t38_automatic_reject: Automatically rejecting T.38 request on channel 'PJSIP/91-00000007'
- pjproject 2.5.5 + asterisk-certified-13.8-cert1 : many Error loading module...undefined symbol
- asterisk help
- Asterisk 13.16.0 Now Available