The original post: /r/pihole by /u/lonecow on 2024-11-07 13:12:29.

Ive been having a memory leak of some sorts in dhcpcd. I was wondering if anyone else has seen something Similar.

It happens when I keep a ssh connection open over time.

I added a gig of memory to the swap file, but that only extended Out of Memory error from a couple days to a month.

[1443083.606896] lowmem_reserve[]: 0 0 0 0
[1443083.606928] DMA: 641*4kB (UMEHC) 360*8kB (UMEHC) 251*16kB (UMEH) 117*32kB (UMEH) 56*64kB (UMEH) 20*128kB (UMEH) 6*256kB (UH) 1*512kB (M) 0*1024kB 0*2048kB 0*4096kB = 21396kB
[1443083.607052] HighMem: 260*4kB (UM) 40*8kB (UM) 11*16kB (U) 4*32kB (U) 6*64kB (U) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 2048kB
[1443083.607150] 1558 total pagecache pages
[1443083.607158] 106 pages in swap cache
[1443083.607165] Swap cache stats: add 267649, delete 267542, find 1206769768/1206772230
[1443083.607171] Free swap  = 0kB
[1443083.607177] Total swap = 1048572kB
[1443083.607183] 242688 pages RAM
[1443083.607189] 46080 pages HighMem/MovableOnly
[1443083.607195] 6739 pages reserved
[1443083.607200] 65536 pages cma reserved
[1443083.607206] Tasks state (memory values in pages):
[1443083.607212] [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
[1443083.607228] [    160]     0   160    12873     8175   106496      243         -1000 systemd-udevd
[1443083.607239] [    361]   108   361     1730       49    40960       65             0 avahi-daemon
[1443083.607247] [    362]     0   362     2050       19    36864       34             0 cron
[1443083.607255] [    363]   104   363     2216      373    45056       47          -900 dbus-daemon
[1443083.607263] [    364]   108   364     1689        8    36864       58             0 avahi-daemon
[1443083.607271] [    372]     0   372     9890      104    69632       79             0 polkitd
[1443083.607279] [    377]   112   377   232749     4153   233472       43             0 prometheus-node
[1443083.607287] [    383]   112   383   349167    15165   528384      393             0 prometheus
[1443083.607294] [    418]     0   418     6636      282    57344       54             0 rsyslogd
[1443083.607302] [    423]     0   423     2273       37    40960      129             0 smartd
[1443083.607309] [    430]     0   430     3264       95    53248       70             0 systemd-logind
[1443083.607317] [    439] 65534   439     1328        4    32768       43             0 thd
[1443083.607325] [    444]     0   444     2947       14    45056       90             0 wpa_supplicant
[1443083.607333] [    468]     0   468    14453      147    90112      189             0 ModemManager
[1443083.607341] [    473]   111   473   265637    10431   544768      549             0 influxd
[1443083.607349] [    477]     0   477     6924       25    40960       10             0 rngd
[1443083.607357] [    495]   110   495    10085      189    65536      213             0 redis-server
[1443083.607365] [    556]     0   556     3102       21    45056      148         -1000 sshd
[1443083.607373] [    583]   109   583     3425       39    49152       49             0 dnsmasq
[1443083.607381] [    597]     0   597     2980       29    45056      100             0 wpa_supplicant
[1443083.607388] [    668]     0   668     1860       72    36864       50             0 hostapd
[1443083.607396] [    678]     0   678      514        1    24576       28             0 hciattach
[1443083.607404] [    692]     0   692     5364        0    65536      213             0 bluetoothd
[1443083.607412] [    780]     0   780   405701   153395  3272704   251693             0 dhcpcd
[1443083.607419] [    781]   113   781   209514     5874   446464      984             0 grafana
[1443083.607427] [    794]     0   794     1121        0    36864       26             0 agetty
[1443083.607434] [    795]  1000   795     1942        0    36864       43             0 bash
[1443083.607442] [    796]     0   796     1942        0    40960       43             0 bash
[1443083.607450] [    799]     0   799     1942        1    40960       43             0 bash
[1443083.607457] [    802]  1000   802     1942       23    40960       18             0 bash
[1443083.607465] [    804]  1000   804     1942       23    40960       18             0 bash
[1443083.607472] [    805]     0   805     7565      479    77824     1059             0 python
[1443083.607480] [    807]     0   807     8846      808    81920     1677             0 rq
[1443083.607488] [    808]  1000   808    14867      629   106496     3444             0 flask
[1443083.607496] [  19103]     0 19103     5002      328    40960      250             0 systemd-udevd
[1443083.607504] [  12782]  1000 12782      440       13    20480        0             0 sshpass
[1443083.607512] [  12784]  1000 12784     3427      413    49152        0             0 ssh
[1443083.607519] [  20060]  1000 20060      440       13    28672        0             0 sshpass
[1443083.607527] [  20063]  1000 20063     3162      125    49152        0             0 ssh
[1443083.607534] [  25071]   103 25071     5572      137    57344        0             0 systemd-timesyn
[1443083.607543] [  21468]     0 21468     1975       37    40960        0             0 bash
[1443083.607550] [  21474]     0 21474     1975       37    36864        0             0 apt.sh
[1443083.607558] [  21475]     0 21475      472       13    28672        0             0 sponge
[1443083.607566] [  21477]     0 21477     1975       44    36864        0             0 apt.sh
[1443083.607574] [  21478]     0 21478    15876     3736   151552        0             0 apt-get
[1443083.607581] [  21479]     0 21479     1768       26    40960        0             0 awk
[1443083.607589] [  21480]     0 21480     3251       15    45056        0             0 sort
[1443083.607596] [  21481]     0 21481     1624       13    40960        0             0 uniq
[1443083.607604] [  21482]     0 21482     1768       15    36864        0             0 awk
[1443083.607613] [  11581]     0 11581     7311      198    57344        0          -250 systemd-journal
[1443083.607622] [  13136]     0 13136     1064      102    32768        0             0 easytether-usb
[1443083.607630] [  13137]     0 13137     1139       89    28672        0             0 modprobe
[1443083.607638] [  13138]     0 13138    12873     8175   106496      242         -1000 systemd-udevd
[1443083.607646] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/,task=dhcpcd,pid=780,uid=0
[1443083.607703] Out of memory: Killed process 780 (dhcpcd) total-vm:1622804kB, anon-rss:613580kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:3196kB oom_score_adj:0
[1443084.580094] oom_reaper: reaped process 780 (dhcpcd), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB