[asterisk-bugs] [JIRA] (ASTERISK-26664) pjsip: pj_thread_register() assertion

Jørgen H (JIRA) noreply at issues.asterisk.org
Thu Oct 4 04:49:54 CDT 2018


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=245068#comment-245068 ] 

Jørgen H commented on ASTERISK-26664:
-------------------------------------

The recommended config_site.h from the Asterisk project to be used when building pjsip have the following definition
#define PJ_OS_HAS_STACK_CHECK to 0

This will drop the calls to PJ_CHECK_STACK() which causes the assertion failures
So the pjsip library is not built following Asterisk recommendations. The Asterisk patch causing the assertion failure should therefore be correct.

However, pjsip 2.8 will fail on build/linking using asterisk config_site.h because the file removes srtp-support and there is a bug in pjsip including 2 functions it should have removed when not including srtp-support (srtpCryptoEnum() and pjmedia_srtp_enum_crypto() )
This bug is not related to Asterisk though.




> pjsip: pj_thread_register() assertion
> -------------------------------------
>
>                 Key: ASTERISK-26664
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26664
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip
>    Affects Versions: 13.13.0, 13.13.1
>         Environment: Linux, Debian unstable
>            Reporter: Bernhard Schmidt
>         Attachments: paste_903006.txt
>
>
> When a system pjproject library is used with assertions enabled (NDEBUG=0) answering an incoming call leads to the following assertion:
> {noformat}
> asterisk: ../src/pj/os_core_unix.c:692: pj_thread_this: Assertion `!"Calling pjlib from unknown/external thread. You must " "register external threads with pj_thread_register() " "before calling any pjlib functions."' failed.
> Aborted
> {noformat}
> This is caused by this commit: https://github.com/asterisk/asterisk/commit/2b9ad3a5f736b6a4081e172f2a6d35dcd20b51e4
> A production build / embedded pjproject build does not fail since assertions are disabled there. But this still points to a programming error in chan_pjsip (as the assertion says, calling pjlib functions from an unregistered thread).



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list