#966294 asterisk: memory leak with PJSIP channel

Package:
asterisk
Source:
asterisk
Description:
Open Source Private Branch Exchange (PBX)
Submitter:
José Miguel Gonçalves
Date:
2021-07-13 13:27:07 UTC
Severity:
important
#966294#5
Date:
2020-07-26 02:20:32 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?
     Executing asterisk in a system configured with around 250 VoIP phones using PJSIP, my 8 GB RAM's server rapidly (~ 2 days) rans out of memory.
     The phones are configured for registring in 180 seconds, so I suspect the memory leak is due to the SIP registry process.
     Another symptom that enhances my suspicion is that I see the memory allocated to the asterisk process to increase even without any calls being made.
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
     To workaround this issue I needed to restart every day the asterisk service in a cron job.
   * What was the outcome of this action?
     The server regains the memory lost.

#966294#10
Date:
2020-08-16 07:43:33 UTC
From:
To:
Hi again,

Adding some more info on this issue.

Using FreePBX statistics dashboard, I've also noticed an increase on the
network traffic and CPU usage.
All of these drop drastically as soon I restart the Asterisk service.

I've backported asterisk testing version (1:16.10.0~dfsg-1) to buster
and, running this version on my production server I verified that this
issue is fixed on it.

Best regards,
José Gonçalves

#966294#15
Date:
2021-01-26 09:33:36 UTC
From:
To:
Hi,

Any updates regarding this bug ?
I'm currently building my own asterisk backport from testing sources in
order to "fix" this issue on my server.
If this bug is not to be fixed in buster, is there any chances in
providing asterisk 16.15 packages in buster-backports ?

Best regards,
José Gonçalves

#966294#20
Date:
2021-04-28 13:08:25 UTC
From:
To:
I also see this problem, unfortunately.
#966294#29
Date:
2021-04-28 13:37:05 UTC
From:
To:
Forgot to Cc the bug ...

Hi Chris,

hrm, Jose reported this issue appearing with the stable release only
(16.16.1 from his (back then) private backport fixing it), you tagged
the bug as still found in 16.16.1, and I cannot see this issue at all.

Unfortunately I don't know what to do with this bug.

Bernhard

#966294#34
Date:
2021-04-28 14:06:37 UTC
From:
To:
Hi,

I'm currently using the asterisk build from buster-backports (16.16.1)
and the leak does not happen on it.

Best regards,
José Gonçalves

#966294#39
Date:
2021-07-13 13:04:37 UTC
From:
To:
Hi Bernhard,

* Bernhard Schmidt <berni@debian.org> [210428 15:41]:

I must say I'm also at a loss with this bug. The memory leak has
"vanished" after restarting enough or something. :-(

Chris

#966294#46
Date:
2021-07-13 13:13:12 UTC
From:
To:
I confirm that this bug only happens with the buster release (16.2.1).
I'm currently using the version from buster-backports (16.16.1) without
any problem.

Best regards,
José Gonçalves