Description

This article describes how to fix memory leak issue in SRX due to l2cpd process.

Symptoms

We can see the below in the log messages multiple times: 

Nov 12 18:00:07 2024 host l2cpd[69354]: JTASK_OS_MEMHIGH: Using 115425 KB of memory, 85 percent of available
Nov 12 18:01:07 2024 host l2cpd[69354]: JTASK_OS_MEMHIGH: Using 115425 KB of memory, 85 percent of available
Nov 12 18:02:07 2024 host l2cpd[69354]: JTASK_OS_MEMHIGH: Using 115425 KB of memory, 85 percent of available
Nov 12 18:07:07 2024 host l2cpd[69354]: JTASK_OS_MEMHIGH: Using 115429 KB of memory, 86 percent of available

Solution

In all Junos and Junos Evo platform, there is a one shot timer created for LLDP (Link Layer Discovery Protocol). This many not get free before created a new shot timer. This makes the process getting stuck/ in sleep mode. This can lead to memory leak issue. 

 

When you check show system processes extensive | match l2cpd, you can see the same process gets listed more than one time. 

root@srx> system processes extensive | match l2cpd

2224 root    4  0  141M  108M kqread 0 85:38 0.00% l2cpd

2224 root    4  0  141M  108M nanslp 0 85:38 0.00% l2cpd

2224 root    4  0  141M  108M nanslp 0 85:38 0.00% l2cpd

2224 root    4  0  141M  108M nanslp 0 85:38 0.00% l2cpd

2224 root    4  0  141M  108M nanslp 0 85:38 0.00% l2cpd

 

This is a known issue and is resolved in the below versions. To fix this permanently, you can upgrade the device to the fixed versions. 

20.4R3-S2, 21.1R3, 21.2R2, 21.2R3. 21.3R1-S1, 21.3R2, 21.4R1, 22.1R1

 

For temporary fix, you can kill the l2cpd process or reboot the SRX. 

[Junos] How to restart a specific process in Junos?

 

Modification History

2024-11-11 : Article Created

Related Information

PR: https://prsearch.juniper.net/problemreport/PR1617151