Description

On Junos platforms with PKI, the PKID process shows memory usage increase over time after a larger number of certificate verifications because some memory allocated during the certificate verification is not released.

Symptoms

This problem could arise under the following circumstances: 

1. Across all Junos Platform

2. When PKI is enabled

Below command will show memory usage increase in PKID daemon after a certificate verification.
"show system process extensive | match pkid"

Example output:-

> show system processes extensive | match pkid

PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND

2149 root 123 0 161M 139M RUN 0 815:01 68.41% pkid <<<<<<<<<<<<<=====

> show security pki local-certificate
May 31 14:44:28
error: the pki-service subsystem is not responding to management requests

Solution

The root cause of this issue:-

Some memory allocated during the certificate verification is not released. This occurs in every certificate verification. The memory lost cannot be reclaimed until the PKID process is restarted manually. The amount of the leak varies depending on the certificate hierarchy, from a few KB to hundreds of KB. Per the description in this PR, AAMW operation is impacted.

This problem applies to all platforms using the pki-service (the daemon process name is PKID), including all SRX platforms, maybe also some NFX/MX/EVO platforms.

Workaround:-

The issue can be recovered by executing the below CLI command

>restart pki-service

This issue introduced in the below-mentioned releases

22.1R1, 21.3R2, 21.2R2, 21.1R3, 21.2R3, 21.4R1, 20.3R3-S2

For more details on the resolved releases please check this PR1739342.

Modification History

2023-11-30: Article Created
2024-06-13: Additional info in root cause as per the PR