]> 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:32:33 +0000 (12:32 -0500)
commitf43463d0d3687b538a51cb72dc2d13e39c00480c
treeef1fe2d2d0446c92a8ca70badf22f89f77b91114
parent70af90e2f5e15f570262cca90167ef84b583efc9
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