[asterisk-bugs] [JIRA] (ASTERISK-29040) res_speech: Assertion on format
Reid Canavan (JIRA)
noreply at issues.asterisk.org
Wed Sep 16 07:57:43 CDT 2020
[ https://issues.asterisk.org/jira/browse/ASTERISK-29040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Reid Canavan updated ASTERISK-29040:
------------------------------------
Comment: was deleted
(was: This is the patch we used to correct the issue as found discussed here:
https://groups.google.com/g/unimrcp/c/LrVK4W-b-Ho/m/zib3WYuwAQAJ?pli=1)
> 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
> Labels: patch
> Target Release: 13.37.0, 16.14.0, 17.8.0, 18.0.0
>
> Attachments: app_speech_utils.diff
>
>
> 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