[asterisk-bugs] [JIRA] (ASTERISK-26516) pjsip: Memory corruption with possible memory leak.

Ian Gilmour (JIRA) noreply at issues.asterisk.org
Wed Nov 2 11:59:10 CDT 2016


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

Ian Gilmour updated ASTERISK-26516:
-----------------------------------

    Attachment: screenlog-2016-11-02.tgz

Hi Richard, yes I realise pjproject caches released memory pools to be reused the next time a pool is needed, but this test only re-registers 5 TLS users every couple of mins, so I would have thought it would reach a stable state reasonably quickly, and well before a couple of hours - no?

Running the same system I built yesterday for 9 hours today I see the cache pools growing:

{noformat}
grep -e "bytes in all allocations and deferred free allocations" -e "allocations in file.*pool_policy_malloc.c" -e "cachpool.*Total" screenlog.0
   6640576 bytes in        673 allocations in file ../src/pj/pool_policy_malloc.c
  13189225 bytes in all allocations and deferred free allocations
  13189497 bytes in all allocations and deferred free allocations
   6813632 bytes in        839 allocations in file ../src/pj/pool_policy_malloc.c
  13656403 bytes in all allocations and deferred free allocations
  13656395 bytes in all allocations and deferred free allocations
  13755992 bytes in all allocations and deferred free allocations
   6926272 bytes in        928 allocations in file ../src/pj/pool_policy_malloc.c
  13755980 bytes in all allocations and deferred free allocations
   7065248 bytes in       1015 allocations in file ../src/pj/pool_policy_malloc.c
  13927279 bytes in all allocations and deferred free allocations
  13927293 bytes in all allocations and deferred free allocations
   7298496 bytes in       1227 allocations in file ../src/pj/pool_policy_malloc.c
  14128893 bytes in all allocations and deferred free allocations
  14168989 bytes in all allocations and deferred free allocations
   7393728 bytes in       1320 allocations in file ../src/pj/pool_policy_malloc.c
  14251689 bytes in all allocations and deferred free allocations
  14250852 bytes in all allocations and deferred free allocations
   7788992 bytes in       1641 allocations in file ../src/pj/pool_policy_malloc.c
  14654274 bytes in all allocations and deferred free allocations
  14654285 bytes in all allocations and deferred free allocations
   8027072 bytes in       1806 allocations in file ../src/pj/pool_policy_malloc.c
  14876070 bytes in all allocations and deferred free allocations
  14876084 bytes in all allocations and deferred free allocations
   8444352 bytes in       2084 allocations in file ../src/pj/pool_policy_malloc.c
  15328742 bytes in all allocations and deferred free allocations
  15331609 bytes in all allocations and deferred free allocations
      cachpool   Total   7300064 of   8496320 (85 %) used!
   8728000 bytes in       2271 allocations in file ../src/pj/pool_policy_malloc.c
  15614381 bytes in all allocations and deferred free allocations
  15614392 bytes in all allocations and deferred free allocations
      cachpool   Total   7405112 of   8688320 (85 %) used!
      cachpool   Total   7405496 of   8690368 (85 %) used!
   8789440 bytes in       2331 allocations in file ../src/pj/pool_policy_malloc.c
  15668738 bytes in all allocations and deferred free allocations
  15668722 bytes in all allocations and deferred free allocations
      cachpool   Total   7416632 of   8749760 (84 %) used!
   8852928 bytes in       2393 allocations in file ../src/pj/pool_policy_malloc.c
  15732482 bytes in all allocations and deferred free allocations
  15732493 bytes in all allocations and deferred free allocations
      cachpool   Total   7428536 of   8813248 (84 %) used!
{noformat}

and

{noformat}
grep -e ":13:0" -A 8 screenlog.2 | sed 's/[[:space:]]*$//' | grep -e "top -" -e "21121"
top - 07:13:07 up 20 days, 23:12,  6 users,  load average: 0.00, 0.00, 0.00
21121 iang      20   0 2777m  53m  13m S 18.4  0.7   0:03.80 asterisk
top - 08:13:02 up 21 days, 12 min,  6 users,  load average: 0.00, 0.00, 0.00
21121 iang      20   0 2777m  58m  13m S  0.4  0.7   0:20.59 asterisk
top - 09:13:02 up 21 days,  1:12,  0 users,  load average: 0.00, 0.00, 0.00
21121 iang      20   0 2777m  59m  13m S  0.4  0.8   0:38.15 asterisk
top - 10:13:05 up 21 days,  2:12,  0 users,  load average: 0.00, 0.00, 0.00
21121 iang      20   0 2777m  61m  13m S  0.4  0.8   0:54.69 asterisk
top - 11:13:00 up 21 days,  3:12,  6 users,  load average: 0.00, 0.00, 0.00
21121 iang      20   0 2777m  62m  13m S  0.4  0.8   1:12.00 asterisk
top - 11:13:09 up 21 days,  3:12,  6 users,  load average: 0.00, 0.00, 0.00
21121 iang      20   0 2777m  62m  13m S  0.3  0.8   1:12.03 asterisk
top - 12:13:03 up 21 days,  4:12,  6 users,  load average: 0.00, 0.00, 0.00
21121 iang      20   0 2777m  63m  13m S  0.2  0.8   1:28.45 asterisk
top - 13:13:06 up 21 days,  5:12,  0 users,  load average: 0.00, 0.01, 0.00
21121 iang      20   0 2777m  63m  13m S  0.4  0.8   1:46.21 asterisk
top - 14:13:02 up 21 days,  6:12,  6 users,  load average: 0.00, 0.09, 0.13
21121 iang      20   0 2777m  64m  13m S  0.2  0.8   2:03.18 asterisk
top - 15:13:06 up 21 days,  7:12,  6 users,  load average: 0.00, 0.00, 0.00
21121 iang      20   0 2777m  65m  13m S  0.6  0.8   2:19.99 asterisk
top - 16:13:07 up 21 days,  8:12,  6 users,  load average: 0.05, 0.01, 0.00
21121 iang      20   0 2777m  65m  13m S  0.6  0.8   2:38.45 asterisk
{noformat}

I'll leave it running overnight.

> pjsip: Memory corruption with possible memory leak.
> ---------------------------------------------------
>
>                 Key: ASTERISK-26516
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26516
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip, Resources/res_pjsip
>    Affects Versions: 13.11.2
>            Reporter: Richard Mudgett
>            Assignee: Richard Mudgett
>         Attachments: 0007_jira_asterisk_26516_v13_free_mem_fix.patch, 2016-10-28.tgz, cli-and-gdb-2016-10-27.tgz, jira_asterisk_26344_v13_committed_fix.patch, jira_asterisk_26344_v13_debuging.patch, jira_asterisk_26516_v13_debugging.patch, screenlog-2016-11-01.tgz, screenlog-2016-11-02.tgz
>
>
> This is a continuation of ASTERISK-26344 and ASTERISK-26387 since the original crashes are fixed with patches added to pjproject.  For the setup description look at ASTERISK-26344.



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



More information about the asterisk-bugs mailing list