奇怪的进程导致内存不足

奇怪的进程导致内存不足

在 Ubuntu 上(Linux jc2hal-new 5.3.0-62-generic #56~18.04.1-Ubuntu SMP Wed Jun 24 16:17:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux)我遇到了一个奇怪的问题:一旦我出现一系列严重的滞后,当我检查 dmesg 时,我看到 oom-kill 多次杀死名为“rg”的进程:

$ dmesg | grep "Killed process"
[685948.429421] Out of memory: Killed process 11436 (rg) total-vm:2265220kB, anon-rss:2249532kB, file-rss:0kB, shmem-rss:0kB
[686169.041851] Out of memory: Killed process 12113 (rg) total-vm:1711576kB, anon-rss:1674664kB, file-rss:0kB, shmem-rss:0kB
[686724.302831] Out of memory: Killed process 14217 (rg) total-vm:1658528kB, anon-rss:1643180kB, file-rss:0kB, shmem-rss:0kB
[689403.737894] Out of memory: Killed process 22995 (rg) total-vm:1689408kB, anon-rss:1671980kB, file-rss:0kB, shmem-rss:0kB
[689716.506832] Out of memory: Killed process 23977 (rg) total-vm:1713632kB, anon-rss:1692932kB, file-rss:0kB, shmem-rss:0kB
[689912.849209] Out of memory: Killed process 24900 (rg) total-vm:1641916kB, anon-rss:1626488kB, file-rss:0kB, shmem-rss:0kB
[690116.260516] Out of memory: Killed process 25613 (rg) total-vm:1633988kB, anon-rss:1618496kB, file-rss:0kB, shmem-rss:0kB

当我检查时,“rg”指的是“ripgrep”工具,但它尚未安装:

$ rg

Command 'rg' not found, but can be installed with:

sudo snap install ripgrep

会是什么呢?这个系统对稳定性的要求很高,因为它要不断地从设备中获取数据。

相关内容