[asterisk-bugs] [JIRA] (ASTERISK-28413) pjsip show channelstats crashes asterisk while printing a channel being hung up

Alex Hermann (JIRA) noreply at issues.asterisk.org
Mon May 13 10:00:47 CDT 2019


Alex Hermann created ASTERISK-28413:
---------------------------------------

             Summary: pjsip show channelstats crashes asterisk while printing a channel being hung up
                 Key: ASTERISK-28413
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28413
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Channels/chan_pjsip
    Affects Versions: 13.23.1
            Reporter: Alex Hermann


I got a crash when {{pjsip show channelstats}} was executing (via Manager). In function {{cli_channelstats_print_body()}} it was trying to retrieve the stats via {{ast_rtp_instance_get_stats(media->rtp,...)}} for a channel that was in the process of being hung up. In this case, {{media->rtp}} was NULL even though it was checked for NULL only a few lines before, meaning the rtp instance got removed by another thread even though the print function still had a reference to it.

I tried to find the code responsible for synchronizing access to {{media->rtp}} (locks, refcount) but could not find it. This makes me believe this is a bug in the code. Something should be in place to prevent the rtp instance from disappearing while still being referenced.

As this crash was a one-time event (for now) I don't have debug logs. I do have a backtrace which i'll try to attach.



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



More information about the asterisk-bugs mailing list