[asterisk-bugs] [JIRA] (ASTERISK-29040) res_speech: Assertion on format
Friendly Automation (JIRA)
noreply at issues.asterisk.org
Thu Aug 27 13:54:43 CDT 2020
[ https://issues.asterisk.org/jira/browse/ASTERISK-29040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=251819#comment-251819 ]
Friendly Automation commented on ASTERISK-29040:
------------------------------------------------
Change 14808 merged by George Joseph:
res_speech: Bump reference on format object
[https://gerrit.asterisk.org/c/asterisk/+/14808|https://gerrit.asterisk.org/c/asterisk/+/14808]
> res_speech: Assertion on format
> -------------------------------
>
> Key: ASTERISK-29040
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-29040
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_speech
> Affects Versions: GIT
> Reporter: Nickolay V. Shmyrev
> Assignee: Nickolay V. Shmyrev
>
> This issue has been raised many times, due to memory issues user often see in the logs with res_speech
> [Feb 6 10:48:35] ERROR[17692][C-00000021] astobj2.c: FRACK!, Failed assertion bad magic number 0x0 for object 0x31990d8 (0)
> Discussion here https://community.asterisk.org/t/astobj2-c-131-internal-obj-frack-failed-assertion-bad-magic-number/73439
> The previous issue is ASTERISK-27986
> The fix is not correct, the real issue seems that the new_speech->format variable is not bumped properly. best is released with RAII, format is released in ast_speech_destroy but it is never bumped.
> In this code:
> {code}
> RAII_VAR(struct ast_format *, best, NULL, ao2_cleanup);
> ......
> /* Can't forget the format audio is going to be in */
> new_speech->format = best;
> /* Pass ourselves to the engine so they can set us up some more and if they error out then do not create a structure */
> if (engine->create(new_speech, best)) {
> ast_mutex_destroy(&new_speech->lock);
> ast_free(new_speech);
> new_speech = NULL;
> }
> return new_speech;
> }
> /*! \brief Destroy a speech structure */
> int ast_speech_destroy(struct ast_speech *speech)
> {
> ...
> ao2_ref(speech->format, -1);
> ...
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list