[asterisk-bugs] [JIRA] (ASTERISK-26521) MemLeak: res/res_pjsip_session.c

Corey Farrell (JIRA) noreply at issues.asterisk.org
Thu Oct 19 08:51:21 CDT 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-26521?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Corey Farrell closed ASTERISK-26521.
------------------------------------

    Resolution: Cannot Reproduce

I've just run the 3 tests you mentioned against the latest revision of {{master}}.  No leaks in any of them.

Since this ticket was open I've submitted a bunch of fixes to allow REF_DEBUG testing of PJSIP - ASTERISK-27306.  Mostly this fixed failures to properly shutdown but a couple of actual leaks were addressed by that issue as well.  It's possible the leak you experienced was fixed by that.

> MemLeak: res/res_pjsip_session.c
> --------------------------------
>
>                 Key: ASTERISK-26521
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26521
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip_session
>    Affects Versions: 13.12.1, 14.1.1
>            Reporter: Badalian Vyacheslav
>            Severity: Minor
>
> Asterisk git branch "13"
> {code}
> Direct leak of 1136 byte(s) in 2 object(s) allocated from:
>     #0 0x7f415b98ad50 in __interceptor_calloc (/usr/local/lib64/libasan.so.3+0xc1d50)
>     #1 0x494a87 in _ast_calloc /usr/src/asterisk/include/asterisk/utils.h:573
>     #2 0x495993 in internal_ao2_alloc /usr/src/asterisk/main/astobj2.c:532
>     #3 0x495d38 in __ao2_alloc /usr/src/asterisk/main/astobj2.c:617
>     #4 0x7f41463a9143 in ast_sip_session_alloc /usr/src/asterisk/res/res_pjsip_session.c:1422
>     #5 0x7f41463aa957 in ast_sip_session_create_outgoing /usr/src/asterisk/res/res_pjsip_session.c:1765
>     #6 0x7f41178bda91 in request /usr/src/asterisk/channels/chan_pjsip.c:1946
>     #7 0x7f4148f82397 in sync_task /usr/src/asterisk/res/res_pjsip.c:3904
>     #8 0x7cf3c9 in ast_taskprocessor_execute /usr/src/asterisk/main/taskprocessor.c:967
>     #9 0x7eb430 in execute_tasks /usr/src/asterisk/main/threadpool.c:1322
>     #10 0x7cf3c9 in ast_taskprocessor_execute /usr/src/asterisk/main/taskprocessor.c:967
>     #11 0x7e6a40 in threadpool_execute /usr/src/asterisk/main/threadpool.c:351
>     #12 0x7ea3fa in worker_active /usr/src/asterisk/main/threadpool.c:1105
>     #13 0x7e9f37 in worker_start /usr/src/asterisk/main/threadpool.c:1024
>     #14 0x807044 in dummy_start /usr/src/asterisk/main/utils.c:1235
>     #15 0x7f4159d960a3 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x80a3)
> {code}
> Looks like {{ast_sip_session_alloc}} and {{ast_sip_session_create_outgoing}} have 
> {code}
> 	ao2_ref(session, +1);
> {code}
> but may be i mistake
> Found in tests:
> - tests/apps/dial/dial_parallel/dial_parallel_answer_cancel_cause.
> - tests/apps/queues/queue_member_forward
> - tests/bridge/hold_redirect
> Found using my test toolkit
> {code}
> # mkdir /tmp/asterisk_asan
> # docker run --rm -it -v /tmp/asterisk_asan:/tmp/asterisk_asan --name asterisk-asan-master slavon/docker-asterisk-testsute-asan:pjproject_2.5.5-testsute_master-asterisk_13
> {code}



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



More information about the asterisk-bugs mailing list