[asterisk-dev] [Code Review] Prevent segfault when asterisk restarts. Happens if call arrives before fully booted.

Alec Davis reviewboard at asterisk.org
Mon Sep 5 05:15:23 CDT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1407/
-----------------------------------------------------------

(Updated Sept. 5, 2011, 5:15 a.m.)


Review request for Asterisk Developers.


Changes
-------

This addresses the segfault that is easily recreated with full debug turned on.

but doesn't attempt to fix all the places where ast_pbx_run() is called, where if ast_pbx_run() failed should the call be hangup or not. 


Summary
-------

If a call arrives before asterisk is fully booted generally it will segfault.


Diffs (updated)
-----

  trunk/main/pbx.c 333893 

Diff: https://reviewboard.asterisk.org/r/1407/diff


Testing (updated)
-------

restarted asterisk, and before all modules have finished loading made a call into it.
Warning message appears, and call is dropped.
No orphaned channels.

  == Using SIP RTP CoS mark 5
  == Registered translator 'slin 96000khz -> 32000khz' from format slin96 to slin32, table cost, 850000, computational cost 999999
[2011-09-05 21:57:11.617417] WARNING[30782]: pbx.c:5363 ast_pbx_start: PBX requires Asterisk to be fully booted
[2011-09-05 21:57:11.617973] WARNING[30782]: chan_sip.c:22917 handle_request_invite: Failed to start PBX :(
  == Registered translator 'slin 96000khz -> 44100khz' from format slin96 to slin44, table cost, 850000, computational cost 999999


Thanks,

Alec

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110905/aaef1a47/attachment.htm>


More information about the asterisk-dev mailing list