[asterisk-dev] [Code Review] 3128: Protect CEL data structures during reload and shutdown. v12 version.

rmudgett reviewboard at asterisk.org
Fri Jan 24 17:30:15 CST 2014


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

(Updated Jan. 24, 2014, 5:30 p.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Bugs: AST-1253
    https://issues.asterisk.org/jira/browse/AST-1253


Repository: Asterisk


Description
-------

This is the Asterisk v12 version of the https://reviewboard.asterisk.org/r/3127/ review.

The CEL data structures need to be protected during a configuration reload and shutdown.  Asterisk crashed during a shutdown because CEL events were still in flight and the CEL data structures were already destroyed.

* Protected the cel_backends, cel_dialstatus_store, and cel_linkedids ao2 containers with a global ao2 object wrapper.

* Added NULL checks before use of the cel_backends, cel_dialstatus_store, and cel_linkedids ao2 containers in case the CEL module is already shutdown.

* Fixed overloading of the cel_linkedids held objects reference count.  During shutdown any held objects would be leaked.

* Fixed memory leak of cel_linkedids held objects if the LINKEDID_END is not being tracked.  The objects in the cel_linkedids container were not removed if the LINKEDID_END event is not used.

* Added access protection to the cel_backends container during the CLI "cel show status" command.

* Made cel_backends, cel_dialstatus_store, and cel_linkedids use the standard ao2 callback templates for the hash and cmp functions.

* Eliminated unnecessary uses of RAII_VAR().

* Made ast_cel_engine_init() cleanup alocated resources on failure.


Diffs
-----

  /branches/12/main/cel.c 405542 

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


Testing
-------

* Checked CLI "cel show status" output was as expected.
* Checked CEL logs for APP_START/APP_END/LINKEDID_END events after a call.
* Shutdown asterisk with "core stop now" and "core stop gracefully" without any crashes.


Thanks,

rmudgett

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140124/a358ec24/attachment-0001.html>


More information about the asterisk-dev mailing list