]> git.ipfire.org Git - thirdparty/asterisk.git/commit
stasis: No need to keep a stasis type ref in a stasis msg or cache object.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 14 Sep 2018 20:51:41 +0000 (15:51 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 19 Sep 2018 17:26:54 +0000 (12:26 -0500)
commitac18bb23a9c0ef270957ebb8daf9391e6b6bd384
tree94bfd13027c787735bf00b7b62263ba885b9e664
parentf4294baf211abe1bba4d56cd1455ef74cabb42ed
stasis: No need to keep a stasis type ref in a stasis msg or cache object.

Stasis message types are global ao2 objects and we make stasis messages
and cache entries hold references to them.  Since there are currently
situations where cache objects are never deleted, the reference count on
the types can exceed 100000 and generate a FRACK assertion message.  The
stasis message cache could conceivably also have that many messages
legitimately on large systems.

The only down side to not holding the message type ref in the stasis
message is it only makes a crash either at shutdown or when manually
unloading a busy module slightly more likely.  However, this is more
exposing a pre-existing stasis shutdown ordering issue than a problem with
not holding a message type ref in stasis messages.

* Made stasis messages and cache entries no longer hold a ref to the
message type.

Change-Id: Ibaa28efa8d8ad3836f0c65957192424c7f561707
main/stasis_cache.c
main/stasis_message.c