This article describes the issue of the kernel: Process (35981,clksyncd) attempted to exceed RLIMIT_DATA: attempted xxxxx KB Max xxxxxx KB error message being generated, when running Junos OS code version 11.2R3.
There is a memory leak in the clksyncd process, which occurs when the xe- links are flapping. The log messages are as follows:
kernel: Process (35981,clksyncd) attempted to exceed RLIMIT_DATA: attempted 131076 KB Max 131072 KB kernel: Process (35981,clksyncd) attempted to exceed RLIMIT_DATA: attempted 131076 KB Max 131072 KB kernel: Process (35981,clksyncd) attempted to exceed RLIMIT_DATA: attempted 131076 KB Max 131072 KB kernel: Process (35981,clksyncd) attempted to exceed RLIMIT_DATA: attempted 131076 KB Max 131072 KB sec=clksyncd: SIGTERM - clksyncd init: clksyncd-service (PID 35981) exited with status=0 Normal Exit init: clksyncd-service (PID 28110) started kernel: Process (28110,clksyncd) has exceeded 85% of RLIMIT_DATA: used 114704 KB Max 131072 KB kernel: Process (28110,clksyncd) has exceeded 85% of RLIMIT_DATA: used 115056 KB Max 131072 KB kernel: Process (28110,clksyncd) has exceeded 85% of RLIMIT_DATA: used 115472 KB Max 131072 KB
This issue is due to several interfaces having a large amount of framing errors:
Jun 5 22:19:56 router.test mib2d[1914]: SNMP_TRAP_LINK_DOWN: ifIndex 536, ifAdminStatus up(1), ifOperStatus down(2), ifName xe-0/3/2 Jun 5 22:20:19 router.test last message repeated 5 times Jun 5 22:22:25 router.test last message repeated 14 times Jun 5 22:23:16 router.test last message repeated 6 times
# show interfaces xe-0/3/2 extensive | match "errors: |Carrier transitions" Errors: 1451, Drops: 0, Framing errors: 1451, Runts: 0, Policed discards: 0, L3 incompletes: 0, L2 channel errors: 0, L2 mismatch timeouts: 0, FIFO errors: 0, Resource errors: 0, Carrier transitions: 31569, Errors: 0, Drops: 0, Collisions: 0, Aged packets: 0, FIFO errors: 0, HS link CRC errors: 0, MTU errors: 0, Resource errors: 0
> show system processes extensive | match clksyncd PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND 45699 root 1 96 0 134M 131M select 0:17 0.00% clksyncd > restart clksyncd-service Ethernet Clock Synchronization Process started, pid 37271 [email protected]> show system processes extensive | match clk 37271 root 1 96 0 6664K 3428K select 0:00 3.37% clksyncd
> show system processes extensive | match clksyncd PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND 45699 root 1 96 0 134M 131M select 0:17 0.00% clksyncd
> restart clksyncd-service Ethernet Clock Synchronization Process started, pid 37271 [email protected]> show system processes extensive | match clk 37271 root 1 96 0 6664K 3428K select 0:00 3.37% clksyncd
To recover the memory, restart the process with restart clksyncd-service . Restarting this process will not affect the service and it will prevent it from reaching the limit and being unable to allocate memory.
2021-03-21: non-technical edit; corrected router name.