[Asterisk-code-review] Core/Stasis: Fix "FRACK!, Failed assertion bad magic number" happens ... (asterisk[16])

Joshua Colp asteriskteam at digium.com
Thu Apr 22 06:32:50 CDT 2021


Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/15762 )

Change subject: Core/Stasis: Fix "FRACK!, Failed assertion bad magic number" happens when unsubscribe an application from an event source
......................................................................


Patch Set 2: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/c/asterisk/+/15762/2/res/stasis/messaging.c 
File res/stasis/messaging.c:

https://gerrit.asterisk.org/c/asterisk/+/15762/2/res/stasis/messaging.c@445 
PS2, Line 445: 			ao2_bump(sub);
On further looking at the code, I think this isn't actually needed but instead the ao2_ref(sub, -1); just needs to be removed. The RAII_VAR takes care of cleaning up the reference.


https://gerrit.asterisk.org/c/asterisk/+/15762/2/res/stasis/messaging.c@517 
PS2, Line 517: 	/* Need up the subscription's reference counter since the subscription has more than 1 application subscribed to */
Can you elaborate this further including the reference counting and where it gets handled for decrementing/destruction? Applications don't seem to hold a direct reference to subscriptions so I'm now confused on why this is being done and what it is achieving.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15762
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ia91b15f8e5ea68f850c66889a6325d9575901729
Gerrit-Change-Number: 15762
Gerrit-PatchSet: 2
Gerrit-Owner: Evgenios Muratidis <jone1984 at hotmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Thu, 22 Apr 2021 11:32:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210422/7f7aef4f/attachment.html>


More information about the asterisk-code-review mailing list